diff options
| author | 2024-02-28 11:37:54 +0800 | |
|---|---|---|
| committer | 2024-02-28 11:37:54 +0800 | |
| commit | 672e0d03d3ffdba740d166f2c4a7243f142cec5f (patch) | |
| tree | 46cdb4ea015877e7828710a47c945aa2e834beb0 /nivis/execution.py | |
| parent | fc6fc64ca3ff7df62dd270fc021f674e56b2dedf (diff) | |
| download | TRPGNivis-672e0d03d3ffdba740d166f2c4a7243f142cec5f.tar.gz TRPGNivis-672e0d03d3ffdba740d166f2c4a7243f142cec5f.zip | |
refactor!: built in rust
Diffstat (limited to 'nivis/execution.py')
| -rw-r--r-- | nivis/execution.py | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/nivis/execution.py b/nivis/execution.py deleted file mode 100644 index 09055cf..0000000 --- a/nivis/execution.py +++ /dev/null @@ -1,47 +0,0 @@ -from .parsers import Parser -from .interpreter import Interpreter - -__all__ = ["Execution"] - - -class Execution: - """ - A class representing the execution of Psi code. - - Args: - input: The input code to be executed. - - Returns: - None - - Example: - ```python - execution = Execution("print('Hello, World!')") - execution.execute() - ``` - """ - - def __init__(self, input): - """ - Initializes an Execution object. - - Args: - input: The input code to be executed. - - Returns: - None - """ - self.input = input - - def execute(self): - """ - Executes the input code. - - Returns: - The result of the execution. - """ - parser = Parser(self.input) - ast = parser.parse() - - interpreter = Interpreter(ast) - return interpreter.interpret() |
