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

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

Issue 2752093002: Allow AstBuilder to report parse errors. (Closed)
Patch Set: 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
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/generated/parser.dart' as analyzer; 9 import 'package:analyzer/src/generated/parser.dart' as analyzer;
10 import 'package:analyzer/src/generated/utilities_dart.dart'; 10 import 'package:analyzer/src/generated/utilities_dart.dart';
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 990
991 /** 991 /**
992 * Creates a [ParserProxy] which is prepared to begin parsing at the given 992 * Creates a [ParserProxy] which is prepared to begin parsing at the given
993 * Fasta token. 993 * Fasta token.
994 */ 994 */
995 factory ParserProxy(fasta.Token startingToken) { 995 factory ParserProxy(fasta.Token startingToken) {
996 var library = new KernelLibraryBuilderProxy(); 996 var library = new KernelLibraryBuilderProxy();
997 var member = new BuilderProxy(); 997 var member = new BuilderProxy();
998 var elementStore = new ElementStoreProxy(); 998 var elementStore = new ElementStoreProxy();
999 var scope = new ScopeProxy(); 999 var scope = new ScopeProxy();
1000 var astBuilder = new AstBuilder(library, member, elementStore, scope); 1000 var astBuilder = new AstBuilder(null, library, member, elementStore, scope);
1001 return new ParserProxy._( 1001 return new ParserProxy._(
1002 startingToken, new fasta.Parser(astBuilder), astBuilder); 1002 startingToken, new fasta.Parser(astBuilder), astBuilder);
1003 } 1003 }
1004 1004
1005 ParserProxy._(this._currentFastaToken, this._fastaParser, this._astBuilder); 1005 ParserProxy._(this._currentFastaToken, this._fastaParser, this._astBuilder);
1006 1006
1007 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 1007 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
1008 1008
1009 @override 1009 @override
1010 ClassMember parseClassMember(String className) { 1010 ClassMember parseClassMember(String className) {
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
1308 } 1308 }
1309 1309
1310 @override 1310 @override
1311 @failingTest 1311 @failingTest
1312 void test_parsePartOfDirective_uri() { 1312 void test_parsePartOfDirective_uri() {
1313 // TODO(paulberry,ahe): URIs in "part of" declarations are not supported by 1313 // TODO(paulberry,ahe): URIs in "part of" declarations are not supported by
1314 // Fasta. 1314 // Fasta.
1315 super.test_parsePartOfDirective_uri(); 1315 super.test_parsePartOfDirective_uri();
1316 } 1316 }
1317 } 1317 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/file_state.dart ('k') | pkg/front_end/lib/src/fasta/analyzer/analyzer_diet_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698