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

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

Issue 2995023002: Add debug names to scopes. (Closed)
Patch Set: Created 3 years, 4 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_enum_builder; 5 library fasta.kernel_enum_builder;
6 6
7 import 'package:kernel/ast.dart' 7 import 'package:kernel/ast.dart'
8 show 8 show
9 Arguments, 9 Arguments,
10 Class, 10 Class,
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 members[name] = fieldBuilder; 203 members[name] = fieldBuilder;
204 toStringEntries.add(new MapEntry( 204 toStringEntries.add(new MapEntry(
205 new IntLiteral(index), new StringLiteral("$className.$name"))); 205 new IntLiteral(index), new StringLiteral("$className.$name")));
206 index++; 206 index++;
207 } 207 }
208 MapLiteral toStringMap = new MapLiteral(toStringEntries, isConst: true); 208 MapLiteral toStringMap = new MapLiteral(toStringEntries, isConst: true);
209 KernelEnumBuilder enumBuilder = new KernelEnumBuilder.internal( 209 KernelEnumBuilder enumBuilder = new KernelEnumBuilder.internal(
210 documentationComment, 210 documentationComment,
211 metadata, 211 metadata,
212 name, 212 name,
213 new Scope(members, null, parent.scope, isModifiable: false), 213 new Scope(members, null, parent.scope, "enum $name",
214 new Scope(constructors, null, null, isModifiable: false), 214 isModifiable: false),
215 new Scope(constructors, null, null, "constructors",
216 isModifiable: false),
215 cls, 217 cls,
216 constantNamesAndOffsetsAndDocs, 218 constantNamesAndOffsetsAndDocs,
217 toStringMap, 219 toStringMap,
218 intType, 220 intType,
219 listType, 221 listType,
220 objectType, 222 objectType,
221 stringType, 223 stringType,
222 parent, 224 parent,
223 charOffset); 225 charOffset);
224 // TODO(sigmund): dynamic should be `covariant MemberBuilder`. 226 // TODO(sigmund): dynamic should be `covariant MemberBuilder`.
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 } 311 }
310 return super.build(libraryBuilder, coreLibrary); 312 return super.build(libraryBuilder, coreLibrary);
311 } 313 }
312 314
313 @override 315 @override
314 Builder findConstructorOrFactory( 316 Builder findConstructorOrFactory(
315 String name, int charOffset, Uri uri, LibraryBuilder library) { 317 String name, int charOffset, Uri uri, LibraryBuilder library) {
316 return null; 318 return null;
317 } 319 }
318 } 320 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/body_builder.dart ('k') | pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698