コード例 #1
0
def get_wasm(program: ast.Program) -> Module:
    visitor = GeneratorAstVisitor()
    wasm = program.accept(visitor)
    return wasm
コード例 #2
0
def get_semantic_analysis(program: ast.Program) -> ast.Program:
    visitor = DeclarationAnalysisVisitor()
    program_with_types = program.accept(visitor)
    return program_with_types