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

Side by Side Diff: utils/kernel-service/kernel-service.dart

Issue 2704753002: Implement line and column numbers. (Closed)
Patch Set: Change message. Created 3 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
« no previous file with comments | « pkg/kernel/lib/ast.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 /// This is an interface to the Dart Kernel parser and Kernel binary generator. 5 /// This is an interface to the Dart Kernel parser and Kernel binary generator.
6 /// 6 ///
7 /// It is used by the kernel-isolate to load Dart source code and generate 7 /// It is used by the kernel-isolate to load Dart source code and generate
8 /// Kernel binary format. 8 /// Kernel binary format.
9 /// 9 ///
10 /// This is either invoked as the root script of the Kernel isolate when used 10 /// This is either invoked as the root script of the Kernel isolate when used
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 kernelTarget.read(fileName); 168 kernelTarget.read(fileName);
169 await dillTarget.writeOutline(null); 169 await dillTarget.writeOutline(null);
170 program = await kernelTarget.writeOutline(null); 170 program = await kernelTarget.writeOutline(null);
171 program = await kernelTarget.writeProgram(null, AstKind.Kernel); 171 program = await kernelTarget.writeProgram(null, AstKind.Kernel);
172 if (kernelTarget.errors.isNotEmpty) { 172 if (kernelTarget.errors.isNotEmpty) {
173 return new CompilationError(kernelTarget.errors 173 return new CompilationError(kernelTarget.errors
174 .map((err) => err.toString()) 174 .map((err) => err.toString())
175 .toList(growable: false)); 175 .toList(growable: false));
176 } 176 }
177 } on InputError catch (e) { 177 } on InputError catch (e) {
178 return new CompilationError(<String>[e.error]); 178 return new CompilationError(<String>[e.format()]);
179 } 179 }
180 } else { 180 } else {
181 DartOptions dartOptions = new DartOptions( 181 DartOptions dartOptions = new DartOptions(
182 strongMode: false, 182 strongMode: false,
183 strongModeSdk: false, 183 strongModeSdk: false,
184 sdk: sdkPath, 184 sdk: sdkPath,
185 packagePath: packageConfig, 185 packagePath: packageConfig,
186 customUriMappings: const {}, 186 customUriMappings: const {},
187 declaredVariables: const {}); 187 declaredVariables: const {});
188 DartLoader loader = 188 DartLoader loader =
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 if (await new File.fromUri(packagesFile).exists()) { 398 if (await new File.fromUri(packagesFile).exists()) {
399 return packagesFile; 399 return packagesFile;
400 } 400 }
401 if (dir.parent.path == dir.path) { 401 if (dir.parent.path == dir.path) {
402 break; 402 break;
403 } 403 }
404 dir = dir.parent; 404 dir = dir.parent;
405 } 405 }
406 return null; 406 return null;
407 } 407 }
OLDNEW
« no previous file with comments | « pkg/kernel/lib/ast.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698