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

Side by Side Diff: pkg/analyzer/lib/src/summary/fasta/summary_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 unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/fasta/ast_builder.dart ('k') | pkg/analyzer/tool/summary/mini_ast.dart » ('j') | 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 /// Logic to build unlinked summaries. 5 /// Logic to build unlinked summaries.
6 library summary.src.summary_builder; 6 library summary.src.summary_builder;
7 7
8 import 'package:front_end/src/fasta/parser/class_member_parser.dart'; 8 import 'package:front_end/src/fasta/parser/class_member_parser.dart';
9 import 'package:front_end/src/fasta/parser/identifier_context.dart'; 9 import 'package:front_end/src/fasta/parser/identifier_context.dart';
10 import 'package:front_end/src/fasta/parser/parser.dart'; 10 import 'package:front_end/src/fasta/parser/parser.dart';
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 void endConstructorReference( 254 void endConstructorReference(
255 Token start, Token periodBeforeName, Token endToken) { 255 Token start, Token periodBeforeName, Token endToken) {
256 debugEvent("ConstructorReference $start $periodBeforeName"); 256 debugEvent("ConstructorReference $start $periodBeforeName");
257 Ref ctorName = popIfNotNull(periodBeforeName); 257 Ref ctorName = popIfNotNull(periodBeforeName);
258 assert(ctorName?.prefix == null); 258 assert(ctorName?.prefix == null);
259 List<TypeRef> typeArgs = pop(); 259 List<TypeRef> typeArgs = pop();
260 Ref type = pop(); 260 Ref type = pop();
261 push(new ConstructorName(new TypeRef(type, typeArgs), ctorName?.name)); 261 push(new ConstructorName(new TypeRef(type, typeArgs), ctorName?.name));
262 } 262 }
263 263
264 void endFormalParameter( 264 void endFormalParameter(Token covariantKeyword, Token thisKeyword,
265 Token covariantKeyword, Token thisKeyword, FormalParameterType kind) { 265 Token nameToken, FormalParameterType kind) {
266 debugEvent("FormalParameter"); 266 debugEvent("FormalParameter");
267 assert(ignore); 267 assert(ignore);
268 } 268 }
269 269
270 void endFormalParameters(int c, begin, end) { 270 void endFormalParameters(int c, begin, end) {
271 debugEvent("FormalParameters"); 271 debugEvent("FormalParameters");
272 assert(ignore); 272 assert(ignore);
273 } 273 }
274 274
275 void endBlockFunctionBody(int count, Token begin, Token end) { 275 void endBlockFunctionBody(int count, Token begin, Token end) {
276 debugEvent("BlockFunctionBody"); 276 debugEvent("BlockFunctionBody");
277 assert(ignore); 277 assert(ignore);
278 } 278 }
279 279
280 void endFunctionDeclaration(token) { 280 void endFunctionDeclaration(token) {
281 debugEvent("FunctionDeclaration"); 281 debugEvent("FunctionDeclaration");
282 _withinFunction--; 282 _withinFunction--;
283 if (ignore) return; 283 if (ignore) return;
284 _endFunction(); 284 _endFunction();
285 } 285 }
286 286
287 void endFunctionName(Token token) { 287 void endFunctionName(Token beginToken, Token token) {
288 debugEvent("FunctionName"); 288 debugEvent("FunctionName");
289 assert(ignore); 289 assert(ignore);
290 } 290 }
291 291
292 void endLiteralMapEntry(colon, token) { 292 void endLiteralMapEntry(colon, token) {
293 debugEvent('MapEntry'); 293 debugEvent('MapEntry');
294 if (ignore) return; 294 if (ignore) return;
295 var value = pop(); 295 var value = pop();
296 var key = pop(); 296 var key = pop();
297 push(new KeyValuePair(key, value)); 297 push(new KeyValuePair(key, value));
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 void endTypeVariable(Token token, Token extendsOrSuper) { 355 void endTypeVariable(Token token, Token extendsOrSuper) {
356 debugEvent("endTypeVariable"); 356 debugEvent("endTypeVariable");
357 assert(ignore); 357 assert(ignore);
358 } 358 }
359 359
360 void endTypeVariables(int count, Token beginToken, Token endToken) { 360 void endTypeVariables(int count, Token beginToken, Token endToken) {
361 debugEvent("TypeVariables"); 361 debugEvent("TypeVariables");
362 assert(ignore); 362 assert(ignore);
363 } 363 }
364 364
365 void endUnnamedFunction(token) { 365 void endUnnamedFunction(Token beginToken, Token token) {
366 debugEvent("UnnamedFunction"); 366 debugEvent("UnnamedFunction");
367 _withinFunction--; 367 _withinFunction--;
368 if (ignore) return; 368 if (ignore) return;
369 _endFunction(); 369 _endFunction();
370 } 370 }
371 371
372 void handleAsyncModifier(Token asyncToken, Token starToken) { 372 void handleAsyncModifier(Token asyncToken, Token starToken) {
373 debugEvent("AsyncModifier"); 373 debugEvent("AsyncModifier");
374 assert(ignore); 374 assert(ignore);
375 } 375 }
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 debugEvent("Fields"); 995 debugEvent("Fields");
996 var s = scope; 996 var s = scope;
997 if (s is ClassScope) { 997 if (s is ClassScope) {
998 _endFields(count, s.currentClass.fields, false); 998 _endFields(count, s.currentClass.fields, false);
999 } else { 999 } else {
1000 throw new UnimplementedError(); // TODO(paulberry): does this ever occur? 1000 throw new UnimplementedError(); // TODO(paulberry): does this ever occur?
1001 // _endFields(count, s.currentEnum.values, false); 1001 // _endFields(count, s.currentEnum.values, false);
1002 } 1002 }
1003 } 1003 }
1004 1004
1005 void endFormalParameter( 1005 void endFormalParameter(Token covariantKeyword, Token thisKeyword,
1006 Token covariantKeyword, Token thisKeyword, FormalParameterType kind) { 1006 Token nameToken, FormalParameterType kind) {
1007 debugEvent("FormalParameter"); 1007 debugEvent("FormalParameter");
1008 // TODO(sigmund): clean up? 1008 // TODO(sigmund): clean up?
1009 var nameOrFormal = pop(); 1009 var nameOrFormal = pop();
1010 if (nameOrFormal is String) { 1010 if (nameOrFormal is String) {
1011 EntityRef type = pop(); 1011 EntityRef type = pop();
1012 pop(); // Modifiers 1012 pop(); // Modifiers
1013 List metadata = pop(); 1013 List metadata = pop();
1014 push(new UnlinkedParamBuilder( 1014 push(new UnlinkedParamBuilder(
1015 name: nameOrFormal, 1015 name: nameOrFormal,
1016 kind: _nextParamKind, 1016 kind: _nextParamKind,
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
1550 } 1550 }
1551 1551
1552 /// Internal representation of an initialized name. 1552 /// Internal representation of an initialized name.
1553 class _InitializedName { 1553 class _InitializedName {
1554 final String name; 1554 final String name;
1555 final UnlinkedExecutableBuilder initializer; 1555 final UnlinkedExecutableBuilder initializer;
1556 _InitializedName(this.name, this.initializer); 1556 _InitializedName(this.name, this.initializer);
1557 1557
1558 toString() => "II:" + (initializer != null ? "$name = $initializer" : name); 1558 toString() => "II:" + (initializer != null ? "$name = $initializer" : name);
1559 } 1559 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/fasta/ast_builder.dart ('k') | pkg/analyzer/tool/summary/mini_ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698