Chromium Code Reviews| 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/error/error.dart'; | 7 import 'package:analyzer/error/error.dart'; |
| 8 import 'package:analyzer/error/listener.dart' show ErrorReporter; | 8 import 'package:analyzer/error/listener.dart' show ErrorReporter; |
| 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 274 set enableNnbd(bool value) { | 274 set enableNnbd(bool value) { |
| 275 if (value == true) { | 275 if (value == true) { |
| 276 // TODO(paulberry,ahe): non-null-by-default syntax is not supported by | 276 // TODO(paulberry,ahe): non-null-by-default syntax is not supported by |
| 277 // Fasta. | 277 // Fasta. |
| 278 throw new UnimplementedError(); | 278 throw new UnimplementedError(); |
| 279 } | 279 } |
| 280 } | 280 } |
| 281 | 281 |
| 282 @override | 282 @override |
| 283 set enableUriInPartOf(bool value) { | 283 set enableUriInPartOf(bool value) { |
| 284 if (value == true) { | 284 if (value == false) { |
| 285 // TODO(paulberry,ahe): URIs in "part of" declarations are not supported | 285 // URIs in "part of" declarations cannot be disabled in Fasta. |
| 286 // by Fasta. | |
| 287 throw new UnimplementedError(); | 286 throw new UnimplementedError(); |
|
kevmoo
2017/08/16 20:36:29
Nit: might be nice to actually put the content of
danrubel
2017/08/17 12:51:55
Good point. Done.
| |
| 288 } | 287 } |
| 289 } | 288 } |
| 290 | 289 |
| 291 @override | 290 @override |
| 292 analyzer.Parser get parser => _parserProxy; | 291 analyzer.Parser get parser => _parserProxy; |
| 293 | 292 |
| 294 @override | 293 @override |
| 295 bool get usingFastaParser => true; | 294 bool get usingFastaParser => true; |
| 296 | 295 |
| 297 @override | 296 @override |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 992 @override | 991 @override |
| 993 @failingTest | 992 @failingTest |
| 994 void test_parseDirectives_mixed() { | 993 void test_parseDirectives_mixed() { |
| 995 // TODO(paulberry,ahe): This test verifies the analyzer parser's ability to | 994 // TODO(paulberry,ahe): This test verifies the analyzer parser's ability to |
| 996 // stop parsing as soon as the first non-directive is encountered; this is | 995 // stop parsing as soon as the first non-directive is encountered; this is |
| 997 // useful for quickly traversing an import graph. Consider adding a similar | 996 // useful for quickly traversing an import graph. Consider adding a similar |
| 998 // ability to Fasta's parser. | 997 // ability to Fasta's parser. |
| 999 super.test_parseDirectives_mixed(); | 998 super.test_parseDirectives_mixed(); |
| 1000 } | 999 } |
| 1001 | 1000 |
| 1002 @override | |
| 1003 @failingTest | |
| 1004 void test_parsePartOfDirective_name() { | |
| 1005 // TODO(paulberry,ahe): Thes test verifies that even if URIs in "part of" | |
| 1006 // declarations are enabled, a construct of the form "part of identifier;" | |
| 1007 // is still properly handled. URIs in "part of" declarations are not | |
| 1008 // supported by Fasta yet. | |
| 1009 super.test_parsePartOfDirective_name(); | |
| 1010 } | |
| 1011 | |
| 1012 @override | |
| 1013 @failingTest | |
| 1014 void test_parsePartOfDirective_uri() { | |
| 1015 // TODO(paulberry,ahe): URIs in "part of" declarations are not supported by | |
| 1016 // Fasta. | |
| 1017 super.test_parsePartOfDirective_uri(); | |
| 1018 } | |
| 1019 | |
| 1020 @failingTest | 1001 @failingTest |
| 1021 void test_parseCompilationUnit_operatorAsPrefix_parameterized2() { | 1002 void test_parseCompilationUnit_operatorAsPrefix_parameterized2() { |
| 1022 // TODO(danrubel): should not be generating an error | 1003 // TODO(danrubel): should not be generating an error |
| 1023 super.test_parseCompilationUnit_operatorAsPrefix_parameterized(); | 1004 super.test_parseCompilationUnit_operatorAsPrefix_parameterized(); |
| 1024 assertNoErrors(); | 1005 assertNoErrors(); |
| 1025 } | 1006 } |
| 1026 | 1007 |
| 1027 @failingTest | 1008 @failingTest |
| 1028 void test_parseCompilationUnit_typedefAsPrefix2() { | 1009 void test_parseCompilationUnit_typedefAsPrefix2() { |
| 1029 // TODO(danrubel): should not be generating an error | 1010 // TODO(danrubel): should not be generating an error |
| 1030 super.test_parseCompilationUnit_typedefAsPrefix(); | 1011 super.test_parseCompilationUnit_typedefAsPrefix(); |
| 1031 assertNoErrors(); | 1012 assertNoErrors(); |
| 1032 } | 1013 } |
| 1033 | 1014 |
| 1034 @failingTest | 1015 @failingTest |
| 1035 void test_parseCompilationUnitMember_abstractAsPrefix2() { | 1016 void test_parseCompilationUnitMember_abstractAsPrefix2() { |
| 1036 // TODO(danrubel): should not be generating an error | 1017 // TODO(danrubel): should not be generating an error |
| 1037 super.test_parseCompilationUnitMember_abstractAsPrefix(); | 1018 super.test_parseCompilationUnitMember_abstractAsPrefix(); |
| 1038 assertNoErrors(); | 1019 assertNoErrors(); |
| 1039 } | 1020 } |
| 1040 } | 1021 } |
| OLD | NEW |