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

Unified Diff: pkg/compiler/lib/src/dart_backend/backend_ast_nodes.dart

Issue 923013002: dart2dart: Implementation of simple try/catch. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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: pkg/compiler/lib/src/dart_backend/backend_ast_nodes.dart
diff --git a/pkg/compiler/lib/src/dart_backend/backend_ast_nodes.dart b/pkg/compiler/lib/src/dart_backend/backend_ast_nodes.dart
index f9292a555c652c201ded9b12d7ed1fdb457bcdd4..ba21ccbd942adbb99ef0f13c6d1d2e65ef2675b5 100644
--- a/pkg/compiler/lib/src/dart_backend/backend_ast_nodes.dart
+++ b/pkg/compiler/lib/src/dart_backend/backend_ast_nodes.dart
@@ -207,8 +207,8 @@ class Try extends Statement {
class CatchBlock extends Node {
final TypeAnnotation onType;
- final String exceptionVar;
- final String stackVar;
+ final VariableDeclaration exceptionVar;
+ final VariableDeclaration stackVar;
final Statement body;
/// At least onType or exceptionVar must be given.
@@ -1210,10 +1210,10 @@ class Unparser {
}
if (block.exceptionVar != null) {
write('catch(');
- write(block.exceptionVar);
+ write(block.exceptionVar.name);
if (block.stackVar != null) {
write(',');
- write(block.stackVar);
+ write(block.stackVar.name);
}
write(')');
}

Powered by Google App Engine
This is Rietveld 408576698