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

Side by Side Diff: pkg/compiler/lib/src/elements/modelx.dart

Issue 1205373002: Translate package URIs to resource URIs for diagnostics. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Use resourceUri instead of readableUri in source spans. Created 5 years, 5 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
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/mirrors/dart2js_mirrors.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 elements.modelx; 5 library elements.modelx;
6 6
7 import 'common.dart'; 7 import 'common.dart';
8 import 'elements.dart'; 8 import 'elements.dart';
9 import '../constants/expressions.dart'; 9 import '../constants/expressions.dart';
10 import '../constants/constructors.dart'; 10 import '../constants/constructors.dart';
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 bool get isAssignable { 107 bool get isAssignable {
108 if (isFinal || isConst) return false; 108 if (isFinal || isConst) return false;
109 if (isFunction || isGenerativeConstructor) return false; 109 if (isFunction || isGenerativeConstructor) return false;
110 return true; 110 return true;
111 } 111 }
112 112
113 Token get position => null; 113 Token get position => null;
114 114
115 SourceSpan get sourcePosition { 115 SourceSpan get sourcePosition {
116 if (position == null) return null; 116 if (position == null) return null;
117 Uri uri = compilationUnit.script.readableUri; 117 Uri uri = compilationUnit.script.resourceUri;
118 return new SourceSpan( 118 return new SourceSpan(
119 uri, position.charOffset, position.charOffset + position.charCount); 119 uri, position.charOffset, position.charOffset + position.charCount);
120 } 120 }
121 121
122 Token findMyName(Token token) { 122 Token findMyName(Token token) {
123 return findNameToken(token, isConstructor, name, enclosingElement.name); 123 return findNameToken(token, isConstructor, name, enclosingElement.name);
124 } 124 }
125 125
126 static Token findNameToken(Token token, bool isConstructor, String name, 126 static Token findNameToken(Token token, bool isConstructor, String name,
127 String enclosingClassName) { 127 String enclosingClassName) {
(...skipping 2767 matching lines...) Expand 10 before | Expand all | Expand 10 after
2895 AstElement get definingElement; 2895 AstElement get definingElement;
2896 2896
2897 bool get hasResolvedAst => definingElement.hasTreeElements; 2897 bool get hasResolvedAst => definingElement.hasTreeElements;
2898 2898
2899 ResolvedAst get resolvedAst { 2899 ResolvedAst get resolvedAst {
2900 return new ResolvedAst(declaration, 2900 return new ResolvedAst(declaration,
2901 definingElement.node, definingElement.treeElements); 2901 definingElement.node, definingElement.treeElements);
2902 } 2902 }
2903 2903
2904 } 2904 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/mirrors/dart2js_mirrors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698