From f2317670faf1984fe1b92696a50439bd0b33d39b Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 25 Aug 2017 14:24:07 +0100 Subject: Remove two other fall-through cases in Parser --- libsolidity/parsing/Parser.cpp | 6 ++++-- 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 Parser::parseStatement() { statement = ASTNodeFactory(*this).createNode(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); -- cgit