Added basic implementation for Python code evaluation
This commit is contained in:
@@ -12,6 +12,8 @@ class PythonErrorNode(ErrorNode):
|
||||
source: str
|
||||
exception: Exception
|
||||
|
||||
def __post_init__(self):
|
||||
log.debug("-> PythonErrorNode: " + str(self.exception))
|
||||
|
||||
@dataclass()
|
||||
class PythonNode(Node):
|
||||
@@ -41,6 +43,8 @@ class PythonParser(BaseParser):
|
||||
error_node = PythonErrorNode(self.text, error)
|
||||
self.error_sink.append(error_node)
|
||||
return error_node
|
||||
|
||||
log.debug("Recognized python code.")
|
||||
return PythonNode(self.text, tree)
|
||||
|
||||
def try_parse_expression(self):
|
||||
|
||||
Reference in New Issue
Block a user