fixing quite a few bugs
This commit is contained in:
@@ -52,11 +52,11 @@ class Generator:
|
||||
|
||||
def add_constant(self, value: Any, no_string: bool = False):
|
||||
existing_constant_name = self.constants_reverse.get(value, None)
|
||||
if existing_constant_name != None: return f"[.{existing_constant_name}]"
|
||||
if existing_constant_name != None: return f"[{existing_constant_name}]"
|
||||
self.constants["LC" + str(self.constant_counter)] = {"value": value, "no_string": no_string}
|
||||
self.constants_reverse[value] = "LC" + str(self.constant_counter)
|
||||
self.constant_counter += 1
|
||||
return "[.LC" + str(self.constant_counter-1) + "]"
|
||||
return "[LC" + str(self.constant_counter-1) + "]"
|
||||
|
||||
def add_function(self, node: FunctionNode):
|
||||
self.functions[node.name] = {
|
||||
|
Reference in New Issue
Block a user