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

Unified Diff: lib/compiler/implementation/scanner/listener.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/resolver.dart ('k') | lib/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/scanner/listener.dart
diff --git a/lib/compiler/implementation/scanner/listener.dart b/lib/compiler/implementation/scanner/listener.dart
index 1b549f898e7922fed8a4ff5ae75149c1b1c325a2..da74a9c70226cbfc6b9aad571c0db2899cab3d42 100644
--- a/lib/compiler/implementation/scanner/listener.dart
+++ b/lib/compiler/implementation/scanner/listener.dart
@@ -1429,8 +1429,8 @@ class NodeListener extends ElementListener {
void handleCatchBlock(Token onKeyword, Token catchKeyword) {
Block block = popNode();
- NodeList formals = popNode();
- TypeAnnotation type = onKeyword != null ? popNode() : null;
+ NodeList formals = catchKeyword !== null? popNode(): null;
+ TypeAnnotation type = onKeyword !== null ? popNode() : null;
pushNode(new CatchBlock(type, formals, block, onKeyword, catchKeyword));
}
« no previous file with comments | « lib/compiler/implementation/resolver.dart ('k') | lib/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698