Exemplo n.º 1
0
    def __init__(self, active_langs):
        self.processors = [ParseProcessor(), VirtualConfigurationProcessor()]

        self.processors.append(DependenciesProcessor())
        self.processors.append(
            CPPImplementationsProcessor())  # The order is important
        self.processors.append(DependenciesConfigurationProcessor())
        if 'arduino' in active_langs:
            self.processors.append(ArduinoEntryPointProcesor())
        # This should be the last one to process mains as it can disable entry points
        self.processors.append(MainConfigProcessor())
Exemplo n.º 2
0
    def _prepare_context(self, my_conf):
        if my_conf:
            my_conf = "[dependencies]\n " + my_conf
        self.processor = DependenciesConfigurationProcessor()
        self.r1 = BlockCellName('user/block/r1.h')
        self.r2 = BlockCellName('user/block/r2.cpp')
        self.r3 = BlockCellName('user/block/r3.cpp')
        r1 = SimpleCell(self.r1, CPP)
        r2 = SimpleCell(self.r2, CPP)
        r3 = SimpleCell('user/block/r3.cpp', CPP)

        r4 = SimpleCell('user/block/' + BIICODE_FILE)
        res = {
            r1.name: Resource(r1, Content(None, Blob("hi"))),
            r2.name: Resource(r2, Content(None, Blob("hi"))),
            r3.name: Resource(r3, Content(None, Blob("hi"))),
            r4.name: Resource(r4, Content(None, Blob(my_conf)))
        }
        return BlockHolder(BlockName('user/block'), res)