aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/parsing/ParserBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/parsing/ParserBase.cpp')
-rw-r--r--libsolidity/parsing/ParserBase.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libsolidity/parsing/ParserBase.cpp b/libsolidity/parsing/ParserBase.cpp
index 5b83c5bd..617a1779 100644
--- a/libsolidity/parsing/ParserBase.cpp
+++ b/libsolidity/parsing/ParserBase.cpp
@@ -63,7 +63,7 @@ Token::Value ParserBase::advance()
return m_scanner->next();
}
-void ParserBase::expectToken(Token::Value _value)
+void ParserBase::expectToken(Token::Value _value, bool _advance)
{
Token::Value tok = m_scanner->currentToken();
if (tok != _value)
@@ -98,7 +98,8 @@ void ParserBase::expectToken(Token::Value _value)
string("'")
);
}
- m_scanner->next();
+ if (_advance)
+ m_scanner->next();
}
void ParserBase::increaseRecursionDepth()