Files
jarvis-models/src/dotchain/main.py
2024-08-01 11:33:09 +08:00

16 lines
383 B
Python

from runtime.interpreter import program_parser
from runtime.runtime import Runtime
from runtime.tokenizer import Tokenizer
script = """
print(hello);
"""
if __name__ == "__main__":
t = Tokenizer()
t.init(script)
runtime = Runtime(context={"hello": [1,2,3,4], "good": "123"} ,exteral_fun={"print": print})
ast = program_parser(t)
result = ast.exec(runtime)