OLD | NEW |
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/dart/scanner/scanner.dart'; | 9 import 'package:analyzer/src/dart/scanner/scanner.dart'; |
10 import 'package:analyzer/src/fasta/ast_builder.dart'; | 10 import 'package:analyzer/src/fasta/ast_builder.dart'; |
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 * Creates a [ParserProxy] which is prepared to begin parsing at the given | 827 * Creates a [ParserProxy] which is prepared to begin parsing at the given |
828 * Fasta token. | 828 * Fasta token. |
829 */ | 829 */ |
830 factory ParserProxy(analyzer.Token startingToken, | 830 factory ParserProxy(analyzer.Token startingToken, |
831 {bool enableGenericMethodComments: false}) { | 831 {bool enableGenericMethodComments: false}) { |
832 var library = new KernelLibraryBuilderProxy(); | 832 var library = new KernelLibraryBuilderProxy(); |
833 var member = new BuilderProxy(); | 833 var member = new BuilderProxy(); |
834 var elementStore = new ElementStoreProxy(); | 834 var elementStore = new ElementStoreProxy(); |
835 var scope = new ScopeProxy(); | 835 var scope = new ScopeProxy(); |
836 var astBuilder = | 836 var astBuilder = |
837 new AstBuilder(null, library, member, elementStore, scope, true); | 837 new AstBuilder(null, library, member, elementStore, scope, true, false); |
838 astBuilder.parseGenericMethodComments = enableGenericMethodComments; | 838 astBuilder.parseGenericMethodComments = enableGenericMethodComments; |
839 var fastaParser = new fasta.Parser(astBuilder); | 839 var fastaParser = new fasta.Parser(astBuilder); |
840 astBuilder.parser = fastaParser; | 840 astBuilder.parser = fastaParser; |
841 return new ParserProxy._(startingToken, fastaParser, astBuilder); | 841 return new ParserProxy._(startingToken, fastaParser, astBuilder); |
842 } | 842 } |
843 | 843 |
844 ParserProxy._(this._currentFastaToken, this._fastaParser, this._astBuilder); | 844 ParserProxy._(this._currentFastaToken, this._fastaParser, this._astBuilder); |
845 | 845 |
846 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); | 846 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
847 | 847 |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1016 } | 1016 } |
1017 | 1017 |
1018 @override | 1018 @override |
1019 @failingTest | 1019 @failingTest |
1020 void test_parsePartOfDirective_uri() { | 1020 void test_parsePartOfDirective_uri() { |
1021 // TODO(paulberry,ahe): URIs in "part of" declarations are not supported by | 1021 // TODO(paulberry,ahe): URIs in "part of" declarations are not supported by |
1022 // Fasta. | 1022 // Fasta. |
1023 super.test_parsePartOfDirective_uri(); | 1023 super.test_parsePartOfDirective_uri(); |
1024 } | 1024 } |
1025 } | 1025 } |
OLD | NEW |