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

Unified Diff: frog/leg/tree/nodes.dart

Issue 9601014: Support for stack traces in catch blocks. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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
Index: frog/leg/tree/nodes.dart
===================================================================
--- frog/leg/tree/nodes.dart (revision 4945)
+++ frog/leg/tree/nodes.dart (working copy)
@@ -1591,6 +1591,18 @@
accept(Visitor visitor) => visitor.visitCatchBlock(this);
+ Node get exception() {
+ VariableDefinitions declarations = formals.nodes.head;
ahe 2012/03/06 08:44:22 This may be null. The parser accepts: try {} catc
ngeoffray 2012/03/06 12:12:50 Done.
+ return declarations.definitions.nodes.head;
+ }
+
+ Node get trace() {
+ Link<VariableDefinitions> declarations = formals.nodes.tail;
ahe 2012/03/06 08:44:22 See comment above.
ngeoffray 2012/03/06 12:12:50 Done.
+ return declarations.isEmpty()
+ ? null
+ : declarations.head.definitions.nodes.head;
+ }
+
visitChildren(Visitor visitor) {
formals.accept(visitor);
block.accept(visitor);

Powered by Google App Engine
This is Rietveld 408576698