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

Side by Side Diff: pkg/front_end/lib/src/fasta/kernel/kernel_target.dart

Issue 2731553004: [Fasta] Offset and end offset on procedures (Closed)
Patch Set: Created 3 years, 9 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
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.kernel_target; 5 library fasta.kernel_target;
6 6
7 import 'dart:async' show Future; 7 import 'dart:async' show Future;
8 8
9 import 'dart:io' show File, IOSink; 9 import 'dart:io' show File, IOSink;
10 10
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 KernelProcedureBuilder mainBuilder = new KernelProcedureBuilder( 289 KernelProcedureBuilder mainBuilder = new KernelProcedureBuilder(
290 null, 290 null,
291 0, 291 0,
292 null, 292 null,
293 "main", 293 "main",
294 null, 294 null,
295 null, 295 null,
296 AsyncMarker.Sync, 296 AsyncMarker.Sync,
297 ProcedureKind.Method, 297 ProcedureKind.Method,
298 library, 298 library,
299 -1,
299 -1); 300 -1);
300 library.addBuilder(mainBuilder.name, mainBuilder, -1); 301 library.addBuilder(mainBuilder.name, mainBuilder, -1);
301 mainBuilder.body = new ExpressionStatement( 302 mainBuilder.body = new ExpressionStatement(
302 new Throw(new StringLiteral("${errors.join('\n')}"))); 303 new Throw(new StringLiteral("${errors.join('\n')}")));
303 } 304 }
304 library.build(); 305 library.build();
305 return link(<Library>[library.library]); 306 return link(<Library>[library.library]);
306 } 307 }
307 308
308 /// Creates a program by combining [libraries] with the libraries of 309 /// Creates a program by combining [libraries] with the libraries of
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 } 604 }
604 for (Constructor constructor in superclass.constructors) { 605 for (Constructor constructor in superclass.constructors) {
605 if (constructor.name.name.isEmpty) { 606 if (constructor.name.name.isEmpty) {
606 return constructor.function.requiredParameterCount == 0 607 return constructor.function.requiredParameterCount == 0
607 ? constructor 608 ? constructor
608 : null; 609 : null;
609 } 610 }
610 } 611 }
611 return null; 612 return null;
612 } 613 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698