| 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/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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 } | 225 } |
| 226 | 226 |
| 227 @override | 227 @override |
| 228 @failingTest | 228 @failingTest |
| 229 void test_parseExpression_assign_compound() { | 229 void test_parseExpression_assign_compound() { |
| 230 super.test_parseExpression_assign_compound(); | 230 super.test_parseExpression_assign_compound(); |
| 231 } | 231 } |
| 232 | 232 |
| 233 @override | 233 @override |
| 234 @failingTest | 234 @failingTest |
| 235 void test_parseFunctionExpression_typeParameterComments() { | |
| 236 super.test_parseFunctionExpression_typeParameterComments(); | |
| 237 } | |
| 238 | |
| 239 @override | |
| 240 @failingTest | |
| 241 void test_parseInstanceCreationExpression_type_named_typeArgumentComments() { | 235 void test_parseInstanceCreationExpression_type_named_typeArgumentComments() { |
| 242 super | 236 super |
| 243 .test_parseInstanceCreationExpression_type_named_typeArgumentComments(); | 237 .test_parseInstanceCreationExpression_type_named_typeArgumentComments(); |
| 244 } | 238 } |
| 245 | 239 |
| 246 @override | 240 @override |
| 247 @failingTest | 241 @failingTest |
| 248 void test_parseInstanceCreationExpression_type_typeArguments_nullable() { | 242 void test_parseInstanceCreationExpression_type_typeArguments_nullable() { |
| 249 super.test_parseInstanceCreationExpression_type_typeArguments_nullable(); | 243 super.test_parseInstanceCreationExpression_type_typeArguments_nullable(); |
| 250 } | 244 } |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 * Creates a [ParserProxy] which is prepared to begin parsing at the given | 790 * Creates a [ParserProxy] which is prepared to begin parsing at the given |
| 797 * Fasta token. | 791 * Fasta token. |
| 798 */ | 792 */ |
| 799 factory ParserProxy(fasta.Token startingToken, | 793 factory ParserProxy(fasta.Token startingToken, |
| 800 {bool enableGenericMethodComments: false}) { | 794 {bool enableGenericMethodComments: false}) { |
| 801 var library = new KernelLibraryBuilderProxy(); | 795 var library = new KernelLibraryBuilderProxy(); |
| 802 var member = new BuilderProxy(); | 796 var member = new BuilderProxy(); |
| 803 var elementStore = new ElementStoreProxy(); | 797 var elementStore = new ElementStoreProxy(); |
| 804 var scope = new ScopeProxy(); | 798 var scope = new ScopeProxy(); |
| 805 var astBuilder = new AstBuilder(null, library, member, elementStore, scope); | 799 var astBuilder = new AstBuilder(null, library, member, elementStore, scope); |
| 800 astBuilder.parseGenericMethodComments = enableGenericMethodComments; |
| 806 var fastaParser = new fasta.Parser(astBuilder); | 801 var fastaParser = new fasta.Parser(astBuilder); |
| 807 fastaParser.parseGenericMethodComments = enableGenericMethodComments; | |
| 808 return new ParserProxy._(startingToken, fastaParser, astBuilder); | 802 return new ParserProxy._(startingToken, fastaParser, astBuilder); |
| 809 } | 803 } |
| 810 | 804 |
| 811 ParserProxy._(this._currentFastaToken, this._fastaParser, this._astBuilder); | 805 ParserProxy._(this._currentFastaToken, this._fastaParser, this._astBuilder); |
| 812 | 806 |
| 813 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); | 807 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
| 814 | 808 |
| 815 @override | 809 @override |
| 816 ClassMember parseClassMember(String className) { | 810 ClassMember parseClassMember(String className) { |
| 817 _astBuilder.className = className; | 811 _astBuilder.className = className; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 } | 889 } |
| 896 | 890 |
| 897 @override | 891 @override |
| 898 @failingTest | 892 @failingTest |
| 899 void test_parseForStatement_loop_i_withMetadata() { | 893 void test_parseForStatement_loop_i_withMetadata() { |
| 900 super.test_parseForStatement_loop_i_withMetadata(); | 894 super.test_parseForStatement_loop_i_withMetadata(); |
| 901 } | 895 } |
| 902 | 896 |
| 903 @override | 897 @override |
| 904 @failingTest | 898 @failingTest |
| 905 void test_parseFunctionDeclarationStatement_typeParameterComments() { | |
| 906 // TODO(scheglov): Fasta doesn't support generic comment syntax. | |
| 907 super.test_parseFunctionDeclarationStatement_typeParameterComments(); | |
| 908 } | |
| 909 | |
| 910 @override | |
| 911 @failingTest | |
| 912 void test_parseStatement_emptyTypeArgumentList() { | 899 void test_parseStatement_emptyTypeArgumentList() { |
| 913 super.test_parseStatement_emptyTypeArgumentList(); | 900 super.test_parseStatement_emptyTypeArgumentList(); |
| 914 } | 901 } |
| 915 | 902 |
| 916 @override | 903 @override |
| 917 @failingTest | 904 @failingTest |
| 918 void test_parseTryStatement_catch_finally() { | 905 void test_parseTryStatement_catch_finally() { |
| 919 super.test_parseTryStatement_catch_finally(); | 906 super.test_parseTryStatement_catch_finally(); |
| 920 } | 907 } |
| 921 | 908 |
| 922 @override | 909 @override |
| 923 @failingTest | 910 @failingTest |
| 924 void test_parseTryStatement_on_catch() { | 911 void test_parseTryStatement_on_catch() { |
| 925 super.test_parseTryStatement_on_catch(); | 912 super.test_parseTryStatement_on_catch(); |
| 926 } | 913 } |
| 927 | 914 |
| 928 @override | 915 @override |
| 929 @failingTest | 916 @failingTest |
| 930 void test_parseTryStatement_on_catch_finally() { | 917 void test_parseTryStatement_on_catch_finally() { |
| 931 super.test_parseTryStatement_on_catch_finally(); | 918 super.test_parseTryStatement_on_catch_finally(); |
| 932 } | 919 } |
| 933 | |
| 934 @override | |
| 935 @failingTest | |
| 936 void test_parseVariableDeclarationListAfterMetadata_const_typeComment() { | |
| 937 super.test_parseVariableDeclarationListAfterMetadata_const_typeComment(); | |
| 938 } | |
| 939 | |
| 940 @override | |
| 941 @failingTest | |
| 942 void test_parseVariableDeclarationListAfterMetadata_dynamic_typeComment() { | |
| 943 super.test_parseVariableDeclarationListAfterMetadata_dynamic_typeComment(); | |
| 944 } | |
| 945 | |
| 946 @override | |
| 947 @failingTest | |
| 948 void test_parseVariableDeclarationListAfterMetadata_final_typeComment() { | |
| 949 super.test_parseVariableDeclarationListAfterMetadata_final_typeComment(); | |
| 950 } | |
| 951 | |
| 952 @override | |
| 953 @failingTest | |
| 954 void test_parseVariableDeclarationListAfterMetadata_type_typeComment() { | |
| 955 super.test_parseVariableDeclarationListAfterMetadata_type_typeComment(); | |
| 956 } | |
| 957 | |
| 958 @override | |
| 959 @failingTest | |
| 960 void test_parseVariableDeclarationListAfterMetadata_var_typeComment() { | |
| 961 super.test_parseVariableDeclarationListAfterMetadata_var_typeComment(); | |
| 962 } | |
| 963 } | 920 } |
| 964 | 921 |
| 965 /** | 922 /** |
| 966 * Tests of the fasta parser based on [TopLevelParserTestMixin]. | 923 * Tests of the fasta parser based on [TopLevelParserTestMixin]. |
| 967 */ | 924 */ |
| 968 @reflectiveTest | 925 @reflectiveTest |
| 969 class TopLevelParserTest_Fasta extends FastaParserTestCase | 926 class TopLevelParserTest_Fasta extends FastaParserTestCase |
| 970 with TopLevelParserTestMixin { | 927 with TopLevelParserTestMixin { |
| 971 @override | 928 @override |
| 972 @failingTest | 929 @failingTest |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1026 } | 983 } |
| 1027 | 984 |
| 1028 @override | 985 @override |
| 1029 @failingTest | 986 @failingTest |
| 1030 void test_parsePartOfDirective_uri() { | 987 void test_parsePartOfDirective_uri() { |
| 1031 // TODO(paulberry,ahe): URIs in "part of" declarations are not supported by | 988 // TODO(paulberry,ahe): URIs in "part of" declarations are not supported by |
| 1032 // Fasta. | 989 // Fasta. |
| 1033 super.test_parsePartOfDirective_uri(); | 990 super.test_parsePartOfDirective_uri(); |
| 1034 } | 991 } |
| 1035 } | 992 } |
| OLD | NEW |