| 1943 | } |
| 1944 | |
| 1945 | void SymbolScanner::addGlobalSymbol(Symbol *symbol) |
| 1946 | { |
| 1947 | auto findDataTypeIT = m_forwardDeclarations.find(symbol->getName()); |
| 1948 | if (findDataTypeIT != m_forwardDeclarations.end()) |
| 1949 | { |
| 1950 | throw semantic_error(format_string("line %d: Declaring symbol '%s' already declared here '%d'", |
| 1951 | symbol->getFirstLine(), symbol->getName().c_str(), |
| 1952 | findDataTypeIT->second->getFirstLine())); |
| 1953 | } |
| 1954 | m_globals->addSymbol(symbol); |
| 1955 | } |
nothing calls this directly
no test coverage detected