mirror of
https://github.com/BoardWare-Genius/jarvis-models.git
synced 2025-12-14 17:13:25 +00:00
feat: dotchain
This commit is contained in:
16
src/dotchain/main.py
Normal file
16
src/dotchain/main.py
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
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)
|
||||
Reference in New Issue
Block a user