| 213 | |
| 214 | |
| 215 | void 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 | |
| 240 | void cDumpASTVisitor::VisitVariableDefinition(cASTVariableDefinition& node) |