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

Side by Side Diff: pkg/front_end/lib/src/fasta/source/source_library_builder.dart

Issue 2915123002: Improve position information. (Closed)
Patch Set: Created 3 years, 6 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/front_end/lib/src/fasta/source/outline_builder.dart ('k') | no next file » | 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 fasta.source_library_builder; 5 library fasta.source_library_builder;
6 6
7 import 'package:front_end/src/scanner/token.dart' show Token; 7 import 'package:front_end/src/scanner/token.dart' show Token;
8 8
9 import 'package:kernel/ast.dart' show ProcedureKind; 9 import 'package:kernel/ast.dart' show ProcedureKind;
10 10
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 imports.add(new Import( 142 imports.add(new Import(
143 this, 143 this,
144 loader.read(resolve(uri), charOffset, accessor: this), 144 loader.read(resolve(uri), charOffset, accessor: this),
145 deferred, 145 deferred,
146 prefix, 146 prefix,
147 combinators, 147 combinators,
148 charOffset, 148 charOffset,
149 prefixCharOffset)); 149 prefixCharOffset));
150 } 150 }
151 151
152 void addPart(List<MetadataBuilder> metadata, String path) { 152 void addPart(List<MetadataBuilder> metadata, String path, int charOffset) {
153 Uri resolvedUri; 153 Uri resolvedUri;
154 Uri newFileUri; 154 Uri newFileUri;
155 if (uri.scheme == "dart") { 155 if (uri.scheme == "dart") {
156 resolvedUri = resolveRelativeUri(uri, Uri.parse(path)); 156 resolvedUri = resolveRelativeUri(uri, Uri.parse(path));
157 newFileUri = fileUri.resolve(path); 157 newFileUri = fileUri.resolve(path);
158 } else { 158 } else {
159 resolvedUri = uri.resolve(path); 159 resolvedUri = uri.resolve(path);
160 if (uri.scheme != "package") { 160 if (uri.scheme != "package") {
161 newFileUri = fileUri.resolve(path); 161 newFileUri = fileUri.resolve(path);
162 } 162 }
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 /// synthesize type variables on the factory matching the class'. 578 /// synthesize type variables on the factory matching the class'.
579 void addFactoryDeclaration( 579 void addFactoryDeclaration(
580 ProcedureBuilder procedure, DeclarationBuilder<T> factoryDeclaration) { 580 ProcedureBuilder procedure, DeclarationBuilder<T> factoryDeclaration) {
581 factoryDeclarations[procedure] = factoryDeclaration; 581 factoryDeclarations[procedure] = factoryDeclaration;
582 } 582 }
583 583
584 Scope toScope(Scope parent) { 584 Scope toScope(Scope parent) {
585 return new Scope(members, setters, parent, isModifiable: false); 585 return new Scope(members, setters, parent, isModifiable: false);
586 } 586 }
587 } 587 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/outline_builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698