MCPcopy Create free account
hub / github.com/devosoft/avida / VisitAssignment

Method VisitAssignment

avida-core/source/script/cSemanticASTVisitor.cc:85–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83
84
85void cSemanticASTVisitor::VisitAssignment(cASTAssignment& node)
86{
87 node.GetExpression()->Accept(*this);
88 int var_id = -1;
89 bool global = false;
90 if (lookupVariable(node.GetVariable(), var_id, global)) {
91 checkCast(node.GetExpression()->GetType(), (global ? m_global_symtbl : m_cur_symtbl)->GetVariableType(var_id));
92 node.SetVar(var_id, global);
93 } else {
94 SEMANTIC_ERROR(VARIABLE_UNDEFINED, (const char*)node.GetVariable());
95 }
96}
97
98
99void cSemanticASTVisitor::VisitArgumentList(cASTArgumentList& node)

Callers

nothing calls this directly

Calls 5

AcceptMethod · 0.80
GetVariableMethod · 0.80
GetExpressionMethod · 0.45
GetTypeMethod · 0.45
SetVarMethod · 0.45

Tested by

no test coverage detected