Exemplo n.º 1
0
    def _parse_file(self, app, name, source):
        app_name = name[:-4]

        parser = ZmeiParser()

        parser.parse_string(source)

        return app_name, parser
Exemplo n.º 2
0
    def _parse_file(self, app, name, source):
        extension = name[-3:]
        app_name = name[:-4]

        if extension == "col":
            parser = ZmeiParser()
        elif extension == "hcl":
            parser = HclParser()
        else:
            raise NotImplementedError(
                f"Not supported file extension: .{extension}")

        parser.parse_string(source)

        return app_name, parser
Exemplo n.º 3
0
def _(code):
    parser = ZmeiParser()
    parser.parse_string(dedent(code))
    return parser.populate_application('example')