| 33 | namespace SURELOG { |
| 34 | |
| 35 | std::string VObject::print(SymbolTable* symbols, NodeId uniqueId, |
| 36 | PathId definitionFile, PathId printedFile) const { |
| 37 | std::string text; |
| 38 | const std::string_view symbol = symbols->getSymbol(m_name); |
| 39 | if (symbol == SymbolTable::getBadSymbol()) { |
| 40 | StrAppend(&text, "n<>"); |
| 41 | } else { |
| 42 | StrAppend(&text, "n<", symbol, ">"); |
| 43 | } |
| 44 | StrAppend(&text, " u<", uniqueId, "> "); |
| 45 | StrAppend(&text, "t<", getTypeName(m_type).substr(2), ">"); |
| 46 | if (m_parent) StrAppend(&text, " p<", m_parent, ">"); |
| 47 | if (m_definition) StrAppend(&text, " d<", m_definition, ">"); |
| 48 | if (definitionFile) StrAppend(&text, " df<", definitionFile, ">"); |
| 49 | if (m_child) StrAppend(&text, " c<", m_child, ">"); |
| 50 | if (m_sibling) StrAppend(&text, " s<", m_sibling, ">"); |
| 51 | |
| 52 | StrAppend(&text, " "); |
| 53 | if (printedFile != m_fileId) StrAppend(&text, "f<", m_fileId, "> "); |
| 54 | |
| 55 | StrAppend(&text, "l<", m_line, ":", m_column, ">"); |
| 56 | if (m_endLine) StrAppend(&text, " el<", m_endLine, ":", m_endColumn, ">"); |
| 57 | |
| 58 | return text; |
| 59 | } |
| 60 | } // namespace SURELOG |
no test coverage detected