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

Method VisitFunctionDefinition

avida-core/source/script/cDumpASTVisitor.cc:215–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213
214
215void cDumpASTVisitor::VisitFunctionDefinition(cASTFunctionDefinition& node)
216{
217 indent();
218 cout << (node.GetCode() ? "":"@") << "function: " << mapType(node.GetType()) << " " << node.GetName() << "(";
219 if (node.GetArguments()->GetSize()) {
220 cout << endl;
221 node.GetArguments()->Accept(*this);
222 indent();
223 }
224 cout << ")" << endl;
225
226 if (node.GetCode()) {
227 indent();
228 cout << "{" << endl;
229
230 m_depth++;
231 node.GetCode()->Accept(*this);
232 m_depth--;
233
234 indent();
235 cout << "}" << endl;
236 }
237}
238
239
240void cDumpASTVisitor::VisitVariableDefinition(cASTVariableDefinition& node)

Callers 1

AcceptMethod · 0.45

Calls 6

AcceptMethod · 0.80
GetCodeMethod · 0.45
GetTypeMethod · 0.45
GetNameMethod · 0.45
GetSizeMethod · 0.45
GetArgumentsMethod · 0.45

Tested by

no test coverage detected