Chromium Code Reviews| Index: frog/leg/tree/nodes.dart |
| =================================================================== |
| --- frog/leg/tree/nodes.dart (revision 5017) |
| +++ frog/leg/tree/nodes.dart (working copy) |
| @@ -1660,6 +1660,20 @@ |
| accept(Visitor visitor) => visitor.visitCatchBlock(this); |
| + Node get exception() { |
| + if (formals.nodes.isEmpty()) return null; |
|
ahe
2012/03/06 12:24:07
Perhaps you should check if this returns null in t
ngeoffray
2012/03/06 12:29:40
It's already doing it.
|
| + VariableDefinitions declarations = formals.nodes.head; |
| + return declarations.definitions.nodes.head; |
| + } |
| + |
| + Node get trace() { |
| + if (formals.nodes.isEmpty()) return null; |
| + Link<VariableDefinitions> declarations = formals.nodes.tail; |
| + return declarations.isEmpty() |
| + ? null |
| + : declarations.head.definitions.nodes.head; |
| + } |
| + |
| visitChildren(Visitor visitor) { |
| formals.accept(visitor); |
| block.accept(visitor); |