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

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

Issue 2771983004: Implement character offsets for fields and enum constants. (Closed)
Patch Set: Remove TODO. 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/source/source_library_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
index 56ae8436f571adc00c16e43f391b57c727d958c7..7b8293d0325bea62392edc89ad08d7de32e084b4 100644
--- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
@@ -184,10 +184,11 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
String name, int charOffset);
void addFields(List<MetadataBuilder> metadata, int modifiers, T type,
- List<String> names) {
- for (String name in names) {
- // TODO(ahe): Get charOffset of name.
- addField(metadata, modifiers, type, name, -1);
+ List<Object> namesAndOffsets) {
+ for (int i = 0; i < namesAndOffsets.length; i += 2) {
+ String name = namesAndOffsets[i];
+ int charOffset = namesAndOffsets[i + 1];
+ addField(metadata, modifiers, type, name, charOffset);
}
}
@@ -207,7 +208,7 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
{bool isTopLevel});
void addEnum(List<MetadataBuilder> metadata, String name,
- List<String> constants, int charOffset, int charEndOffset);
+ List<Object> constantNamesAndOffsets, int charOffset, int charEndOffset);
void addFunctionTypeAlias(
List<MetadataBuilder> metadata,
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/outline_builder.dart ('k') | pkg/front_end/lib/src/fasta/source/unhandled_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698