Commit a95b6503 authored by Nils Kohl's avatar Nils Kohl 🌝 Committed by Martin Bauer
Browse files

Fix: undefined_symbols property was wrong in CustomCodeNode

parent 4f43b51a
...@@ -67,8 +67,8 @@ class CustomCodeNode(Node): ...@@ -67,8 +67,8 @@ class CustomCodeNode(Node):
def __init__(self, code, symbols_read, symbols_defined, parent=None): def __init__(self, code, symbols_read, symbols_defined, parent=None):
super(CustomCodeNode, self).__init__(parent=parent) super(CustomCodeNode, self).__init__(parent=parent)
self._code = "\n" + code self._code = "\n" + code
self._symbolsRead = set(symbols_read) self._symbols_read = set(symbols_read)
self._symbolsDefined = set(symbols_defined) self._symbols_defined = set(symbols_defined)
self.headers = [] self.headers = []
def get_code(self, dialect, vector_instruction_set): def get_code(self, dialect, vector_instruction_set):
...@@ -80,11 +80,11 @@ class CustomCodeNode(Node): ...@@ -80,11 +80,11 @@ class CustomCodeNode(Node):
@property @property
def symbols_defined(self): def symbols_defined(self):
return self._symbolsDefined return self._symbols_defined
@property @property
def undefined_symbols(self): def undefined_symbols(self):
return self.symbols_defined - self._symbolsRead return self._symbols_read - self._symbols_defined
class PrintNode(CustomCodeNode): class PrintNode(CustomCodeNode):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment