aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/psi/execution.py
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2023-09-28 00:09:06 +0800
committer简律纯 <i@jyunko.cn>2023-09-28 00:09:06 +0800
commit719b598e98baff2cf5ea34bb6d36eddd8fd29f38 (patch)
tree5ec396376f3e85d10cd14a7222979105060b3926 /src/psi/execution.py
parentf0853a78a84205e7e3a6f0f3f5960750127044c6 (diff)
downloadTRPGNivis-719b598e98baff2cf5ea34bb6d36eddd8fd29f38.tar.gz
TRPGNivis-719b598e98baff2cf5ea34bb6d36eddd8fd29f38.zip
feat(src): delete `src` dir & rename `psi` dir
feat(frame): 添加`Lib` `Grammar` `Modules` 目录
Diffstat (limited to 'src/psi/execution.py')
-rw-r--r--src/psi/execution.py46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/psi/execution.py b/src/psi/execution.py
deleted file mode 100644
index 0abdf2c..0000000
--- a/src/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()