From cb863390f23bc2eac6561d55def9bd3ba54605fc Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Fri, 15 Jan 2021 18:57:32 +0100 Subject: Handle self/super/crate in PathSegment as NameRef --- crates/syntax/test_data/parser/inline/err/0015_empty_segment.rast | 3 ++- crates/syntax/test_data/parser/inline/ok/0002_use_tree_list.rast | 3 ++- crates/syntax/test_data/parser/inline/ok/0052_path_type.rast | 6 ++++-- crates/syntax/test_data/parser/inline/ok/0062_mod_contents.rast | 3 ++- crates/syntax/test_data/parser/inline/ok/0067_crate_path.rast | 3 ++- .../test_data/parser/inline/ok/0069_use_tree_list_after_path.rast | 6 ++++-- crates/syntax/test_data/parser/inline/ok/0117_macro_call_type.rast | 3 ++- .../syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rast | 3 ++- .../syntax/test_data/parser/inline/ok/0153_pub_parens_typepath.rast | 6 ++++-- 9 files changed, 24 insertions(+), 12 deletions(-) (limited to 'crates/syntax/test_data/parser/inline') diff --git a/crates/syntax/test_data/parser/inline/err/0015_empty_segment.rast b/crates/syntax/test_data/parser/inline/err/0015_empty_segment.rast index e872526d9..d3c5dde58 100644 --- a/crates/syntax/test_data/parser/inline/err/0015_empty_segment.rast +++ b/crates/syntax/test_data/parser/inline/err/0015_empty_segment.rast @@ -6,7 +6,8 @@ SOURCE_FILE@0..13 PATH@4..11 PATH@4..9 PATH_SEGMENT@4..9 - CRATE_KW@4..9 "crate" + NAME_REF@4..9 + CRATE_KW@4..9 "crate" COLON2@9..11 "::" SEMICOLON@11..12 ";" WHITESPACE@12..13 "\n" diff --git a/crates/syntax/test_data/parser/inline/ok/0002_use_tree_list.rast b/crates/syntax/test_data/parser/inline/ok/0002_use_tree_list.rast index f40500e38..970826739 100644 --- a/crates/syntax/test_data/parser/inline/ok/0002_use_tree_list.rast +++ b/crates/syntax/test_data/parser/inline/ok/0002_use_tree_list.rast @@ -11,7 +11,8 @@ SOURCE_FILE@0..248 PATH@5..16 PATH@5..10 PATH_SEGMENT@5..10 - CRATE_KW@5..10 "crate" + NAME_REF@5..10 + CRATE_KW@5..10 "crate" COLON2@10..12 "::" PATH_SEGMENT@12..16 NAME_REF@12..16 diff --git a/crates/syntax/test_data/parser/inline/ok/0052_path_type.rast b/crates/syntax/test_data/parser/inline/ok/0052_path_type.rast index 9bc36bea7..46a103d5b 100644 --- a/crates/syntax/test_data/parser/inline/ok/0052_path_type.rast +++ b/crates/syntax/test_data/parser/inline/ok/0052_path_type.rast @@ -42,7 +42,8 @@ SOURCE_FILE@0..71 PATH@39..48 PATH@39..43 PATH_SEGMENT@39..43 - SELF_KW@39..43 "self" + NAME_REF@39..43 + SELF_KW@39..43 "self" COLON2@43..45 "::" PATH_SEGMENT@45..48 NAME_REF@45..48 @@ -61,7 +62,8 @@ SOURCE_FILE@0..71 PATH@59..69 PATH@59..64 PATH_SEGMENT@59..64 - SUPER_KW@59..64 "super" + NAME_REF@59..64 + SUPER_KW@59..64 "super" COLON2@64..66 "::" PATH_SEGMENT@66..69 NAME_REF@66..69 diff --git a/crates/syntax/test_data/parser/inline/ok/0062_mod_contents.rast b/crates/syntax/test_data/parser/inline/ok/0062_mod_contents.rast index e4fb32de1..583dcac7e 100644 --- a/crates/syntax/test_data/parser/inline/ok/0062_mod_contents.rast +++ b/crates/syntax/test_data/parser/inline/ok/0062_mod_contents.rast @@ -43,7 +43,8 @@ SOURCE_FILE@0..70 PATH@45..55 PATH@45..50 PATH_SEGMENT@45..50 - SUPER_KW@45..50 "super" + NAME_REF@45..50 + SUPER_KW@45..50 "super" COLON2@50..52 "::" PATH_SEGMENT@52..55 NAME_REF@52..55 diff --git a/crates/syntax/test_data/parser/inline/ok/0067_crate_path.rast b/crates/syntax/test_data/parser/inline/ok/0067_crate_path.rast index 702f2e0b0..87c0c48dc 100644 --- a/crates/syntax/test_data/parser/inline/ok/0067_crate_path.rast +++ b/crates/syntax/test_data/parser/inline/ok/0067_crate_path.rast @@ -6,7 +6,8 @@ SOURCE_FILE@0..16 PATH@4..14 PATH@4..9 PATH_SEGMENT@4..9 - CRATE_KW@4..9 "crate" + NAME_REF@4..9 + CRATE_KW@4..9 "crate" COLON2@9..11 "::" PATH_SEGMENT@11..14 NAME_REF@11..14 diff --git a/crates/syntax/test_data/parser/inline/ok/0069_use_tree_list_after_path.rast b/crates/syntax/test_data/parser/inline/ok/0069_use_tree_list_after_path.rast index c4c5bc51e..192a9cca6 100644 --- a/crates/syntax/test_data/parser/inline/ok/0069_use_tree_list_after_path.rast +++ b/crates/syntax/test_data/parser/inline/ok/0069_use_tree_list_after_path.rast @@ -5,7 +5,8 @@ SOURCE_FILE@0..37 USE_TREE@4..17 PATH@4..9 PATH_SEGMENT@4..9 - CRATE_KW@4..9 "crate" + NAME_REF@4..9 + CRATE_KW@4..9 "crate" COLON2@9..11 "::" USE_TREE_LIST@11..17 L_CURLY@11..12 "{" @@ -23,7 +24,8 @@ SOURCE_FILE@0..37 USE_TREE@23..35 PATH@23..27 PATH_SEGMENT@23..27 - SELF_KW@23..27 "self" + NAME_REF@23..27 + SELF_KW@23..27 "self" COLON2@27..29 "::" USE_TREE_LIST@29..35 L_CURLY@29..30 "{" diff --git a/crates/syntax/test_data/parser/inline/ok/0117_macro_call_type.rast b/crates/syntax/test_data/parser/inline/ok/0117_macro_call_type.rast index f3d4ad72c..3016a6574 100644 --- a/crates/syntax/test_data/parser/inline/ok/0117_macro_call_type.rast +++ b/crates/syntax/test_data/parser/inline/ok/0117_macro_call_type.rast @@ -30,7 +30,8 @@ SOURCE_FILE@0..41 PATH@26..36 PATH@26..31 PATH_SEGMENT@26..31 - CRATE_KW@26..31 "crate" + NAME_REF@26..31 + CRATE_KW@26..31 "crate" COLON2@31..33 "::" PATH_SEGMENT@33..36 NAME_REF@33..36 diff --git a/crates/syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rast b/crates/syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rast index aa4d7a784..0fed2d311 100644 --- a/crates/syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rast +++ b/crates/syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rast @@ -17,7 +17,8 @@ SOURCE_FILE@0..27 PATH@11..21 PATH@11..16 PATH_SEGMENT@11..16 - CRATE_KW@11..16 "crate" + NAME_REF@11..16 + CRATE_KW@11..16 "crate" COLON2@16..18 "::" PATH_SEGMENT@18..21 NAME_REF@18..21 diff --git a/crates/syntax/test_data/parser/inline/ok/0153_pub_parens_typepath.rast b/crates/syntax/test_data/parser/inline/ok/0153_pub_parens_typepath.rast index c204f0e2d..a5ee07499 100644 --- a/crates/syntax/test_data/parser/inline/ok/0153_pub_parens_typepath.rast +++ b/crates/syntax/test_data/parser/inline/ok/0153_pub_parens_typepath.rast @@ -16,7 +16,8 @@ SOURCE_FILE@0..53 PATH@14..22 PATH@14..19 PATH_SEGMENT@14..19 - SUPER_KW@14..19 "super" + NAME_REF@14..19 + SUPER_KW@14..19 "super" COLON2@19..21 "::" PATH_SEGMENT@21..22 NAME_REF@21..22 @@ -42,7 +43,8 @@ SOURCE_FILE@0..53 PATH@40..48 PATH@40..45 PATH_SEGMENT@40..45 - CRATE_KW@40..45 "crate" + NAME_REF@40..45 + CRATE_KW@40..45 "crate" COLON2@45..47 "::" PATH_SEGMENT@47..48 NAME_REF@47..48 -- cgit v1.2.3