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

Side by Side Diff: pkg/analyzer/test/generated/parser_fasta_test.dart

Issue 2914373002: Restore invariant that stack is empty in parseFunctionBody. (Closed)
Patch Set: Created 3 years, 6 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:analyzer/dart/ast/ast.dart'; 5 import 'package:analyzer/dart/ast/ast.dart';
6 import 'package:analyzer/dart/ast/token.dart' as analyzer; 6 import 'package:analyzer/dart/ast/token.dart' as analyzer;
7 import 'package:analyzer/dart/element/element.dart'; 7 import 'package:analyzer/dart/element/element.dart';
8 import 'package:analyzer/error/error.dart'; 8 import 'package:analyzer/error/error.dart';
9 import 'package:analyzer/src/fasta/ast_builder.dart'; 9 import 'package:analyzer/src/fasta/ast_builder.dart';
10 import 'package:analyzer/src/fasta/element_store.dart'; 10 import 'package:analyzer/src/fasta/element_store.dart';
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 /** 776 /**
777 * Creates a [ParserProxy] which is prepared to begin parsing at the given 777 * Creates a [ParserProxy] which is prepared to begin parsing at the given
778 * Fasta token. 778 * Fasta token.
779 */ 779 */
780 factory ParserProxy(analyzer.Token startingToken, 780 factory ParserProxy(analyzer.Token startingToken,
781 {bool enableGenericMethodComments: false}) { 781 {bool enableGenericMethodComments: false}) {
782 var library = new KernelLibraryBuilderProxy(); 782 var library = new KernelLibraryBuilderProxy();
783 var member = new BuilderProxy(); 783 var member = new BuilderProxy();
784 var elementStore = new ElementStoreProxy(); 784 var elementStore = new ElementStoreProxy();
785 var scope = new ScopeProxy(); 785 var scope = new ScopeProxy();
786 var astBuilder = new AstBuilder(null, library, member, elementStore, scope); 786 var astBuilder =
787 new AstBuilder(null, library, member, elementStore, scope, true);
787 astBuilder.parseGenericMethodComments = enableGenericMethodComments; 788 astBuilder.parseGenericMethodComments = enableGenericMethodComments;
788 var fastaParser = new fasta.Parser(astBuilder); 789 var fastaParser = new fasta.Parser(astBuilder);
789 astBuilder.parser = fastaParser; 790 astBuilder.parser = fastaParser;
790 return new ParserProxy._(startingToken, fastaParser, astBuilder); 791 return new ParserProxy._(startingToken, fastaParser, astBuilder);
791 } 792 }
792 793
793 ParserProxy._(this._currentFastaToken, this._fastaParser, this._astBuilder); 794 ParserProxy._(this._currentFastaToken, this._fastaParser, this._astBuilder);
794 795
795 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 796 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
796 797
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 } 954 }
954 955
955 @override 956 @override
956 @failingTest 957 @failingTest
957 void test_parsePartOfDirective_uri() { 958 void test_parsePartOfDirective_uri() {
958 // TODO(paulberry,ahe): URIs in "part of" declarations are not supported by 959 // TODO(paulberry,ahe): URIs in "part of" declarations are not supported by
959 // Fasta. 960 // Fasta.
960 super.test_parsePartOfDirective_uri(); 961 super.test_parsePartOfDirective_uri();
961 } 962 }
962 } 963 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/fasta/ast_builder.dart ('k') | pkg/front_end/lib/src/fasta/source/diet_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698