17 lines
319 B
Python
17 lines
319 B
Python
"""
|
|
Utility functions
|
|
"""
|
|
|
|
import ast
|
|
|
|
from .ourlang import OurVisitor, Module
|
|
|
|
def our_process(source: str, input_name: str) -> Module:
|
|
"""
|
|
Processes the python code into web assembly code
|
|
"""
|
|
res = ast.parse(source, input_name)
|
|
|
|
our_visitor = OurVisitor()
|
|
return our_visitor.visit_Module(res)
|