Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: pkg/analyzer/test/generated/parser_fasta_test.dart

Issue 2707663002: Implement AstBuilder support for library, part, and part-of declarations. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/element/element.dart'; 6 import 'package:analyzer/dart/element/element.dart';
7 import 'package:analyzer/error/error.dart'; 7 import 'package:analyzer/error/error.dart';
8 import 'package:analyzer/src/generated/parser.dart' as analyzer; 8 import 'package:analyzer/src/generated/parser.dart' as analyzer;
9 import 'package:front_end/src/fasta/analyzer/ast_builder.dart'; 9 import 'package:front_end/src/fasta/analyzer/ast_builder.dart';
10 import 'package:front_end/src/fasta/analyzer/element_store.dart'; 10 import 'package:front_end/src/fasta/analyzer/element_store.dart';
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 @failingTest 576 @failingTest
577 void test_parseCompilationUnit_builtIn_asFunctionName() { 577 void test_parseCompilationUnit_builtIn_asFunctionName() {
578 // TODO(paulberry,ahe): Fasta's parser is confused when one of the built-in 578 // TODO(paulberry,ahe): Fasta's parser is confused when one of the built-in
579 // identifiers `export`, `import`, `library`, `part`, or `typedef` appears 579 // identifiers `export`, `import`, `library`, `part`, or `typedef` appears
580 // as the name of a top level function with an implicit return type. 580 // as the name of a top level function with an implicit return type.
581 super.test_parseCompilationUnit_builtIn_asFunctionName(); 581 super.test_parseCompilationUnit_builtIn_asFunctionName();
582 } 582 }
583 583
584 @override 584 @override
585 @failingTest 585 @failingTest
586 void test_parseCompilationUnit_directives_multiple() {
587 // TODO(paulberry): Unhandled event: LibraryName
588 super.test_parseCompilationUnit_directives_multiple();
589 }
590
591 @override
592 @failingTest
593 void test_parseCompilationUnit_directives_single() {
594 // TODO(paulberry): Unhandled event: LibraryName
595 super.test_parseCompilationUnit_directives_single();
596 }
597
598 @override
599 @failingTest
600 void test_parseCompilationUnit_empty() { 586 void test_parseCompilationUnit_empty() {
601 // TODO(paulberry): No objects placed on stack 587 // TODO(paulberry): No objects placed on stack
602 super.test_parseCompilationUnit_empty(); 588 super.test_parseCompilationUnit_empty();
603 } 589 }
604 590
605 @override 591 @override
606 @failingTest 592 @failingTest
607 void test_parseCompilationUnit_exportAsPrefix() { 593 void test_parseCompilationUnit_exportAsPrefix() {
608 // TODO(paulberry): TODO(paulberry,ahe): Fasta parser doesn't appear to hand le this case correctly. 594 // TODO(paulberry): TODO(paulberry,ahe): Fasta parser doesn't appear to hand le this case correctly.
609 super.test_parseCompilationUnit_exportAsPrefix(); 595 super.test_parseCompilationUnit_exportAsPrefix();
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 789
804 @override 790 @override
805 @failingTest 791 @failingTest
806 void test_parseCompilationUnitMember_variableSet() { 792 void test_parseCompilationUnitMember_variableSet() {
807 // TODO(paulberry): Unhandled event: FieldInitializer 793 // TODO(paulberry): Unhandled event: FieldInitializer
808 super.test_parseCompilationUnitMember_variableSet(); 794 super.test_parseCompilationUnitMember_variableSet();
809 } 795 }
810 796
811 @override 797 @override
812 @failingTest 798 @failingTest
813 void test_parseDirective_library() {
814 // TODO(paulberry): Unhandled event: LibraryName
815 super.test_parseDirective_library();
816 }
817
818 @override
819 @failingTest
820 void test_parseDirective_part() {
821 // TODO(paulberry): Unhandled event: Part
822 super.test_parseDirective_part();
823 }
824
825 @override
826 @failingTest
827 void test_parseDirective_partOf() {
828 // TODO(paulberry): Unhandled event: PartOf
829 super.test_parseDirective_partOf();
830 }
831
832 @override
833 @failingTest
834 void test_parseDirectives_complete() { 799 void test_parseDirectives_complete() {
835 // TODO(paulberry): Unhandled event: LibraryName 800 // TODO(paulberry,ahe): Fasta doesn't support script tags yet.
ahe 2017/02/20 09:59:39 Can I assume this is low priority?
Paul Berry 2017/02/20 14:48:31 Agreed, It's pretty low priority IMO.
836 super.test_parseDirectives_complete(); 801 super.test_parseDirectives_complete();
837 } 802 }
838 803
839 @override 804 @override
840 @failingTest 805 @failingTest
841 void test_parseDirectives_empty() { 806 void test_parseDirectives_empty() {
842 // TODO(paulberry): No objects placed on stack 807 // TODO(paulberry): No objects placed on stack
843 super.test_parseDirectives_empty(); 808 super.test_parseDirectives_empty();
844 } 809 }
845 810
846 @override 811 @override
847 @failingTest 812 @failingTest
848 void test_parseDirectives_mixed() { 813 void test_parseDirectives_mixed() {
849 // TODO(paulberry): Unhandled event: LibraryName 814 // TODO(paulberry,ahe): This test verifies the analyzer parser's ability to
815 // stop parsing as soon as the first non-directive is encountered; this is
816 // useful for quickly traversing an import graph. Consider adding a similar
817 // ability to Fasta's parser.
ahe 2017/02/20 09:59:39 I think that should be easy. Let me know how soon
Paul Berry 2017/02/20 14:48:31 It would be nice to get this within the next coupl
850 super.test_parseDirectives_mixed(); 818 super.test_parseDirectives_mixed();
851 } 819 }
852 820
853 @override 821 @override
854 @failingTest 822 @failingTest
855 void test_parseDirectives_multiple() {
856 // TODO(paulberry): Unhandled event: LibraryName
857 super.test_parseDirectives_multiple();
858 }
859
860 @override
861 @failingTest
862 void test_parseDirectives_script() { 823 void test_parseDirectives_script() {
863 // TODO(paulberry): No objects placed on stack 824 // TODO(paulberry): No objects placed on stack
864 super.test_parseDirectives_script(); 825 super.test_parseDirectives_script();
865 } 826 }
866 827
867 @override 828 @override
868 @failingTest 829 @failingTest
869 void test_parseDirectives_single() {
870 // TODO(paulberry): Unhandled event: LibraryName
871 super.test_parseDirectives_single();
872 }
873
874 @override
875 @failingTest
876 void test_parseEnumDeclaration_one() { 830 void test_parseEnumDeclaration_one() {
877 // TODO(paulberry): Unhandled event: Enum 831 // TODO(paulberry): Unhandled event: Enum
878 super.test_parseEnumDeclaration_one(); 832 super.test_parseEnumDeclaration_one();
879 } 833 }
880 834
881 @override 835 @override
882 @failingTest 836 @failingTest
883 void test_parseEnumDeclaration_trailingComma() { 837 void test_parseEnumDeclaration_trailingComma() {
884 // TODO(paulberry): Unhandled event: Enum 838 // TODO(paulberry): Unhandled event: Enum
885 super.test_parseEnumDeclaration_trailingComma(); 839 super.test_parseEnumDeclaration_trailingComma();
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 905
952 @override 906 @override
953 @failingTest 907 @failingTest
954 void test_parseImportDirective_configuration_single() { 908 void test_parseImportDirective_configuration_single() {
955 // TODO(paulberry): Implement endConditionalUri 909 // TODO(paulberry): Implement endConditionalUri
956 super.test_parseImportDirective_configuration_single(); 910 super.test_parseImportDirective_configuration_single();
957 } 911 }
958 912
959 @override 913 @override
960 @failingTest 914 @failingTest
961 void test_parseLibraryDirective() {
962 // TODO(paulberry): Unhandled event: LibraryName
963 super.test_parseLibraryDirective();
964 }
965
966 @override
967 @failingTest
968 void test_parsePartDirective() {
969 // TODO(paulberry): Unhandled event: Part
970 super.test_parsePartDirective();
971 }
972
973 @override
974 @failingTest
975 void test_parsePartOfDirective_name() { 915 void test_parsePartOfDirective_name() {
976 // TODO(paulberry): Unhandled event: PartOf 916 // TODO(paulberry,ahe): Thes test verifies that even if URIs in "part of"
917 // declarations are enabled, a construct of the form "part of identifier;"
918 // is still properly handled. URIs in "part of" declarations are not
919 // supported by Fasta yet.
ahe 2017/02/20 09:59:39 Yeah. I think this is legacy syntax, and I general
977 super.test_parsePartOfDirective_name(); 920 super.test_parsePartOfDirective_name();
978 } 921 }
979 922
980 @override 923 @override
981 @failingTest 924 @failingTest
982 void test_parsePartOfDirective_uri() { 925 void test_parsePartOfDirective_uri() {
983 // TODO(paulberry,ahe): URIs in "part of" declarations are not supported by 926 // TODO(paulberry,ahe): URIs in "part of" declarations are not supported by
984 // Fasta. 927 // Fasta.
985 super.test_parsePartOfDirective_uri(); 928 super.test_parsePartOfDirective_uri();
986 } 929 }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 void test_parseTypeAlias_genericFunction_typeParameters_voidReturnType() { 1037 void test_parseTypeAlias_genericFunction_typeParameters_voidReturnType() {
1095 super.test_parseTypeAlias_genericFunction_typeParameters_voidReturnType(); 1038 super.test_parseTypeAlias_genericFunction_typeParameters_voidReturnType();
1096 } 1039 }
1097 1040
1098 @override 1041 @override
1099 @failingTest 1042 @failingTest
1100 void test_parseTypeAlias_genericFunction_voidReturnType() { 1043 void test_parseTypeAlias_genericFunction_voidReturnType() {
1101 super.test_parseTypeAlias_genericFunction_voidReturnType(); 1044 super.test_parseTypeAlias_genericFunction_voidReturnType();
1102 } 1045 }
1103 } 1046 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/parser_test.dart » ('j') | pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698