bool LocationFinder::visitNode(const ASTNode& _node) { if (_node.getLocation().contains(m_location)) { m_bestMatch = &_node; return true; } return false; }
void ASTPrinter::printSourcePart(ASTNode const& _node) { if (m_gasCosts.count(&_node)) *m_ostream << getIndentation() << " Gas costs: " << m_gasCosts.at(&_node) << endl; if (!m_source.empty()) { SourceLocation const& location(_node.getLocation()); *m_ostream << getIndentation() << " Source: " << escaped(m_source.substr(location.start, location.end - location.start), false) << endl; } }