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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart

Issue 2746013003: [fasta] Add and correct even more offsets (Closed)
Patch Set: Removed formalParametersToken parameter 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 side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart
index e584e09c6aeccff849f4357ce323e8d3ccda9224..850c3ad45eefef77e5fa8bd01c9313ebef306f4f 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart
@@ -175,6 +175,7 @@ abstract class KernelFunctionBuilder
class KernelProcedureBuilder extends KernelFunctionBuilder {
final Procedure procedure;
+ final int charOpenParenOffset;
AsyncMarker actualAsyncModifier;
@@ -191,6 +192,7 @@ class KernelProcedureBuilder extends KernelFunctionBuilder {
ProcedureKind kind,
KernelLibraryBuilder compilationUnit,
int charOffset,
+ this.charOpenParenOffset,
int charEndOffset,
[String nativeMethodName,
this.redirectionTarget])
@@ -228,6 +230,8 @@ class KernelProcedureBuilder extends KernelFunctionBuilder {
if (procedure.name == null) {
procedure.function = buildFunction(library);
procedure.function.parent = procedure;
+ procedure.function.fileOffset = charOpenParenOffset;
+ procedure.function.fileEndOffset = procedure.fileEndOffset;
procedure.isAbstract = isAbstract;
procedure.isStatic = isStatic;
procedure.isExternal = isExternal;
@@ -243,6 +247,7 @@ class KernelProcedureBuilder extends KernelFunctionBuilder {
// TODO(ahe): Move this to own file?
class KernelConstructorBuilder extends KernelFunctionBuilder {
final Constructor constructor;
+ final int charOpenParenOffset;
bool hasMovedSuperInitializer = false;
@@ -259,6 +264,7 @@ class KernelConstructorBuilder extends KernelFunctionBuilder {
List<FormalParameterBuilder> formals,
KernelLibraryBuilder compilationUnit,
int charOffset,
+ this.charOpenParenOffset,
int charEndOffset,
[String nativeMethodName])
: constructor = new Constructor(null)
@@ -279,6 +285,8 @@ class KernelConstructorBuilder extends KernelFunctionBuilder {
if (constructor.name == null) {
constructor.function = buildFunction(library);
constructor.function.parent = constructor;
+ constructor.function.fileOffset = charOpenParenOffset;
+ constructor.function.fileEndOffset = constructor.fileEndOffset;
constructor.isConst = isConst;
constructor.isExternal = isExternal;
constructor.name = new Name(name, library.target);
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart ('k') | pkg/front_end/lib/src/fasta/kernel/kernel_target.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698