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

Unified Diff: pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart

Issue 2730293003: Fix for parsing 'rethrow' statement 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/analyzer/test/generated/parser_fasta_test.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/analyzer/ast_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart b/pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart
index 1328100c04bec731b049664377213bf165df956f..c8d18058cb7747c922e735e4b9ec35c704bc4d92 100644
--- a/pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart
+++ b/pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart
@@ -566,6 +566,15 @@ class AstBuilder extends ScopeListener {
thenExpression, toAnalyzerToken(colon), elseExpression));
}
+ @override
+ void endRethrowStatement(Token throwToken, Token endToken) {
Brian Wilkerson 2017/03/06 19:47:28 "throwToken" --> "rethrowToken"?
+ debugEvent("RethrowStatement");
+ RethrowExpression expression =
+ ast.rethrowExpression(toAnalyzerToken(throwToken));
+ // TODO(scheglov) According to the specification, 'rethrow' is a statement.
+ push(ast.expressionStatement(expression, toAnalyzerToken(endToken)));
+ }
+
void endThrowExpression(Token throwToken, Token endToken) {
debugEvent("ThrowExpression");
push(ast.throwExpression(toAnalyzerToken(throwToken), pop()));
« no previous file with comments | « pkg/analyzer/test/generated/parser_fasta_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698