diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-04-18 20:29:44 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-05-04 20:11:23 +0800 |
commit | 252bde8542222953f4432c166d83ba6775a546da (patch) | |
tree | 65f823ba8ec935c2023b603099465aab934d2b23 /libsolidity/parsing/ParserBase.cpp | |
parent | e3279d8af89c9b5e99e6bca206cb5ce6ef5b0291 (diff) | |
download | dexon-solidity-252bde8542222953f4432c166d83ba6775a546da.tar dexon-solidity-252bde8542222953f4432c166d83ba6775a546da.tar.gz dexon-solidity-252bde8542222953f4432c166d83ba6775a546da.tar.bz2 dexon-solidity-252bde8542222953f4432c166d83ba6775a546da.tar.lz dexon-solidity-252bde8542222953f4432c166d83ba6775a546da.tar.xz dexon-solidity-252bde8542222953f4432c166d83ba6775a546da.tar.zst dexon-solidity-252bde8542222953f4432c166d83ba6775a546da.zip |
Introduce Token::friendlyName() helper
Diffstat (limited to 'libsolidity/parsing/ParserBase.cpp')
-rw-r--r-- | libsolidity/parsing/ParserBase.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libsolidity/parsing/ParserBase.cpp b/libsolidity/parsing/ParserBase.cpp index 1dd3bdd2..797dea71 100644 --- a/libsolidity/parsing/ParserBase.cpp +++ b/libsolidity/parsing/ParserBase.cpp @@ -72,9 +72,9 @@ void ParserBase::expectToken(Token::Value _value, bool _advance) { fatalParserError( string("Expected '") + - string(Token::toString(_value)) + + Token::friendlyName(_value) + string("' but got reserved keyword '") + - string(Token::toString(tok)) + + Token::friendlyName(tok) + string("'") ); } @@ -83,7 +83,7 @@ void ParserBase::expectToken(Token::Value _value, bool _advance) ElementaryTypeNameToken elemTypeName = m_scanner->currentElementaryTypeNameToken(); fatalParserError( string("Expected '") + - string(Token::toString(_value)) + + Token::friendlyName(_value) + string("' but got '") + elemTypeName.toString() + string("'") @@ -92,9 +92,9 @@ void ParserBase::expectToken(Token::Value _value, bool _advance) else fatalParserError( string("Expected '") + - string(Token::toString(_value)) + + Token::friendlyName(_value) + string("' but got '") + - string(Token::toString(m_scanner->currentToken())) + + Token::friendlyName(tok) + string("'") ); } |