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

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

Issue 10905203: Allow catch part to be optional as in try {} on T [catch (x[,y])] {} (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 8 years, 3 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 | « lib/compiler/implementation/ssa/builder.dart ('k') | lib/compiler/implementation/tree/unparser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/tree/nodes.dart
diff --git a/lib/compiler/implementation/tree/nodes.dart b/lib/compiler/implementation/tree/nodes.dart
index 9cc59532946740808c755eac82d62c4c52e2969c..d8a7ab1ba59b6bb05e0c4a30e53c2fe645c5d66e 100644
--- a/lib/compiler/implementation/tree/nodes.dart
+++ b/lib/compiler/implementation/tree/nodes.dart
@@ -1702,13 +1702,13 @@ class CatchBlock extends Node {
accept(Visitor visitor) => visitor.visitCatchBlock(this);
Node get exception {
- if (formals.nodes.isEmpty()) return null;
+ if (formals === null || formals.nodes.isEmpty()) return null;
VariableDefinitions declarations = formals.nodes.head;
return declarations.definitions.nodes.head;
}
Node get trace {
- if (formals.nodes.isEmpty()) return null;
+ if (formals === null || formals.nodes.isEmpty()) return null;
Link<Node> declarations = formals.nodes.tail;
if (declarations.isEmpty()) return null;
VariableDefinitions head = declarations.head;
@@ -1716,8 +1716,8 @@ class CatchBlock extends Node {
}
visitChildren(Visitor visitor) {
- if (type != null) type.accept(visitor);
- formals.accept(visitor);
+ if (type !== null) type.accept(visitor);
+ if (formals !== null) formals.accept(visitor);
block.accept(visitor);
}
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | lib/compiler/implementation/tree/unparser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698