Пример #1
0
    def cc_compose(self, arguments: list = sys.argv[2:]):
        """Compose C backend action record into a complete C file"""
        parser = argparse.ArgumentParser(
            prog='ti cc_compose', description=f"{self.cc_compose.__doc__}")
        parser.add_argument(
            'fin_name',
            help='Action record YAML file name from C backend, e.g. program.yml'
        )
        parser.add_argument(
            'fout_name', help='The output C source file name, e.g. program.c')
        parser.add_argument(
            'hdrout_name',
            help='The output C header file name, e.g. program.h')
        parser.add_argument(
            '-e',
            '--emscripten',
            required=False,
            default=False,
            dest='emscripten',
            action='store_true',
            help='Generate output C file for Emscripten instead of raw C')
        args = parser.parse_args(arguments)

        cc_compose.main(args.fin_name, args.fout_name, args.hdrout_name,
                        args.emscripten)
Пример #2
0
    def cc_compose(self, arguments: list = sys.argv[2:]):
        """Compose C backend action record into a complete C file"""
        parser = argparse.ArgumentParser(
            prog='ti cc_compose', description=f"{self.cc_compose.__doc__}")
        parser.add_argument(
            'fin_name',
            help='Action record YAML file name from C backend, e.g. program.yml'
        )
        parser.add_argument(
            'fout_name', help='The output C source file name, e.g. program.c')
        parser.add_argument(
            'hdrout_name',
            help='The output C header file name, e.g. program.h')
        args = parser.parse_args(arguments)

        cc_compose.main(args.fin_name, args.fout_name, args.hdrout_name)