| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |