def assignment_action(self, text, loc, assign):
exshared.setpos(loc, text)<EOL>if DEBUG > <NUM_LIT:0>:<EOL><INDENT>print("<STR_LIT>",assign)<EOL>if DEBUG == <NUM_LIT:2>: self.symtab.display()<EOL>if DEBUG > <NUM_LIT:2>: return<EOL><DEDENT>var_index = self.symtab.lookup_symbol(assign.var, [SharedData.KINDS.GLOBAL_VAR, SharedData.KINDS.PARAMETER, SharedData.KINDS.LOCAL_VAR])<EOL>if var_index == None:<EOL><INDENT>raise SemanticException("<STR_LIT>" % assign.var)<EOL><DEDENT>if not self.symtab.same_types(var_index, assign.exp[<NUM_LIT:0>]):<EOL><INDENT>raise SemanticException("<STR_LIT>")<EOL><DEDENT>self.codegen.move(assign.exp[<NUM_LIT:0>], var_index)<EOL>
Code executed after recognising an assignment statement