Remove two other fall-through cases in Parser

This commit is contained in:
Alex Beregszaszi 2017-08-25 14:24:07 +01:00
parent ef8355da7f
commit f2317670fa
2 changed files with 5 additions and 3 deletions

View File

@ -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;

View File

@ -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);