mirror of
https://github.com/BoardWare-Genius/jarvis-models.git
synced 2025-12-14 00:53:25 +00:00
16 lines
383 B
Python
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) |