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

Side by Side Diff: pkg/analyzer/tool/summary/mini_ast.dart

Issue 3003263002: add support for native methods in class
Patch Set: update listeners 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) 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 import 'package:front_end/src/fasta/problems.dart' 5 import 'package:front_end/src/fasta/problems.dart'
6 show internalProblem, unsupported; 6 show internalProblem, unsupported;
7 import 'package:front_end/src/fasta/messages.dart' show Message; 7 import 'package:front_end/src/fasta/messages.dart' show Message;
8 import 'package:front_end/src/fasta/parser.dart'; 8 import 'package:front_end/src/fasta/parser.dart';
9 import 'package:front_end/src/fasta/source/stack_listener.dart'; 9 import 'package:front_end/src/fasta/source/stack_listener.dart';
10 import 'package:front_end/src/scanner/token.dart'; 10 import 'package:front_end/src/scanner/token.dart';
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 String name = pop(); 325 String name = pop();
326 push(new Annotation(name, constructorName, arguments)); 326 push(new Annotation(name, constructorName, arguments));
327 } 327 }
328 328
329 @override 329 @override
330 void endMetadataStar(int count, bool forParameter) { 330 void endMetadataStar(int count, bool forParameter) {
331 debugEvent("MetadataStar"); 331 debugEvent("MetadataStar");
332 push(popList(count) ?? NullValue.Metadata); 332 push(popList(count) ?? NullValue.Metadata);
333 } 333 }
334 334
335 void endMethod(Token getOrSet, Token beginToken, Token endToken) { 335 void endMethod(
336 Token getOrSet, Token beginToken, Token nativeToken, Token endToken) {
336 debugEvent("Method"); 337 debugEvent("Method");
337 pop(); // Body 338 pop(); // Body
338 pop(); // Initializers 339 pop(); // Initializers
339 pop(); // Formal parameters 340 pop(); // Formal parameters
340 pop(); // Type variables 341 pop(); // Type variables
341 String name = pop(); 342 String name = pop();
342 TypeName returnType = pop(); 343 TypeName returnType = pop();
343 List<Annotation> metadata = pop(); 344 List<Annotation> metadata = pop();
344 Comment comment = pop(); 345 Comment comment = pop();
345 push(new MethodDeclaration( 346 push(new MethodDeclaration(
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 final String name; 485 final String name;
485 486
486 final List<TypeName> typeArguments; 487 final List<TypeName> typeArguments;
487 488
488 TypeName(this.name, this.typeArguments); 489 TypeName(this.name, this.typeArguments);
489 } 490 }
490 491
491 /// "Mini AST" representation of an expression which summary code generation 492 /// "Mini AST" representation of an expression which summary code generation
492 /// need not be concerned about. 493 /// need not be concerned about.
493 class UnknownExpression extends Expression {} 494 class UnknownExpression extends Expression {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698