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

Side by Side Diff: frog/leg/frog_leg.dart

Issue 9351020: Implement try/catch without finally, and without type checks. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « frog/leg/compiler.dart ('k') | frog/leg/resolver.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #library('frog_leg'); 5 #library('frog_leg');
6 6
7 #import('../../lib/uri/uri.dart'); 7 #import('../../lib/uri/uri.dart');
8 #import('../lang.dart', prefix: 'frog'); 8 #import('../lang.dart', prefix: 'frog');
9 #import('elements/elements.dart'); 9 #import('elements/elements.dart');
10 #import('io/io.dart', prefix: 'io'); 10 #import('io/io.dart', prefix: 'io');
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 Script script = currentScript(); 100 Script script = currentScript();
101 if (node !== null) { 101 if (node !== null) {
102 print(spanFromNode(node, script).toMessageString("cancel leg: $reason")); 102 print(spanFromNode(node, script).toMessageString("cancel leg: $reason"));
103 } else if (token !== null) { 103 } else if (token !== null) {
104 String tokenString = token.toString(); 104 String tokenString = token.toString();
105 int begin = token.charOffset; 105 int begin = token.charOffset;
106 int end = begin + tokenString.length; 106 int end = begin + tokenString.length;
107 print(script.file.getLocationMessage("cancel leg: $reason", 107 print(script.file.getLocationMessage("cancel leg: $reason",
108 begin, end, true)); 108 begin, end, true));
109 } else if (element !== null) { 109 } else if (element !== null) {
110 currentElement = element; 110 withCurrentElement(element,
111 cancel(reason: reason, token: element.position()); 111 () => cancel(reason: reason, token: element.position()));
112 } 112 }
113 if (throwOnError) { 113 if (throwOnError) {
114 throw new AbortLeg(reason); 114 throw new AbortLeg(reason);
115 } 115 }
116 super.cancel(reason, node, token, instruction); 116 super.cancel(reason, node, token, instruction);
117 } 117 }
118 } 118 }
119 119
120 class AbortLeg { 120 class AbortLeg {
121 final message; 121 final message;
122 AbortLeg(this.message); 122 AbortLeg(this.message);
123 toString() => 'Aborted due to --throw-on-error: $message'; 123 toString() => 'Aborted due to --throw-on-error: $message';
124 } 124 }
OLDNEW
« no previous file with comments | « frog/leg/compiler.dart ('k') | frog/leg/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698