Index: src/sksl/SkSLParser.cpp |
diff --git a/src/sksl/SkSLParser.cpp b/src/sksl/SkSLParser.cpp |
index 29f1dbd1785d425ef638312560272f27c02394ba..9e3e84784bfbc937d408d8a7b341e43c86fa50a8 100644 |
--- a/src/sksl/SkSLParser.cpp |
+++ b/src/sksl/SkSLParser.cpp |
@@ -806,6 +806,7 @@ std::unique_ptr<ASTForStatement> Parser::forStatement() { |
Token nextToken = this->peek(); |
switch (nextToken.fKind) { |
case Token::SEMICOLON: |
+ this->nextToken(); |
break; |
case Token::CONST: |
initializer = std::unique_ptr<ASTStatement>(new ASTVarDeclarationStatement( |
@@ -832,7 +833,7 @@ std::unique_ptr<ASTForStatement> Parser::forStatement() { |
return nullptr; |
} |
std::unique_ptr<ASTExpression> next; |
- if (this->peek().fKind != Token::SEMICOLON) { |
+ if (this->peek().fKind != Token::RPAREN) { |
next = this->expression(); |
if (!next) { |
return nullptr; |