| 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/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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 // TODO(paulberry): Unhandled event: ThisExpression | 126 // TODO(paulberry): Unhandled event: ThisExpression |
| 127 super.test_parseConstructorFieldInitializer_qualified(); | 127 super.test_parseConstructorFieldInitializer_qualified(); |
| 128 } | 128 } |
| 129 | 129 |
| 130 @override | 130 @override |
| 131 @failingTest | 131 @failingTest |
| 132 void test_parseConstructorFieldInitializer_unqualified() { | 132 void test_parseConstructorFieldInitializer_unqualified() { |
| 133 // TODO(paulberry): Expected: an object with length of <1> | 133 // TODO(paulberry): Expected: an object with length of <1> |
| 134 super.test_parseConstructorFieldInitializer_unqualified(); | 134 super.test_parseConstructorFieldInitializer_unqualified(); |
| 135 } | 135 } |
| 136 | |
| 137 @override | |
| 138 @failingTest | |
| 139 void test_parseGetter_nonStatic() { | |
| 140 // TODO(paulberry): handle doc comments | |
| 141 super.test_parseGetter_nonStatic(); | |
| 142 } | |
| 143 | |
| 144 @override | |
| 145 @failingTest | |
| 146 void test_parseGetter_static() { | |
| 147 // TODO(paulberry): Invalid modifier (static). Report an error. | |
| 148 super.test_parseGetter_static(); | |
| 149 } | |
| 150 | |
| 151 @override | |
| 152 @failingTest | |
| 153 void test_parseInitializedIdentifierList_type() { | |
| 154 // TODO(paulberry): handle doc comments | |
| 155 super.test_parseInitializedIdentifierList_type(); | |
| 156 } | |
| 157 | |
| 158 @override | |
| 159 @failingTest | |
| 160 void test_parseInitializedIdentifierList_var() { | |
| 161 // TODO(paulberry): handle doc comments | |
| 162 super.test_parseInitializedIdentifierList_var(); | |
| 163 } | |
| 164 | |
| 165 @override | |
| 166 @failingTest | |
| 167 void test_parseOperator() { | |
| 168 // TODO(paulberry): handle doc comments | |
| 169 super.test_parseOperator(); | |
| 170 } | |
| 171 | |
| 172 @override | |
| 173 @failingTest | |
| 174 void test_parseSetter_nonStatic() { | |
| 175 // TODO(paulberry): handle doc comments | |
| 176 super.test_parseSetter_nonStatic(); | |
| 177 } | |
| 178 | |
| 179 @override | |
| 180 @failingTest | |
| 181 void test_parseSetter_static() { | |
| 182 // TODO(paulberry): Invalid modifier (static). Report an error. | |
| 183 super.test_parseSetter_static(); | |
| 184 } | |
| 185 } | 136 } |
| 186 | 137 |
| 187 /** | 138 /** |
| 188 * Tests of the fasta parser based on [ComplexParserTestMixin]. | 139 * Tests of the fasta parser based on [ComplexParserTestMixin]. |
| 189 */ | 140 */ |
| 190 @reflectiveTest | 141 @reflectiveTest |
| 191 class ComplexParserTest_Fasta extends FastaParserTestCase | 142 class ComplexParserTest_Fasta extends FastaParserTestCase |
| 192 with ComplexParserTestMixin { | 143 with ComplexParserTestMixin { |
| 193 @override | 144 @override |
| 194 @failingTest | 145 @failingTest |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 fail('Not implemented'); | 552 fail('Not implemented'); |
| 602 } | 553 } |
| 603 | 554 |
| 604 @override | 555 @override |
| 605 void assertNoErrors() { | 556 void assertNoErrors() { |
| 606 // TODO(paulberry): implement assertNoErrors | 557 // TODO(paulberry): implement assertNoErrors |
| 607 } | 558 } |
| 608 | 559 |
| 609 @override | 560 @override |
| 610 void createParser(String content) { | 561 void createParser(String content) { |
| 611 var scanner = new StringScanner(content); | 562 var scanner = new StringScanner(content, includeComments: true); |
| 612 _parserProxy = new ParserProxy(scanner.tokenize()); | 563 _parserProxy = new ParserProxy(scanner.tokenize()); |
| 613 } | 564 } |
| 614 | 565 |
| 615 @override | 566 @override |
| 616 Expression parseAdditiveExpression(String code) { | 567 Expression parseAdditiveExpression(String code) { |
| 617 return _parseExpression(code); | 568 return _parseExpression(code); |
| 618 } | 569 } |
| 619 | 570 |
| 620 @override | 571 @override |
| 621 Expression parseAssignableExpression(String code, bool primaryAllowed) { | 572 Expression parseAssignableExpression(String code, bool primaryAllowed) { |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1203 void test_parseDirectives_mixed() { | 1154 void test_parseDirectives_mixed() { |
| 1204 // TODO(paulberry,ahe): This test verifies the analyzer parser's ability to | 1155 // TODO(paulberry,ahe): This test verifies the analyzer parser's ability to |
| 1205 // stop parsing as soon as the first non-directive is encountered; this is | 1156 // stop parsing as soon as the first non-directive is encountered; this is |
| 1206 // useful for quickly traversing an import graph. Consider adding a similar | 1157 // useful for quickly traversing an import graph. Consider adding a similar |
| 1207 // ability to Fasta's parser. | 1158 // ability to Fasta's parser. |
| 1208 super.test_parseDirectives_mixed(); | 1159 super.test_parseDirectives_mixed(); |
| 1209 } | 1160 } |
| 1210 | 1161 |
| 1211 @override | 1162 @override |
| 1212 @failingTest | 1163 @failingTest |
| 1213 void test_parseFunctionDeclaration_function() { | |
| 1214 // TODO(paulberry): handle doc comments | |
| 1215 super.test_parseFunctionDeclaration_function(); | |
| 1216 } | |
| 1217 | |
| 1218 @override | |
| 1219 @failingTest | |
| 1220 void test_parseFunctionDeclaration_functionWithTypeParameters() { | |
| 1221 // TODO(paulberry): handle doc comments | |
| 1222 super.test_parseFunctionDeclaration_functionWithTypeParameters(); | |
| 1223 } | |
| 1224 | |
| 1225 @override | |
| 1226 @failingTest | |
| 1227 void test_parseFunctionDeclaration_functionWithTypeParameters_comment() { | 1164 void test_parseFunctionDeclaration_functionWithTypeParameters_comment() { |
| 1228 // TODO(paulberry,ahe): generic method comment syntax is not supported by | 1165 // TODO(paulberry,ahe): generic method comment syntax is not supported by |
| 1229 // Fasta. | 1166 // Fasta. |
| 1230 super.test_parseFunctionDeclaration_functionWithTypeParameters_comment(); | 1167 super.test_parseFunctionDeclaration_functionWithTypeParameters_comment(); |
| 1231 } | 1168 } |
| 1232 | 1169 |
| 1233 @override | 1170 @override |
| 1234 @failingTest | 1171 @failingTest |
| 1235 void test_parseFunctionDeclaration_getter() { | |
| 1236 // TODO(paulberry): handle doc comments | |
| 1237 super.test_parseFunctionDeclaration_getter(); | |
| 1238 } | |
| 1239 | |
| 1240 @override | |
| 1241 @failingTest | |
| 1242 void test_parseFunctionDeclaration_setter() { | |
| 1243 // TODO(paulberry): handle doc comments | |
| 1244 super.test_parseFunctionDeclaration_setter(); | |
| 1245 } | |
| 1246 | |
| 1247 @override | |
| 1248 @failingTest | |
| 1249 void test_parsePartOfDirective_name() { | 1172 void test_parsePartOfDirective_name() { |
| 1250 // TODO(paulberry,ahe): Thes test verifies that even if URIs in "part of" | 1173 // TODO(paulberry,ahe): Thes test verifies that even if URIs in "part of" |
| 1251 // declarations are enabled, a construct of the form "part of identifier;" | 1174 // declarations are enabled, a construct of the form "part of identifier;" |
| 1252 // is still properly handled. URIs in "part of" declarations are not | 1175 // is still properly handled. URIs in "part of" declarations are not |
| 1253 // supported by Fasta yet. | 1176 // supported by Fasta yet. |
| 1254 super.test_parsePartOfDirective_name(); | 1177 super.test_parsePartOfDirective_name(); |
| 1255 } | 1178 } |
| 1256 | 1179 |
| 1257 @override | 1180 @override |
| 1258 @failingTest | 1181 @failingTest |
| 1259 void test_parsePartOfDirective_uri() { | 1182 void test_parsePartOfDirective_uri() { |
| 1260 // TODO(paulberry,ahe): URIs in "part of" declarations are not supported by | 1183 // TODO(paulberry,ahe): URIs in "part of" declarations are not supported by |
| 1261 // Fasta. | 1184 // Fasta. |
| 1262 super.test_parsePartOfDirective_uri(); | 1185 super.test_parsePartOfDirective_uri(); |
| 1263 } | 1186 } |
| 1264 } | 1187 } |
| OLD | NEW |