Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: src/sksl/SkSLParser.cpp

Issue 2405383003: added basic dataflow analysis to skslc (Closed)
Patch Set: I have no idea what I was thinking Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/sksl/SkSLIRGenerator.cpp ('k') | src/sksl/SkSLSPIRVCodeGenerator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/sksl/SkSLIRGenerator.cpp ('k') | src/sksl/SkSLSPIRVCodeGenerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698