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/ast/token.dart' show TokenType; | 7 import 'package:analyzer/dart/ast/token.dart' show TokenType; |
8 import 'package:analyzer/error/error.dart'; | 8 import 'package:analyzer/error/error.dart'; |
9 import 'package:analyzer/error/listener.dart' show ErrorReporter; | 9 import 'package:analyzer/error/listener.dart' show ErrorReporter; |
10 import 'package:analyzer/src/dart/scanner/scanner.dart'; | 10 import 'package:analyzer/src/dart/scanner/scanner.dart'; |
(...skipping 2774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2785 | 2785 |
2786 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); | 2786 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
2787 | 2787 |
2788 @override | 2788 @override |
2789 Annotation parseAnnotation() { | 2789 Annotation parseAnnotation() { |
2790 return _run((parser) => parser.parseMetadata) as Annotation; | 2790 return _run((parser) => parser.parseMetadata) as Annotation; |
2791 } | 2791 } |
2792 | 2792 |
2793 @override | 2793 @override |
2794 ArgumentList parseArgumentList() { | 2794 ArgumentList parseArgumentList() { |
2795 return _run((parser) => parser.parseArguments) as ArgumentList; | 2795 Object result = _run((parser) => parser.parseArguments); |
| 2796 if (result is MethodInvocation) { |
| 2797 return result.argumentList; |
| 2798 } |
| 2799 return result as ArgumentList; |
2796 } | 2800 } |
2797 | 2801 |
2798 @override | 2802 @override |
2799 ClassMember parseClassMember(String className) { | 2803 ClassMember parseClassMember(String className) { |
2800 _astBuilder.className = className; | 2804 _astBuilder.className = className; |
2801 _eventListener.begin('CompilationUnit'); | 2805 _eventListener.begin('CompilationUnit'); |
2802 var result = _run((parser) => parser.parseMember) as ClassMember; | 2806 var result = _run((parser) => parser.parseMember) as ClassMember; |
2803 _eventListener.end('CompilationUnit'); | 2807 _eventListener.end('CompilationUnit'); |
2804 _astBuilder.className = null; | 2808 _astBuilder.className = null; |
2805 return result; | 2809 return result; |
(...skipping 27 matching lines...) Expand all Loading... |
2833 _eventListener.expectEmpty(); | 2837 _eventListener.expectEmpty(); |
2834 return result; | 2838 return result; |
2835 } | 2839 } |
2836 | 2840 |
2837 @override | 2841 @override |
2838 Configuration parseConfiguration() { | 2842 Configuration parseConfiguration() { |
2839 return _run((parser) => parser.parseConditionalUri) as Configuration; | 2843 return _run((parser) => parser.parseConditionalUri) as Configuration; |
2840 } | 2844 } |
2841 | 2845 |
2842 @override | 2846 @override |
| 2847 FunctionBody parseFunctionBody( |
| 2848 bool mayBeEmpty, ParserErrorCode emptyErrorCode, bool inExpression) { |
| 2849 return _run((parser) => (token) => |
| 2850 parser.parseFunctionBody(token, inExpression, mayBeEmpty)) |
| 2851 as FunctionBody; |
| 2852 } |
| 2853 |
| 2854 @override |
2843 Statement parseStatement2() { | 2855 Statement parseStatement2() { |
2844 return _run((parser) => parser.parseStatement) as Statement; | 2856 return _run((parser) => parser.parseStatement) as Statement; |
2845 } | 2857 } |
2846 | 2858 |
2847 AnnotatedNode parseTopLevelDeclaration(bool isDirective) { | 2859 AnnotatedNode parseTopLevelDeclaration(bool isDirective) { |
2848 _eventListener.begin('CompilationUnit'); | 2860 _eventListener.begin('CompilationUnit'); |
2849 _currentFastaToken = | 2861 _currentFastaToken = |
2850 _fastaParser.parseTopLevelDeclaration(_currentFastaToken); | 2862 _fastaParser.parseTopLevelDeclaration(_currentFastaToken); |
2851 expect(_currentFastaToken.isEof, isTrue); | 2863 expect(_currentFastaToken.isEof, isTrue); |
2852 expect(_astBuilder.stack, hasLength(0)); | 2864 expect(_astBuilder.stack, hasLength(0)); |
2853 expect(_astBuilder.scriptTag, isNull); | 2865 expect(_astBuilder.scriptTag, isNull); |
2854 expect(_astBuilder.directives, hasLength(isDirective ? 1 : 0)); | 2866 expect(_astBuilder.directives, hasLength(isDirective ? 1 : 0)); |
2855 expect(_astBuilder.declarations, hasLength(isDirective ? 0 : 1)); | 2867 expect(_astBuilder.declarations, hasLength(isDirective ? 0 : 1)); |
2856 _eventListener.end('CompilationUnit'); | 2868 _eventListener.end('CompilationUnit'); |
2857 return (isDirective ? _astBuilder.directives : _astBuilder.declarations) | 2869 return (isDirective ? _astBuilder.directives : _astBuilder.declarations) |
2858 .first; | 2870 .first; |
2859 } | 2871 } |
2860 | 2872 |
2861 @override | 2873 @override |
2862 TypeAnnotation parseTypeAnnotation(bool inExpression) { | 2874 TypeAnnotation parseTypeAnnotation(bool inExpression) { |
2863 return _run((parser) => parser.parseType) as TypeAnnotation; | 2875 return _run((parser) => parser.parseType) as TypeAnnotation; |
2864 } | 2876 } |
2865 | 2877 |
2866 @override | 2878 @override |
2867 TypeArgumentList parseTypeArgumentList() { | 2879 TypeArgumentList parseTypeArgumentList() { |
2868 return _run((parser) => parser.parseTypeVariablesOpt) as TypeArgumentList; | 2880 return _run((parser) => parser.parseTypeArgumentsOpt) as TypeArgumentList; |
| 2881 } |
| 2882 |
| 2883 @override |
| 2884 TypeName parseTypeName(bool inExpression) { |
| 2885 return _run((parser) => parser.parseType) as TypeName; |
| 2886 } |
| 2887 |
| 2888 @override |
| 2889 TypeParameter parseTypeParameter() { |
| 2890 return _run((parser) => parser.parseTypeVariable) as TypeParameter; |
| 2891 } |
| 2892 |
| 2893 @override |
| 2894 TypeParameterList parseTypeParameterList() { |
| 2895 return _run((parser) => parser.parseTypeVariablesOpt) as TypeParameterList; |
2869 } | 2896 } |
2870 | 2897 |
2871 /** | 2898 /** |
2872 * Runs a single parser function (returned by [getParseFunction]), and returns | 2899 * Runs a single parser function (returned by [getParseFunction]), and returns |
2873 * the result as an analyzer AST. It checks that the parse consumed all of the | 2900 * the result as an analyzer AST. It checks that the parse consumed all of the |
2874 * tokens and that there were [nodeCount] AST nodes created (unless the node | 2901 * tokens and that there were [nodeCount] AST nodes created (unless the node |
2875 * count is negative). | 2902 * count is negative). |
2876 */ | 2903 */ |
2877 Object _run(ParseFunction getParseFunction(fasta.Parser parser), | 2904 Object _run(ParseFunction getParseFunction(fasta.Parser parser), |
2878 {int nodeCount: 1}) { | 2905 {int nodeCount: 1}) { |
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3794 | 3821 |
3795 @override | 3822 @override |
3796 @failingTest | 3823 @failingTest |
3797 void test_parseArgument_unnamed() { | 3824 void test_parseArgument_unnamed() { |
3798 // Uninteresting. Covered by the test_parseArgumentList_* methods. | 3825 // Uninteresting. Covered by the test_parseArgumentList_* methods. |
3799 super.test_parseArgument_unnamed(); | 3826 super.test_parseArgument_unnamed(); |
3800 } | 3827 } |
3801 | 3828 |
3802 @override | 3829 @override |
3803 @failingTest | 3830 @failingTest |
3804 void test_parseArgumentList_empty() { | |
3805 // TODO(brianwilkerson) Produces a method invocation rather than an empty | |
3806 // argument list. | |
3807 super.test_parseArgumentList_empty(); | |
3808 } | |
3809 | |
3810 @override | |
3811 @failingTest | |
3812 void test_parseArgumentList_mixed() { | |
3813 // TODO(brianwilkerson) Produces a method invocation rather than an empty | |
3814 // argument list. | |
3815 super.test_parseArgumentList_mixed(); | |
3816 } | |
3817 | |
3818 @override | |
3819 @failingTest | |
3820 void test_parseArgumentList_noNamed() { | |
3821 // TODO(brianwilkerson) Produces a method invocation rather than an empty | |
3822 // argument list. | |
3823 super.test_parseArgumentList_noNamed(); | |
3824 } | |
3825 | |
3826 @override | |
3827 @failingTest | |
3828 void test_parseArgumentList_onlyNamed() { | |
3829 // TODO(brianwilkerson) Produces a method invocation rather than an empty | |
3830 // argument list. | |
3831 super.test_parseArgumentList_onlyNamed(); | |
3832 } | |
3833 | |
3834 @override | |
3835 @failingTest | |
3836 void test_parseArgumentList_trailing_comma() { | |
3837 // TODO(brianwilkerson) Produces a method invocation rather than an empty | |
3838 // argument list. | |
3839 super.test_parseArgumentList_trailing_comma(); | |
3840 } | |
3841 | |
3842 @override | |
3843 @failingTest | |
3844 void test_parseCombinator_hide() { | 3831 void test_parseCombinator_hide() { |
3845 // Uninteresting. Covered by the test_parseCombinators_* methods. | 3832 // Uninteresting. Covered by the test_parseCombinators_* methods. |
3846 super.test_parseCombinator_hide(); | 3833 super.test_parseCombinator_hide(); |
3847 } | 3834 } |
3848 | 3835 |
3849 @override | 3836 @override |
3850 @failingTest | 3837 @failingTest |
3851 void test_parseCombinator_show() { | 3838 void test_parseCombinator_show() { |
3852 // Uninteresting. Covered by the test_parseCombinators_* methods. | 3839 // Uninteresting. Covered by the test_parseCombinators_* methods. |
3853 super.test_parseCombinator_show(); | 3840 super.test_parseCombinator_show(); |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4089 void test_parseFinalConstVarOrType_void_noIdentifier() { | 4076 void test_parseFinalConstVarOrType_void_noIdentifier() { |
4090 // TODO(brianwilkerson) exception: | 4077 // TODO(brianwilkerson) exception: |
4091 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseFinal
ConstVarOrType'. | 4078 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseFinal
ConstVarOrType'. |
4092 super.test_parseFinalConstVarOrType_void_noIdentifier(); | 4079 super.test_parseFinalConstVarOrType_void_noIdentifier(); |
4093 } | 4080 } |
4094 | 4081 |
4095 @override | 4082 @override |
4096 @failingTest | 4083 @failingTest |
4097 void test_parseFunctionBody_block() { | 4084 void test_parseFunctionBody_block() { |
4098 // TODO(brianwilkerson) exception: | 4085 // TODO(brianwilkerson) exception: |
4099 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseFunct
ionBody'. | 4086 // 'package:front_end/src/fasta/source/stack_listener.dart': Failed assert
ion: line 311 pos 12: 'arrayLength > 0': is not true. |
| 4087 // dart:core _Ass
ertionError._throwNew |
| 4088 // package:front_end/src/fasta/source/stack_listener.dart 311:12 Stac
k.pop |
| 4089 // package:front_end/src/fasta/source/stack_listener.dart 95:25 Stac
kListener.pop |
| 4090 // package:analyzer/src/fasta/ast_builder.dart 287:18 AstB
uilder.endBlockFunctionBody |
| 4091 // test/generated/parser_fasta_listener.dart 592:14 Forw
ardingTestListener.endBlockFunctionBody |
| 4092 // package:front_end/src/fasta/parser/parser.dart 2648:14 Pars
er.parseFunctionBody |
4100 super.test_parseFunctionBody_block(); | 4093 super.test_parseFunctionBody_block(); |
4101 } | 4094 } |
4102 | 4095 |
4103 @override | 4096 @override |
4104 @failingTest | 4097 @failingTest |
4105 void test_parseFunctionBody_block_async() { | 4098 void test_parseFunctionBody_block_async() { |
4106 // TODO(brianwilkerson) exception: | 4099 // TODO(brianwilkerson) The method 'parseFunctionBody' does not handle |
4107 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseFunct
ionBody'. | 4100 // preceding modifiers. |
4108 super.test_parseFunctionBody_block_async(); | 4101 super.test_parseFunctionBody_block_async(); |
4109 } | 4102 } |
4110 | 4103 |
4111 @override | 4104 @override |
4112 @failingTest | 4105 @failingTest |
4113 void test_parseFunctionBody_block_asyncGenerator() { | 4106 void test_parseFunctionBody_block_asyncGenerator() { |
4114 // TODO(brianwilkerson) exception: | 4107 // TODO(brianwilkerson) The method 'parseFunctionBody' does not handle |
4115 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseFunct
ionBody'. | 4108 // preceding modifiers. |
4116 super.test_parseFunctionBody_block_asyncGenerator(); | 4109 super.test_parseFunctionBody_block_asyncGenerator(); |
4117 } | 4110 } |
4118 | 4111 |
4119 @override | 4112 @override |
4120 @failingTest | 4113 @failingTest |
4121 void test_parseFunctionBody_block_syncGenerator() { | 4114 void test_parseFunctionBody_block_syncGenerator() { |
4122 // TODO(brianwilkerson) exception: | 4115 // TODO(brianwilkerson) The method 'parseFunctionBody' does not handle |
4123 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseFunct
ionBody'. | 4116 // preceding modifiers. |
4124 super.test_parseFunctionBody_block_syncGenerator(); | 4117 super.test_parseFunctionBody_block_syncGenerator(); |
4125 } | 4118 } |
4126 | 4119 |
4127 @override | 4120 @override |
4128 @failingTest | 4121 @failingTest |
4129 void test_parseFunctionBody_empty() { | 4122 void test_parseFunctionBody_empty() { |
4130 // TODO(brianwilkerson) exception: | 4123 // TODO(brianwilkerson) exception: |
4131 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseFunct
ionBody'. | 4124 // 'package:front_end/src/fasta/source/stack_listener.dart': Failed assert
ion: line 311 pos 12: 'arrayLength > 0': is not true. |
| 4125 // dart:core _Ass
ertionError._throwNew |
| 4126 // package:front_end/src/fasta/source/stack_listener.dart 311:12 Stac
k.pop |
| 4127 // package:front_end/src/fasta/source/stack_listener.dart 95:25 Stac
kListener.pop |
| 4128 // package:analyzer/src/fasta/ast_builder.dart 269:5 AstB
uilder.handleEmptyFunctionBody |
| 4129 // test/generated/parser_fasta_listener.dart 1171:14 Forw
ardingTestListener.handleEmptyFunctionBody |
| 4130 // package:front_end/src/fasta/parser/parser.dart 2607:16 Pars
er.parseFunctionBody |
4132 super.test_parseFunctionBody_empty(); | 4131 super.test_parseFunctionBody_empty(); |
4133 } | 4132 } |
4134 | 4133 |
4135 @override | 4134 @override |
4136 @failingTest | 4135 @failingTest |
4137 void test_parseFunctionBody_expression() { | 4136 void test_parseFunctionBody_expression() { |
4138 // TODO(brianwilkerson) exception: | 4137 // TODO(brianwilkerson) exception: |
4139 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseFunct
ionBody'. | 4138 // 'package:front_end/src/fasta/source/stack_listener.dart': Failed assert
ion: line 311 pos 12: 'arrayLength > 0': is not true. |
| 4139 // dart:core _Ass
ertionError._throwNew |
| 4140 // package:front_end/src/fasta/source/stack_listener.dart 311:12 Stac
k.pop |
| 4141 // package:front_end/src/fasta/source/stack_listener.dart 95:25 Stac
kListener.pop |
| 4142 // package:analyzer/src/fasta/ast_builder.dart 379:18 AstB
uilder.handleExpressionFunctionBody |
| 4143 // test/generated/parser_fasta_listener.dart 1177:14 Forw
ardingTestListener.handleExpressionFunctionBody |
| 4144 // package:front_end/src/fasta/parser/parser.dart 2614:18 Pars
er.parseFunctionBody |
4140 super.test_parseFunctionBody_expression(); | 4145 super.test_parseFunctionBody_expression(); |
4141 } | 4146 } |
4142 | 4147 |
4143 @override | 4148 @override |
4144 @failingTest | 4149 @failingTest |
4145 void test_parseFunctionBody_expression_async() { | 4150 void test_parseFunctionBody_expression_async() { |
4146 // TODO(brianwilkerson) exception: | 4151 // TODO(brianwilkerson) The method 'parseFunctionBody' does not handle |
4147 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseFunct
ionBody'. | 4152 // preceding modifiers. |
4148 super.test_parseFunctionBody_expression_async(); | 4153 super.test_parseFunctionBody_expression_async(); |
4149 } | 4154 } |
4150 | 4155 |
4151 @override | 4156 @override |
4152 @failingTest | 4157 @failingTest |
4153 void test_parseFunctionBody_skip_block() { | |
4154 // TODO(brianwilkerson) exception: | |
4155 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseFunct
ionBody'. | |
4156 super.test_parseFunctionBody_skip_block(); | |
4157 } | |
4158 | |
4159 @override | |
4160 @failingTest | |
4161 void test_parseFunctionBody_skip_block_invalid() { | |
4162 // TODO(brianwilkerson) exception: | |
4163 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseFunct
ionBody'. | |
4164 super.test_parseFunctionBody_skip_block_invalid(); | |
4165 } | |
4166 | |
4167 @override | |
4168 @failingTest | |
4169 void test_parseFunctionBody_skip_blocks() { | |
4170 // TODO(brianwilkerson) exception: | |
4171 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseFunct
ionBody'. | |
4172 super.test_parseFunctionBody_skip_blocks(); | |
4173 } | |
4174 | |
4175 @override | |
4176 @failingTest | |
4177 void test_parseFunctionBody_skip_expression() { | |
4178 // TODO(brianwilkerson) exception: | |
4179 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseFunct
ionBody'. | |
4180 super.test_parseFunctionBody_skip_expression(); | |
4181 } | |
4182 | |
4183 @override | |
4184 @failingTest | |
4185 void test_parseIdentifierList_multiple() { | 4158 void test_parseIdentifierList_multiple() { |
4186 // TODO(brianwilkerson) exception: | 4159 // TODO(brianwilkerson) exception: |
4187 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseIdent
ifierList'. | 4160 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseIdent
ifierList'. |
4188 super.test_parseIdentifierList_multiple(); | 4161 super.test_parseIdentifierList_multiple(); |
4189 } | 4162 } |
4190 | 4163 |
4191 @override | 4164 @override |
4192 @failingTest | 4165 @failingTest |
4193 void test_parseIdentifierList_single() { | 4166 void test_parseIdentifierList_single() { |
4194 // TODO(brianwilkerson) exception: | 4167 // TODO(brianwilkerson) exception: |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4296 @failingTest | 4269 @failingTest |
4297 void test_parseReturnType_void() { | 4270 void test_parseReturnType_void() { |
4298 // TODO(brianwilkerson) Test isn't passing in enough context. | 4271 // TODO(brianwilkerson) Test isn't passing in enough context. |
4299 // Type 'void' can't be used here because it isn't a return type. | 4272 // Type 'void' can't be used here because it isn't a return type. |
4300 super.test_parseReturnType_void(); | 4273 super.test_parseReturnType_void(); |
4301 } | 4274 } |
4302 | 4275 |
4303 @override | 4276 @override |
4304 @failingTest | 4277 @failingTest |
4305 void test_parseTypeArgumentList_empty() { | 4278 void test_parseTypeArgumentList_empty() { |
4306 // TODO(brianwilkerson) reportUnrecoverableErrorWithToken | 4279 // TODO(brianwilkerson) Does not recover from an empty list. |
4307 super.test_parseTypeArgumentList_empty(); | 4280 super.test_parseTypeArgumentList_empty(); |
4308 } | 4281 } |
4309 | 4282 |
4310 @override | 4283 @override |
4311 @failingTest | 4284 @failingTest |
4312 void test_parseTypeArgumentList_multiple() { | |
4313 // TODO(brianwilkerson) exception: | |
4314 // type 'TypeParameterListImpl' is not a subtype of type 'TypeArgumentList
' in type cast where | |
4315 // TypeParameterListImpl is from package:analyzer/src/dart/ast/ast.dart | |
4316 // TypeArgumentList is from package:analyzer/dart/ast/ast.dart | |
4317 // | |
4318 // dart:core Obje
ct._as | |
4319 // test/generated/parser_fasta_test.dart 2848:59 Pars
erProxy.parseTypeArgumentList | |
4320 super.test_parseTypeArgumentList_multiple(); | |
4321 } | |
4322 | |
4323 @override | |
4324 @failingTest | |
4325 void test_parseTypeArgumentList_nested() { | |
4326 // TODO(brianwilkerson) reportUnrecoverableErrorWithToken | |
4327 super.test_parseTypeArgumentList_nested(); | |
4328 } | |
4329 | |
4330 @override | |
4331 @failingTest | |
4332 void test_parseTypeArgumentList_nested_withComment_double() { | 4285 void test_parseTypeArgumentList_nested_withComment_double() { |
4333 // TODO(brianwilkerson) reportUnrecoverableErrorWithToken | 4286 // TODO(brianwilkerson) Does not capture comment when splitting '>>' into |
| 4287 // two tokens. |
4334 super.test_parseTypeArgumentList_nested_withComment_double(); | 4288 super.test_parseTypeArgumentList_nested_withComment_double(); |
4335 } | 4289 } |
4336 | 4290 |
4337 @override | 4291 @override |
4338 @failingTest | 4292 @failingTest |
4339 void test_parseTypeArgumentList_nested_withComment_tripple() { | 4293 void test_parseTypeArgumentList_nested_withComment_tripple() { |
4340 // TODO(brianwilkerson) reportUnrecoverableErrorWithToken | 4294 // TODO(brianwilkerson) Does not capture comment when splitting '>>' into |
| 4295 // two tokens. |
4341 super.test_parseTypeArgumentList_nested_withComment_tripple(); | 4296 super.test_parseTypeArgumentList_nested_withComment_tripple(); |
4342 } | 4297 } |
4343 | 4298 |
4344 @override | 4299 @override |
4345 @failingTest | 4300 @failingTest |
4346 void test_parseTypeArgumentList_single() { | |
4347 // TODO(brianwilkerson) exception: | |
4348 // type 'TypeParameterListImpl' is not a subtype of type 'TypeArgumentList
' in type cast where | |
4349 // TypeParameterListImpl is from package:analyzer/src/dart/ast/ast.dart | |
4350 // TypeArgumentList is from package:analyzer/dart/ast/ast.dart | |
4351 // | |
4352 // dart:core Obje
ct._as | |
4353 // test/generated/parser_fasta_test.dart 2848:59 Pars
erProxy.parseTypeArgumentList | |
4354 super.test_parseTypeArgumentList_single(); | |
4355 } | |
4356 | |
4357 @override | |
4358 @failingTest | |
4359 void test_parseTypeName_parameterized() { | |
4360 // TODO(brianwilkerson) exception: | |
4361 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseTypeN
ame'. | |
4362 super.test_parseTypeName_parameterized(); | |
4363 } | |
4364 | |
4365 @override | |
4366 @failingTest | |
4367 void test_parseTypeName_parameterized_nullable() { | 4301 void test_parseTypeName_parameterized_nullable() { |
4368 // TODO(brianwilkerson) exception: | 4302 // TODO(brianwilkerson) exception: |
4369 // UnimplementedError | 4303 // UnimplementedError |
4370 // test/generated/parser_fasta_test.dart 2189:7 Fast
aParserTestCase.enableNnbd= | 4304 // test/generated/parser_fasta_test.dart 2189:7 Fast
aParserTestCase.enableNnbd= |
4371 // test/generated/parser_test.dart 12270:5 Fast
aParserTestCase&SimpleParserTestMixin.test_parseTypeName_parameterized_nullable | 4305 // test/generated/parser_test.dart 12270:5 Fast
aParserTestCase&SimpleParserTestMixin.test_parseTypeName_parameterized_nullable |
4372 super.test_parseTypeName_parameterized_nullable(); | 4306 super.test_parseTypeName_parameterized_nullable(); |
4373 } | 4307 } |
4374 | 4308 |
4375 @override | 4309 @override |
4376 @failingTest | 4310 @failingTest |
4377 void test_parseTypeName_simple() { | |
4378 // TODO(brianwilkerson) exception: | |
4379 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseTypeN
ame'. | |
4380 super.test_parseTypeName_simple(); | |
4381 } | |
4382 | |
4383 @override | |
4384 @failingTest | |
4385 void test_parseTypeName_simple_nullable() { | 4311 void test_parseTypeName_simple_nullable() { |
4386 // TODO(brianwilkerson) exception: | 4312 // TODO(brianwilkerson) exception: |
4387 // UnimplementedError | 4313 // UnimplementedError |
4388 // test/generated/parser_fasta_test.dart 2189:7 Fast
aParserTestCase.enableNnbd= | 4314 // test/generated/parser_fasta_test.dart 2189:7 Fast
aParserTestCase.enableNnbd= |
4389 // test/generated/parser_test.dart 12270:5 Fast
aParserTestCase&SimpleParserTestMixin.test_parseTypeName_parameterized_nullable | 4315 // test/generated/parser_test.dart 12270:5 Fast
aParserTestCase&SimpleParserTestMixin.test_parseTypeName_parameterized_nullable |
4390 super.test_parseTypeName_simple_nullable(); | 4316 super.test_parseTypeName_simple_nullable(); |
4391 } | 4317 } |
4392 | 4318 |
4393 @override | 4319 @override |
4394 @failingTest | 4320 @failingTest |
4395 void test_parseTypeParameter_bounded_functionType_noReturn() { | |
4396 // TODO(brianwilkerson) exception: | |
4397 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseTypeP
arameter'. | |
4398 super.test_parseTypeParameter_bounded_functionType_noReturn(); | |
4399 } | |
4400 | |
4401 @override | |
4402 @failingTest | |
4403 void test_parseTypeParameter_bounded_functionType_return() { | |
4404 // TODO(brianwilkerson) exception: | |
4405 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseTypeP
arameter'. | |
4406 super.test_parseTypeParameter_bounded_functionType_return(); | |
4407 } | |
4408 | |
4409 @override | |
4410 @failingTest | |
4411 void test_parseTypeParameter_bounded_generic() { | |
4412 // TODO(brianwilkerson) exception: | |
4413 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseTypeP
arameter'. | |
4414 super.test_parseTypeParameter_bounded_generic(); | |
4415 } | |
4416 | |
4417 @override | |
4418 @failingTest | |
4419 void test_parseTypeParameter_bounded_nullable() { | 4321 void test_parseTypeParameter_bounded_nullable() { |
4420 // TODO(brianwilkerson) exception: | 4322 // TODO(brianwilkerson) exception: |
4421 // UnimplementedError | 4323 // UnimplementedError |
4422 // test/generated/parser_fasta_test.dart 2189:7 Fast
aParserTestCase.enableNnbd= | 4324 // test/generated/parser_fasta_test.dart 2189:7 Fast
aParserTestCase.enableNnbd= |
4423 // test/generated/parser_test.dart 12270:5 Fast
aParserTestCase&SimpleParserTestMixin.test_parseTypeName_parameterized_nullable | 4325 // test/generated/parser_test.dart 12270:5 Fast
aParserTestCase&SimpleParserTestMixin.test_parseTypeName_parameterized_nullable |
4424 super.test_parseTypeParameter_bounded_nullable(); | 4326 super.test_parseTypeParameter_bounded_nullable(); |
4425 } | 4327 } |
4426 | 4328 |
4427 @override | 4329 @override |
4428 @failingTest | 4330 @failingTest |
4429 void test_parseTypeParameter_bounded_simple() { | |
4430 // TODO(brianwilkerson) exception: | |
4431 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseTypeP
arameter'. | |
4432 super.test_parseTypeParameter_bounded_simple(); | |
4433 } | |
4434 | |
4435 @override | |
4436 @failingTest | |
4437 void test_parseTypeParameter_simple() { | |
4438 // TODO(brianwilkerson) exception: | |
4439 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseTypeP
arameter'. | |
4440 super.test_parseTypeParameter_simple(); | |
4441 } | |
4442 | |
4443 @override | |
4444 @failingTest | |
4445 void test_parseTypeParameterList_multiple() { | |
4446 // TODO(brianwilkerson) exception: | |
4447 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseTypeP
arameterList'. | |
4448 super.test_parseTypeParameterList_multiple(); | |
4449 } | |
4450 | |
4451 @override | |
4452 @failingTest | |
4453 void test_parseTypeParameterList_parameterizedWithTrailingEquals() { | 4331 void test_parseTypeParameterList_parameterizedWithTrailingEquals() { |
4454 // TODO(brianwilkerson) exception: | 4332 // TODO(brianwilkerson) reportUnrecoverableError |
4455 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseTypeP
arameterList'. | |
4456 super.test_parseTypeParameterList_parameterizedWithTrailingEquals(); | 4333 super.test_parseTypeParameterList_parameterizedWithTrailingEquals(); |
4457 } | 4334 } |
4458 | 4335 |
4459 @override | 4336 @override |
4460 @failingTest | 4337 @failingTest |
4461 void test_parseTypeParameterList_single() { | 4338 void test_parseTypeParameterList_single() { |
4462 // TODO(brianwilkerson) exception: | 4339 // TODO(brianwilkerson) Does not use all tokens. |
4463 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseTypeP
arameterList'. | |
4464 super.test_parseTypeParameterList_single(); | 4340 super.test_parseTypeParameterList_single(); |
4465 } | 4341 } |
4466 | 4342 |
4467 @override | 4343 @override |
4468 @failingTest | 4344 @failingTest |
4469 void test_parseTypeParameterList_withTrailingEquals() { | 4345 void test_parseTypeParameterList_withTrailingEquals() { |
4470 // TODO(brianwilkerson) exception: | 4346 // TODO(brianwilkerson) reportUnrecoverableError |
4471 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseTypeP
arameterList'. | |
4472 super.test_parseTypeParameterList_withTrailingEquals(); | 4347 super.test_parseTypeParameterList_withTrailingEquals(); |
4473 } | 4348 } |
4474 | 4349 |
4475 @override | 4350 @override |
4476 @failingTest | 4351 @failingTest |
4477 void test_parseVariableDeclaration_equals() { | 4352 void test_parseVariableDeclaration_equals() { |
4478 // TODO(brianwilkerson) exception: | 4353 // TODO(brianwilkerson) exception: |
4479 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseVaria
bleDeclaration'. | 4354 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseVaria
bleDeclaration'. |
4480 super.test_parseVariableDeclaration_equals(); | 4355 super.test_parseVariableDeclaration_equals(); |
4481 } | 4356 } |
(...skipping 25 matching lines...) Expand all Loading... |
4507 | 4382 |
4508 /** | 4383 /** |
4509 * Tests of the fasta parser based on [StatementParserTestMixin]. | 4384 * Tests of the fasta parser based on [StatementParserTestMixin]. |
4510 */ | 4385 */ |
4511 @reflectiveTest | 4386 @reflectiveTest |
4512 class StatementParserTest_Fasta extends FastaParserTestCase | 4387 class StatementParserTest_Fasta extends FastaParserTestCase |
4513 with StatementParserTestMixin { | 4388 with StatementParserTestMixin { |
4514 @override | 4389 @override |
4515 @failingTest | 4390 @failingTest |
4516 void test_parseAssertStatement_trailingComma_message() { | 4391 void test_parseAssertStatement_trailingComma_message() { |
| 4392 // TODO(brianwilkerson) Does not handle optional trailing comma. |
4517 super.test_parseAssertStatement_trailingComma_message(); | 4393 super.test_parseAssertStatement_trailingComma_message(); |
4518 } | 4394 } |
4519 | 4395 |
4520 @override | 4396 @override |
4521 @failingTest | 4397 @failingTest |
4522 void test_parseAssertStatement_trailingComma_noMessage() { | 4398 void test_parseAssertStatement_trailingComma_noMessage() { |
| 4399 // TODO(brianwilkerson) Does not handle optional trailing comma. |
4523 super.test_parseAssertStatement_trailingComma_noMessage(); | 4400 super.test_parseAssertStatement_trailingComma_noMessage(); |
4524 } | 4401 } |
4525 | 4402 |
4526 @override | 4403 @override |
4527 @failingTest | 4404 @failingTest |
4528 void test_parseBreakStatement_noLabel() { | 4405 void test_parseBreakStatement_noLabel() { |
| 4406 // TODO(brianwilkerson) |
| 4407 // Expected 1 errors of type ParserErrorCode.BREAK_OUTSIDE_OF_LOOP, found 0 |
4529 super.test_parseBreakStatement_noLabel(); | 4408 super.test_parseBreakStatement_noLabel(); |
4530 } | 4409 } |
4531 | 4410 |
4532 @override | 4411 @override |
4533 @failingTest | 4412 @failingTest |
4534 void test_parseContinueStatement_label() { | 4413 void test_parseContinueStatement_label() { |
| 4414 // TODO(brianwilkerson) |
| 4415 // Expected 1 errors of type ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP, found
0 |
4535 super.test_parseContinueStatement_label(); | 4416 super.test_parseContinueStatement_label(); |
4536 } | 4417 } |
4537 | 4418 |
4538 @override | 4419 @override |
4539 @failingTest | 4420 @failingTest |
4540 void test_parseContinueStatement_noLabel() { | 4421 void test_parseContinueStatement_noLabel() { |
| 4422 // TODO(brianwilkerson) |
| 4423 // Expected 1 errors of type ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP, found
0 |
4541 super.test_parseContinueStatement_noLabel(); | 4424 super.test_parseContinueStatement_noLabel(); |
4542 } | 4425 } |
4543 | 4426 |
4544 @override | 4427 @override |
4545 @failingTest | 4428 @failingTest |
4546 void test_parseStatement_emptyTypeArgumentList() { | 4429 void test_parseStatement_emptyTypeArgumentList() { |
| 4430 // TODO(brianwilkerson) Does not recover from empty list. |
4547 super.test_parseStatement_emptyTypeArgumentList(); | 4431 super.test_parseStatement_emptyTypeArgumentList(); |
4548 } | 4432 } |
4549 | |
4550 @override | |
4551 @failingTest | |
4552 void test_parseTryStatement_catch_finally() { | |
4553 super.test_parseTryStatement_catch_finally(); | |
4554 } | |
4555 | |
4556 @override | |
4557 @failingTest | |
4558 void test_parseTryStatement_on_catch() { | |
4559 super.test_parseTryStatement_on_catch(); | |
4560 } | |
4561 | |
4562 @override | |
4563 @failingTest | |
4564 void test_parseTryStatement_on_catch_finally() { | |
4565 super.test_parseTryStatement_on_catch_finally(); | |
4566 } | |
4567 } | 4433 } |
4568 | 4434 |
4569 /** | 4435 /** |
4570 * Tests of the fasta parser based on [TopLevelParserTestMixin]. | 4436 * Tests of the fasta parser based on [TopLevelParserTestMixin]. |
4571 */ | 4437 */ |
4572 @reflectiveTest | 4438 @reflectiveTest |
4573 class TopLevelParserTest_Fasta extends FastaParserTestCase | 4439 class TopLevelParserTest_Fasta extends FastaParserTestCase |
4574 with TopLevelParserTestMixin { | 4440 with TopLevelParserTestMixin { |
4575 void test_parseClassDeclaration_native_allowed() { | 4441 void test_parseClassDeclaration_native_allowed() { |
4576 allowNativeClause = true; | 4442 allowNativeClause = true; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4658 @override | 4524 @override |
4659 @failingTest | 4525 @failingTest |
4660 void test_parseDirectives_mixed() { | 4526 void test_parseDirectives_mixed() { |
4661 // TODO(paulberry,ahe): This test verifies the analyzer parser's ability to | 4527 // TODO(paulberry,ahe): This test verifies the analyzer parser's ability to |
4662 // stop parsing as soon as the first non-directive is encountered; this is | 4528 // stop parsing as soon as the first non-directive is encountered; this is |
4663 // useful for quickly traversing an import graph. Consider adding a similar | 4529 // useful for quickly traversing an import graph. Consider adding a similar |
4664 // ability to Fasta's parser. | 4530 // ability to Fasta's parser. |
4665 super.test_parseDirectives_mixed(); | 4531 super.test_parseDirectives_mixed(); |
4666 } | 4532 } |
4667 } | 4533 } |
OLD | NEW |