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

Unified Diff: dart/frog/leg/frog_leg.dart

Issue 9117033: Setup getter and setter elements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 11 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 | « dart/frog/leg/emitter.dart ('k') | dart/frog/leg/scanner/class_element_parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/frog_leg.dart
diff --git a/dart/frog/leg/frog_leg.dart b/dart/frog/leg/frog_leg.dart
index f1febacfc067cfc7fe6d885bedb1b329c4ae296a..3dbfce1a2c4b8261a01acd30426323ad8cd5494c 100644
--- a/dart/frog/leg/frog_leg.dart
+++ b/dart/frog/leg/frog_leg.dart
@@ -91,16 +91,23 @@ class WorldCompiler extends Compiler {
String get legDirectory() => io.join([frog.options.libDir, '..', 'leg']);
- void cancel([String reason, Node node, token, instruction]) {
+ void cancel([String reason, Node node, token, instruction, element]) {
Script script = currentScript();
if (node !== null) {
print(spanFromNode(node, script).toMessageString("cancel leg: $reason"));
- } else if (token !== null) {
- String tokenString = token.toString();
- int begin = token.charOffset;
- int end = begin + tokenString.length;
- print(script.file.getLocationMessage("cancel leg: $reason",
- begin, end, true));
+ } else {
+ if (token === null && element !== null) {
ahe 2012/01/24 16:01:35 This is way too complicated. I have made a better
+ currentElement = element;
+ script = currentScript();
+ token = element.position();
+ }
+ if (token !== null) {
+ String tokenString = token.toString();
+ int begin = token.charOffset;
+ int end = begin + tokenString.length;
+ print(script.file.getLocationMessage("cancel leg: $reason",
+ begin, end, true));
+ }
}
if (throwOnError) {
throw new AbortLeg(reason);
« no previous file with comments | « dart/frog/leg/emitter.dart ('k') | dart/frog/leg/scanner/class_element_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698