diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-25 21:24:07 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-25 21:24:07 +0800 |
commit | f2317670faf1984fe1b92696a50439bd0b33d39b (patch) | |
tree | 59f60445acf78a9322a833283bf5de9eaa336998 /libsolidity/parsing | |
parent | ef8355da7f301253303743187d00498791399ab3 (diff) | |
download | dexon-solidity-f2317670faf1984fe1b92696a50439bd0b33d39b.tar.gz dexon-solidity-f2317670faf1984fe1b92696a50439bd0b33d39b.tar.zst dexon-solidity-f2317670faf1984fe1b92696a50439bd0b33d39b.zip |
Remove two other fall-through cases in Parser
Diffstat (limited to 'libsolidity/parsing')
-rw-r--r-- | libsolidity/parsing/Parser.cpp | 6 | ||||
-rw-r--r-- | libsolidity/parsing/Scanner.cpp | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp index 2f28db3e..8429bf79 100644 --- a/libsolidity/parsing/Parser.cpp +++ b/libsolidity/parsing/Parser.cpp @@ -903,11 +903,13 @@ ASTPointer<Statement> Parser::parseStatement() { statement = ASTNodeFactory(*this).createNode<PlaceholderStatement>(docString); m_scanner->next(); - break; } - // fall-through + else + statement = parseSimpleStatement(docString); + break; default: statement = parseSimpleStatement(docString); + break; } expectToken(Token::Semicolon); return statement; diff --git a/libsolidity/parsing/Scanner.cpp b/libsolidity/parsing/Scanner.cpp index fdca23ea..6541f6c2 100644 --- a/libsolidity/parsing/Scanner.cpp +++ b/libsolidity/parsing/Scanner.cpp @@ -435,7 +435,7 @@ void Scanner::scanToken() m_nextToken.location.start = sourcePos(); switch (m_char) { - case '\n': // fall-through + case '\n': case ' ': case '\t': token = selectToken(Token::Whitespace); |