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

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

Issue 9424027: Implement Date. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
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 | « no previous file | dart/frog/leg/lib/coreimpl.dart » ('j') | dart/frog/leg/lib/mockimpl.dart » ('J')
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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } else if (element !== null) { 110 } else if (element !== null) {
111 if (element.position() === null) { 111 if (element.position() === null) {
112 // Sometimes, the backend fakes up elements that have no 112 // Sometimes, the backend fakes up elements that have no
113 // position. So we use the enclosing element instead. It is 113 // position. So we use the enclosing element instead. It is
114 // not a good error location, but cancel really is "internal 114 // not a good error location, but cancel really is "internal
115 // error" or "not implemented yet", so the vicinity is good 115 // error" or "not implemented yet", so the vicinity is good
116 // enough for now. 116 // enough for now.
117 element = element.enclosingElement; 117 element = element.enclosingElement;
118 // TODO(ahe): I plan to overhaul this infrastructure anyways. 118 // TODO(ahe): I plan to overhaul this infrastructure anyways.
119 } 119 }
120 withCurrentElement(element, 120 if (element !== null) {
121 () => cancel(reason: reason, token: element.position())); 121 withCurrentElement(element,
122 () => cancel(reason: reason, token: element.position()));
123 }
124 } else if (currentElement !== null) {
125 cancel(reason, element: currentElement);
126 return;
kasperl 2012/02/21 07:23:30 We usually do not return after a cancel.
122 } 127 }
123 if (throwOnError) { 128 if (throwOnError) {
124 throw new AbortLeg(reason); 129 throw new AbortLeg(reason);
125 } 130 }
126 super.cancel(reason, node, token, instruction); 131 super.cancel(reason, node, token, instruction);
127 } 132 }
128 } 133 }
129 134
130 class AbortLeg { 135 class AbortLeg {
131 final message; 136 final message;
132 AbortLeg(this.message); 137 AbortLeg(this.message);
133 toString() => 'Aborted due to --throw-on-error: $message'; 138 toString() => 'Aborted due to --throw-on-error: $message';
134 } 139 }
OLDNEW
« no previous file with comments | « no previous file | dart/frog/leg/lib/coreimpl.dart » ('j') | dart/frog/leg/lib/mockimpl.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698