aboutsummaryrefslogtreecommitdiffstats
path: root/Parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Parser.cpp')
-rw-r--r--Parser.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/Parser.cpp b/Parser.cpp
index 408aa7bd..3887ac8f 100644
--- a/Parser.cpp
+++ b/Parser.cpp
@@ -536,16 +536,7 @@ ASTPointer<ASTString> Parser::getLiteralAndAdvance()
void Parser::throwExpectationError(std::string const& _description)
{
- //@todo put some of this stuff into ParserError
- int line, column;
- std::tie(line, column) = m_scanner->translatePositionToLineColumn(getPosition());
- std::stringstream buf;
- buf << "Solidity parser error: " << _description
- << " at line " << (line + 1)
- << ", column " << (column + 1) << "\n"
- << m_scanner->getLineAtPosition(getPosition()) << "\n"
- << std::string(column, ' ') << "^";
- BOOST_THROW_EXCEPTION(ParserError() << errinfo_comment(buf.str()));
+ BOOST_THROW_EXCEPTION(ParserError(getPosition(), _description));
}