/////////////////////////////////////////////////////////////////////////// Code ///////////////////////////////////////////////////////////////////////////
| 31 | // Code |
| 32 | //////////////////////////////////////////////////////////////////////////////// |
| 33 | void SymbolScanner::handleRoot(AstNode *node, bottom_up) |
| 34 | { |
| 35 | (void)node; |
| 36 | if (m_forwardDeclarations.size() != 0) |
| 37 | { |
| 38 | string forwardTypes; |
| 39 | for (auto it = m_forwardDeclarations.begin(); it != m_forwardDeclarations.end(); ++it) |
| 40 | { |
| 41 | if (it != m_forwardDeclarations.begin()) |
| 42 | { |
| 43 | forwardTypes += ", "; |
| 44 | } |
| 45 | forwardTypes += format_string("type name %s: line %d", it->first.c_str(), it->second->getFirstLine()); |
| 46 | } |
| 47 | throw syntax_error(format_string("Missing type definitions for one or more forward type declarations: %s", |
| 48 | forwardTypes.c_str())); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | AstNode *SymbolScanner::handleConst(AstNode *node, bottom_up) |
| 53 | { |
nothing calls this directly
no test coverage detected