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

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

Issue 9359039: Source in most stuff. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased 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 | « dart/frog/leg/elements/elements.dart ('k') | dart/frog/leg/lib/core.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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 final end = node.getEndToken(); 52 final end = node.getEndToken();
53 if (begin === null || end === null) { 53 if (begin === null || end === null) {
54 cancel('cannot find tokens to produce error message for $node.'); 54 cancel('cannot find tokens to produce error message for $node.');
55 } 55 }
56 final startOffset = begin.charOffset; 56 final startOffset = begin.charOffset;
57 final endOffset = end.charOffset + end.toString().length; 57 final endOffset = end.charOffset + end.toString().length;
58 return new frog.SourceSpan(current.file, startOffset, endOffset); 58 return new frog.SourceSpan(current.file, startOffset, endOffset);
59 } 59 }
60 60
61 currentScript() { 61 currentScript() {
62 if (currentElement === null) return null;
62 CompilationUnitElement compilationUnit = 63 CompilationUnitElement compilationUnit =
63 currentElement.getCompilationUnit(); 64 currentElement.getCompilationUnit();
64 if (compilationUnit === null) return null; 65 if (compilationUnit === null) return null;
65 return compilationUnit.script; 66 return compilationUnit.script;
66 } 67 }
67 68
68 reportWarning(Node node, var message) { 69 reportWarning(Node node, var message) {
69 frog.SourceSpan span; 70 frog.SourceSpan span;
70 Script current = currentScript(); 71 Script current = currentScript();
71 if (current === null) { 72 if (current === null) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } 116 }
116 super.cancel(reason, node, token, instruction); 117 super.cancel(reason, node, token, instruction);
117 } 118 }
118 } 119 }
119 120
120 class AbortLeg { 121 class AbortLeg {
121 final message; 122 final message;
122 AbortLeg(this.message); 123 AbortLeg(this.message);
123 toString() => 'Aborted due to --throw-on-error: $message'; 124 toString() => 'Aborted due to --throw-on-error: $message';
124 } 125 }
OLDNEW
« no previous file with comments | « dart/frog/leg/elements/elements.dart ('k') | dart/frog/leg/lib/core.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698