IT WORKSSSS, WE'RE ACCESSING THE ARGS!!!!!
This commit is contained in:
@@ -31,7 +31,7 @@ class Generator:
|
||||
self.current_var_scope = self.global_scope
|
||||
self.constants = {}
|
||||
self.structs = {}
|
||||
self.functions: dict[str, FunctionNode] = {}
|
||||
self.functions: dict[str, dict] = {}
|
||||
self.labels = []
|
||||
self.arg_list = []
|
||||
self.constants_reverse = {}
|
||||
@@ -58,7 +58,11 @@ class Generator:
|
||||
return "[.LC" + str(self.constant_counter-1) + "]"
|
||||
|
||||
def add_function(self, node: FunctionNode):
|
||||
self.functions[node.name] = node
|
||||
self.functions[node.name] = {
|
||||
"func": node,
|
||||
"scope": SymbolTable(self.current_var_scope)
|
||||
}
|
||||
return self.functions[node.name]
|
||||
|
||||
def clamp_instruction_args(self, instruction: InstructionNode, min_args: int, max_args: int):
|
||||
if len(instruction.arguments) < min_args:
|
||||
|
Reference in New Issue
Block a user