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

Unified Diff: pkg/front_end/lib/src/fasta/parser/parser.dart

Issue 2747803004: Parse assert statements with Fasta. (Closed)
Patch Set: Created 3 years, 9 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 | « pkg/front_end/lib/src/fasta/parser/listener.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/parser/parser.dart
diff --git a/pkg/front_end/lib/src/fasta/parser/parser.dart b/pkg/front_end/lib/src/fasta/parser/parser.dart
index 1f3c4776c62ef57f1d9c28bdd6ca5ad6e53f50d9..34bc5878ba0da1f8b8c345255339f5427b5bca69 100644
--- a/pkg/front_end/lib/src/fasta/parser/parser.dart
+++ b/pkg/front_end/lib/src/fasta/parser/parser.dart
@@ -3507,6 +3507,7 @@ class Parser {
Token assertKeyword = token;
Token commaToken = null;
token = expect('assert', token);
+ Token leftParenthesis = token;
token = expect('(', token);
bool old = mayParseFunctionExpressions;
mayParseFunctionExpressions = true;
@@ -3516,9 +3517,11 @@ class Parser {
token = token.next;
token = parseExpression(token);
}
+ Token rightParenthesis = token;
token = expect(')', token);
mayParseFunctionExpressions = old;
- listener.handleAssertStatement(assertKeyword, commaToken, token);
+ listener.handleAssertStatement(
+ assertKeyword, leftParenthesis, commaToken, rightParenthesis, token);
return expectSemicolon(token);
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser/listener.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698