aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/psi/execution.py
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2024-02-24 12:48:55 +0800
committer简律纯 <i@jyunko.cn>2024-02-24 12:48:55 +0800
commitae345a2f193a4d6022edda76523a39f6e891843e (patch)
treefbe13a483db44dbb4ac222f1cd29583edda9341f /psi/execution.py
parent9b916be9c8db9eedabde0331aef0cc53b5918b34 (diff)
downloadTRPGNivis-ae345a2f193a4d6022edda76523a39f6e891843e.tar.gz
TRPGNivis-ae345a2f193a4d6022edda76523a39f6e891843e.zip
refactor!: rewrite python package
Diffstat (limited to 'psi/execution.py')
-rw-r--r--psi/execution.py46
1 files changed, 0 insertions, 46 deletions
diff --git a/psi/execution.py b/psi/execution.py
deleted file mode 100644
index 0abdf2c..0000000
--- a/psi/execution.py
+++ /dev/null
@@ -1,46 +0,0 @@
-from psi.parsers import Parser
-from psi.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()