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

Unified Diff: sdk/lib/_internal/compiler/implementation/tree/nodes.dart

Issue 11497009: Revive throw as an expression but not for rethrow. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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
Index: sdk/lib/_internal/compiler/implementation/tree/nodes.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/tree/nodes.dart (revision 15894)
+++ sdk/lib/_internal/compiler/implementation/tree/nodes.dart (working copy)
@@ -72,7 +72,7 @@
}
R visitSwitchCase(SwitchCase node) => visitNode(node);
R visitSwitchStatement(SwitchStatement node) => visitStatement(node);
- R visitThrow(Throw node) => visitStatement(node);
+ R visitThrow(Throw node) => visitExpression(node);
R visitTryStatement(TryStatement node) => visitStatement(node);
R visitTypeAnnotation(TypeAnnotation node) => visitNode(node);
R visitTypedef(Typedef node) => visitNode(node);
@@ -940,7 +940,7 @@
Token getEndToken() => endToken;
}
-class Throw extends Statement {
+class Throw extends Expression {
final Expression expression;
final Token throwToken;

Powered by Google App Engine
This is Rietveld 408576698