diff options
| author | 2023-07-23 15:28:55 +0800 | |
|---|---|---|
| committer | 2023-07-23 15:28:55 +0800 | |
| commit | 8e79582d3a340ede3337759c5be06234689ccf4e (patch) | |
| tree | 4808937a5da1248c03d3d8ee2f0e2f569ed05bb2 /psi/execution.py | |
| parent | dfa7eb4530d4b4062db8427a5b1b32ea5af7fb40 (diff) | |
| download | TRPGNivis-8e79582d3a340ede3337759c5be06234689ccf4e.tar.gz TRPGNivis-8e79582d3a340ede3337759c5be06234689ccf4e.zip | |
😎BREAKING CHANGES
Diffstat (limited to 'psi/execution.py')
| -rw-r--r-- | psi/execution.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/psi/execution.py b/psi/execution.py index 8b13789..052f7ab 100644 --- a/psi/execution.py +++ b/psi/execution.py @@ -1 +1,17 @@ +from psi.parsers import Parser +from psi.interpreter import Interpreter +__all__ = ['Execution'] + +class Execution: + def __init__(self, input): + self.input = input + + def execute(self): + parser = Parser(self.input) + ast = parser.parse() + + interpreter = Interpreter(ast) + result = interpreter.interpret() + + return result |
