From dd496223f50232fe98312ee8edc89eb4b5ee3d85 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Tue, 15 Dec 2020 19:23:51 +0100 Subject: Node-ify lifetimes --- .../err/0057_lifetime_starts_with_a_number.rs | 2 + .../err/0057_lifetime_starts_with_a_number.txt | 6 +++ .../err/0057_lifetime_strarts_with_a_number.rs | 2 - .../err/0057_lifetime_strarts_with_a_number.txt | 6 --- .../syntax/test_data/lexer/ok/0007_lifetimes.txt | 8 ++-- .../parser/err/0024_many_type_parens.rast | 22 ++++++---- .../parser/err/0027_incomplere_where_for.rast | 3 +- .../test_data/parser/err/0043_weird_blocks.rast | 3 +- .../parser/err/0044_unexpected_for_type.rast | 45 ++++++++++++------- .../parser/err/0046_ambiguous_trait_object.rast | 9 ++-- .../inline/err/0002_misplaced_label_err.rast | 3 +- .../parser/inline/ok/0003_where_pred_for.rast | 6 ++- .../parser/inline/ok/0006_self_param.rast | 6 ++- .../parser/inline/ok/0007_type_param_bounds.rast | 3 +- .../parser/inline/ok/0015_continue_expr.rast | 3 +- .../parser/inline/ok/0028_impl_trait_type.rast | 6 ++- .../parser/inline/ok/0033_reference_type;.rast | 3 +- .../parser/inline/ok/0034_break_expr.rast | 6 ++- .../test_data/parser/inline/ok/0039_type_arg.rast | 3 +- .../inline/ok/0045_param_list_opt_patterns.rast | 3 +- .../inline/ok/0048_path_type_with_bounds.rast | 6 ++- .../parser/inline/ok/0056_where_clause.rast | 18 +++++--- .../parser/inline/ok/0065_dyn_trait_type.rast | 6 ++- .../test_data/parser/inline/ok/0081_for_type.rast | 15 ++++--- .../test_data/parser/inline/ok/0109_label.rast | 9 ++-- .../ok/0122_generic_lifetime_type_attribute.rast | 6 ++- .../parser/inline/ok/0161_labeled_block.rast | 3 +- .../parser/ok/0018_struct_type_params.rast | 51 ++++++++++++++-------- .../parser/ok/0020_type_param_bounds.rast | 42 ++++++++++++------ .../syntax/test_data/parser/ok/0032_where_for.rast | 6 ++- .../test_data/parser/ok/0033_label_break.rast | 21 ++++++--- .../test_data/parser/ok/0035_weird_exprs.rast | 19 ++++---- .../test_data/parser/ok/0051_parameter_attrs.rast | 18 +++++--- .../test_data/parser/ok/0067_where_for_pred.rast | 45 ++++++++++++------- .../parser/ok/0069_multi_trait_object.rast | 9 ++-- 35 files changed, 275 insertions(+), 147 deletions(-) create mode 100644 crates/syntax/test_data/lexer/err/0057_lifetime_starts_with_a_number.rs create mode 100644 crates/syntax/test_data/lexer/err/0057_lifetime_starts_with_a_number.txt delete mode 100644 crates/syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.rs delete mode 100644 crates/syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.txt (limited to 'crates/syntax/test_data') diff --git a/crates/syntax/test_data/lexer/err/0057_lifetime_starts_with_a_number.rs b/crates/syntax/test_data/lexer/err/0057_lifetime_starts_with_a_number.rs new file mode 100644 index 000000000..a7698a404 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0057_lifetime_starts_with_a_number.rs @@ -0,0 +1,2 @@ +'1 +'1lifetime diff --git a/crates/syntax/test_data/lexer/err/0057_lifetime_starts_with_a_number.txt b/crates/syntax/test_data/lexer/err/0057_lifetime_starts_with_a_number.txt new file mode 100644 index 000000000..11e0ae14a --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0057_lifetime_starts_with_a_number.txt @@ -0,0 +1,6 @@ +LIFETIME_IDENT 2 "\'1" +WHITESPACE 1 "\n" +LIFETIME_IDENT 10 "\'1lifetime" +WHITESPACE 1 "\n" +> error0..2 token("\'1") msg(Lifetime name cannot start with a number) +> error3..13 token("\'1lifetime") msg(Lifetime name cannot start with a number) diff --git a/crates/syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.rs b/crates/syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.rs deleted file mode 100644 index a7698a404..000000000 --- a/crates/syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.rs +++ /dev/null @@ -1,2 +0,0 @@ -'1 -'1lifetime diff --git a/crates/syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.txt b/crates/syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.txt deleted file mode 100644 index e138bcebc..000000000 --- a/crates/syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.txt +++ /dev/null @@ -1,6 +0,0 @@ -LIFETIME 2 "\'1" -WHITESPACE 1 "\n" -LIFETIME 10 "\'1lifetime" -WHITESPACE 1 "\n" -> error0..2 token("\'1") msg(Lifetime name cannot start with a number) -> error3..13 token("\'1lifetime") msg(Lifetime name cannot start with a number) diff --git a/crates/syntax/test_data/lexer/ok/0007_lifetimes.txt b/crates/syntax/test_data/lexer/ok/0007_lifetimes.txt index 005c29100..4d6625c3a 100644 --- a/crates/syntax/test_data/lexer/ok/0007_lifetimes.txt +++ b/crates/syntax/test_data/lexer/ok/0007_lifetimes.txt @@ -1,8 +1,8 @@ -LIFETIME 2 "\'a" +LIFETIME_IDENT 2 "\'a" WHITESPACE 1 " " -LIFETIME 4 "\'foo" +LIFETIME_IDENT 4 "\'foo" WHITESPACE 1 " " -LIFETIME 12 "\'foo_bar_baz" +LIFETIME_IDENT 12 "\'foo_bar_baz" WHITESPACE 1 " " -LIFETIME 2 "\'_" +LIFETIME_IDENT 2 "\'_" WHITESPACE 1 "\n" diff --git a/crates/syntax/test_data/parser/err/0024_many_type_parens.rast b/crates/syntax/test_data/parser/err/0024_many_type_parens.rast index e3be6b22e..4c4ddf5ec 100644 --- a/crates/syntax/test_data/parser/err/0024_many_type_parens.rast +++ b/crates/syntax/test_data/parser/err/0024_many_type_parens.rast @@ -42,7 +42,8 @@ SOURCE_FILE@0..240 GENERIC_PARAM_LIST@32..36 L_ANGLE@32..33 "<" LIFETIME_PARAM@33..35 - LIFETIME@33..35 "\'a" + LIFETIME@33..35 + LIFETIME_IDENT@33..35 "\'a" R_ANGLE@35..36 ">" WHITESPACE@36..37 " " PATH_TYPE@37..46 @@ -53,7 +54,8 @@ SOURCE_FILE@0..240 GENERIC_ARG_LIST@42..46 L_ANGLE@42..43 "<" LIFETIME_ARG@43..45 - LIFETIME@43..45 "\'a" + LIFETIME@43..45 + LIFETIME_IDENT@43..45 "\'a" R_ANGLE@45..46 ">" R_PAREN@46..47 ")" R_ANGLE@47..48 ">" @@ -125,7 +127,8 @@ SOURCE_FILE@0..240 GENERIC_PARAM_LIST@106..110 L_ANGLE@106..107 "<" LIFETIME_PARAM@107..109 - LIFETIME@107..109 "\'a" + LIFETIME@107..109 + LIFETIME_IDENT@107..109 "\'a" R_ANGLE@109..110 ">" WHITESPACE@110..111 " " PATH_TYPE@111..120 @@ -136,7 +139,8 @@ SOURCE_FILE@0..240 GENERIC_ARG_LIST@116..120 L_ANGLE@116..117 "<" LIFETIME_ARG@117..119 - LIFETIME@117..119 "\'a" + LIFETIME@117..119 + LIFETIME_IDENT@117..119 "\'a" R_ANGLE@119..120 ">" R_PAREN@120..121 ")" EXPR_STMT@121..123 @@ -187,7 +191,7 @@ SOURCE_FILE@0..240 PATH_SEGMENT@154..158 L_ANGLE@154..155 "<" ERROR@155..157 - LIFETIME@155..157 "\'a" + LIFETIME_IDENT@155..157 "\'a" R_ANGLE@157..158 ">" WHITESPACE@158..159 " " BIN_EXPR@159..180 @@ -201,7 +205,7 @@ SOURCE_FILE@0..240 IDENT@159..164 "Trait" L_ANGLE@164..165 "<" ERROR@165..167 - LIFETIME@165..167 "\'a" + LIFETIME_IDENT@165..167 "\'a" R_ANGLE@167..168 ">" ERROR@168..169 R_PAREN@168..169 ")" @@ -245,7 +249,8 @@ SOURCE_FILE@0..240 GENERIC_PARAM_LIST@200..204 L_ANGLE@200..201 "<" LIFETIME_PARAM@201..203 - LIFETIME@201..203 "\'a" + LIFETIME@201..203 + LIFETIME_IDENT@201..203 "\'a" R_ANGLE@203..204 ">" WHITESPACE@204..205 " " PATH_TYPE@205..214 @@ -256,7 +261,8 @@ SOURCE_FILE@0..240 GENERIC_ARG_LIST@210..214 L_ANGLE@210..211 "<" LIFETIME_ARG@211..213 - LIFETIME@211..213 "\'a" + LIFETIME@211..213 + LIFETIME_IDENT@211..213 "\'a" R_ANGLE@213..214 ">" R_PAREN@214..215 ")" WHITESPACE@215..216 " " diff --git a/crates/syntax/test_data/parser/err/0027_incomplere_where_for.rast b/crates/syntax/test_data/parser/err/0027_incomplere_where_for.rast index a8e42e6ea..c5215d6b1 100644 --- a/crates/syntax/test_data/parser/err/0027_incomplere_where_for.rast +++ b/crates/syntax/test_data/parser/err/0027_incomplere_where_for.rast @@ -16,7 +16,8 @@ SOURCE_FILE@0..30 GENERIC_PARAM_LIST@22..26 L_ANGLE@22..23 "<" LIFETIME_PARAM@23..25 - LIFETIME@23..25 "\'a" + LIFETIME@23..25 + LIFETIME_IDENT@23..25 "\'a" R_ANGLE@25..26 ">" WHITESPACE@26..27 "\n" BLOCK_EXPR@27..29 diff --git a/crates/syntax/test_data/parser/err/0043_weird_blocks.rast b/crates/syntax/test_data/parser/err/0043_weird_blocks.rast index df29017e7..e73bd1aea 100644 --- a/crates/syntax/test_data/parser/err/0043_weird_blocks.rast +++ b/crates/syntax/test_data/parser/err/0043_weird_blocks.rast @@ -54,7 +54,8 @@ SOURCE_FILE@0..83 EXPR_STMT@68..75 ERROR@68..75 LABEL@68..75 - LIFETIME@68..74 "\'label" + LIFETIME@68..74 + LIFETIME_IDENT@68..74 "\'label" COLON@74..75 ":" WHITESPACE@75..76 " " LITERAL@76..78 diff --git a/crates/syntax/test_data/parser/err/0044_unexpected_for_type.rast b/crates/syntax/test_data/parser/err/0044_unexpected_for_type.rast index 71aa86494..cc54185e5 100644 --- a/crates/syntax/test_data/parser/err/0044_unexpected_for_type.rast +++ b/crates/syntax/test_data/parser/err/0044_unexpected_for_type.rast @@ -12,12 +12,14 @@ SOURCE_FILE@0..239 GENERIC_PARAM_LIST@17..21 L_ANGLE@17..18 "<" LIFETIME_PARAM@18..20 - LIFETIME@18..20 "\'a" + LIFETIME@18..20 + LIFETIME_IDENT@18..20 "\'a" R_ANGLE@20..21 ">" WHITESPACE@21..22 " " REF_TYPE@22..29 AMP@22..23 "&" - LIFETIME@23..25 "\'a" + LIFETIME@23..25 + LIFETIME_IDENT@23..25 "\'a" WHITESPACE@25..26 " " PATH_TYPE@26..29 PATH@26..29 @@ -39,14 +41,16 @@ SOURCE_FILE@0..239 GENERIC_PARAM_LIST@48..52 L_ANGLE@48..49 "<" LIFETIME_PARAM@49..51 - LIFETIME@49..51 "\'a" + LIFETIME@49..51 + LIFETIME_IDENT@49..51 "\'a" R_ANGLE@51..52 ">" WHITESPACE@52..53 " " TUPLE_TYPE@53..63 L_PAREN@53..54 "(" REF_TYPE@54..61 AMP@54..55 "&" - LIFETIME@55..57 "\'a" + LIFETIME@55..57 + LIFETIME_IDENT@55..57 "\'a" WHITESPACE@57..58 " " PATH_TYPE@58..61 PATH@58..61 @@ -70,7 +74,8 @@ SOURCE_FILE@0..239 GENERIC_PARAM_LIST@84..88 L_ANGLE@84..85 "<" LIFETIME_PARAM@85..87 - LIFETIME@85..87 "\'a" + LIFETIME@85..87 + LIFETIME_IDENT@85..87 "\'a" R_ANGLE@87..88 ">" WHITESPACE@88..89 " " SLICE_TYPE@89..94 @@ -96,7 +101,8 @@ SOURCE_FILE@0..239 GENERIC_PARAM_LIST@115..119 L_ANGLE@115..116 "<" LIFETIME_PARAM@116..118 - LIFETIME@116..118 "\'a" + LIFETIME@116..118 + LIFETIME_IDENT@116..118 "\'a" R_ANGLE@118..119 ">" WHITESPACE@119..120 " " FOR_TYPE@120..148 @@ -104,7 +110,8 @@ SOURCE_FILE@0..239 GENERIC_PARAM_LIST@123..127 L_ANGLE@123..124 "<" LIFETIME_PARAM@124..126 - LIFETIME@124..126 "\'b" + LIFETIME@124..126 + LIFETIME_IDENT@124..126 "\'b" R_ANGLE@126..127 ">" WHITESPACE@127..128 " " FN_PTR_TYPE@128..148 @@ -114,7 +121,8 @@ SOURCE_FILE@0..239 PARAM@131..138 REF_TYPE@131..138 AMP@131..132 "&" - LIFETIME@132..134 "\'a" + LIFETIME@132..134 + LIFETIME_IDENT@132..134 "\'a" WHITESPACE@134..135 " " PATH_TYPE@135..138 PATH@135..138 @@ -126,7 +134,8 @@ SOURCE_FILE@0..239 PARAM@140..147 REF_TYPE@140..147 AMP@140..141 "&" - LIFETIME@141..143 "\'b" + LIFETIME@141..143 + LIFETIME_IDENT@141..143 "\'b" WHITESPACE@143..144 " " PATH_TYPE@144..147 PATH@144..147 @@ -159,7 +168,8 @@ SOURCE_FILE@0..239 GENERIC_PARAM_LIST@183..187 L_ANGLE@183..184 "<" LIFETIME_PARAM@184..186 - LIFETIME@184..186 "\'a" + LIFETIME@184..186 + LIFETIME_IDENT@184..186 "\'a" R_ANGLE@186..187 ">" WHITESPACE@187..188 " " FOR_TYPE@188..227 @@ -167,7 +177,8 @@ SOURCE_FILE@0..239 GENERIC_PARAM_LIST@191..195 L_ANGLE@191..192 "<" LIFETIME_PARAM@192..194 - LIFETIME@192..194 "\'b" + LIFETIME@192..194 + LIFETIME_IDENT@192..194 "\'b" R_ANGLE@194..195 ">" WHITESPACE@195..196 " " FOR_TYPE@196..227 @@ -175,7 +186,8 @@ SOURCE_FILE@0..239 GENERIC_PARAM_LIST@199..203 L_ANGLE@199..200 "<" LIFETIME_PARAM@200..202 - LIFETIME@200..202 "\'c" + LIFETIME@200..202 + LIFETIME_IDENT@200..202 "\'c" R_ANGLE@202..203 ">" WHITESPACE@203..204 " " FN_PTR_TYPE@204..227 @@ -185,7 +197,8 @@ SOURCE_FILE@0..239 PARAM@207..212 REF_TYPE@207..212 AMP@207..208 "&" - LIFETIME@208..210 "\'a" + LIFETIME@208..210 + LIFETIME_IDENT@208..210 "\'a" WHITESPACE@210..211 " " PATH_TYPE@211..212 PATH@211..212 @@ -197,7 +210,8 @@ SOURCE_FILE@0..239 PARAM@214..219 REF_TYPE@214..219 AMP@214..215 "&" - LIFETIME@215..217 "\'b" + LIFETIME@215..217 + LIFETIME_IDENT@215..217 "\'b" WHITESPACE@217..218 " " PATH_TYPE@218..219 PATH@218..219 @@ -209,7 +223,8 @@ SOURCE_FILE@0..239 PARAM@221..226 REF_TYPE@221..226 AMP@221..222 "&" - LIFETIME@222..224 "\'c" + LIFETIME@222..224 + LIFETIME_IDENT@222..224 "\'c" WHITESPACE@224..225 " " PATH_TYPE@225..226 PATH@225..226 diff --git a/crates/syntax/test_data/parser/err/0046_ambiguous_trait_object.rast b/crates/syntax/test_data/parser/err/0046_ambiguous_trait_object.rast index 592741cdb..7049f4734 100644 --- a/crates/syntax/test_data/parser/err/0046_ambiguous_trait_object.rast +++ b/crates/syntax/test_data/parser/err/0046_ambiguous_trait_object.rast @@ -7,14 +7,16 @@ SOURCE_FILE@0..187 GENERIC_PARAM_LIST@8..12 L_ANGLE@8..9 "<" LIFETIME_PARAM@9..11 - LIFETIME@9..11 "\'a" + LIFETIME@9..11 + LIFETIME_IDENT@9..11 "\'a" R_ANGLE@11..12 ">" WHITESPACE@12..13 " " EQ@13..14 "=" WHITESPACE@14..15 " " REF_TYPE@15..34 AMP@15..16 "&" - LIFETIME@16..18 "\'a" + LIFETIME@16..18 + LIFETIME_IDENT@16..18 "\'a" WHITESPACE@18..19 " " DYN_TRAIT_TYPE@19..34 DYN_KW@19..22 "dyn" @@ -101,7 +103,8 @@ SOURCE_FILE@0..187 PLUS@99..100 "+" WHITESPACE@100..101 " " TYPE_BOUND@101..108 - LIFETIME@101..108 "\'static" + LIFETIME@101..108 + LIFETIME_IDENT@101..108 "\'static" SEMICOLON@108..109 ";" WHITESPACE@109..110 "\n" FN@110..186 diff --git a/crates/syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast b/crates/syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast index a4271fc87..0adf2cd5a 100644 --- a/crates/syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast +++ b/crates/syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast @@ -14,7 +14,8 @@ SOURCE_FILE@0..30 EXPR_STMT@16..22 ERROR@16..22 LABEL@16..22 - LIFETIME@16..21 "\'loop" + LIFETIME@16..21 + LIFETIME_IDENT@16..21 "\'loop" COLON@21..22 ":" WHITESPACE@22..23 " " IMPL@23..27 diff --git a/crates/syntax/test_data/parser/inline/ok/0003_where_pred_for.rast b/crates/syntax/test_data/parser/inline/ok/0003_where_pred_for.rast index 62da7b887..6cdfd058b 100644 --- a/crates/syntax/test_data/parser/inline/ok/0003_where_pred_for.rast +++ b/crates/syntax/test_data/parser/inline/ok/0003_where_pred_for.rast @@ -22,7 +22,8 @@ SOURCE_FILE@0..54 GENERIC_PARAM_LIST@30..34 L_ANGLE@30..31 "<" LIFETIME_PARAM@31..33 - LIFETIME@31..33 "\'a" + LIFETIME@31..33 + LIFETIME_IDENT@31..33 "\'a" R_ANGLE@33..34 ">" WHITESPACE@34..35 " " PATH_TYPE@35..36 @@ -44,7 +45,8 @@ SOURCE_FILE@0..54 PARAM@41..48 REF_TYPE@41..48 AMP@41..42 "&" - LIFETIME@42..44 "\'a" + LIFETIME@42..44 + LIFETIME_IDENT@42..44 "\'a" WHITESPACE@44..45 " " PATH_TYPE@45..48 PATH@45..48 diff --git a/crates/syntax/test_data/parser/inline/ok/0006_self_param.rast b/crates/syntax/test_data/parser/inline/ok/0006_self_param.rast index d24ad7423..8048f5fad 100644 --- a/crates/syntax/test_data/parser/inline/ok/0006_self_param.rast +++ b/crates/syntax/test_data/parser/inline/ok/0006_self_param.rast @@ -52,7 +52,8 @@ SOURCE_FILE@0..128 L_PAREN@55..56 "(" SELF_PARAM@56..64 AMP@56..57 "&" - LIFETIME@57..59 "\'a" + LIFETIME@57..59 + LIFETIME_IDENT@57..59 "\'a" WHITESPACE@59..60 " " SELF_KW@60..64 "self" COMMA@64..65 "," @@ -71,7 +72,8 @@ SOURCE_FILE@0..128 L_PAREN@78..79 "(" SELF_PARAM@79..91 AMP@79..80 "&" - LIFETIME@80..82 "\'a" + LIFETIME@80..82 + LIFETIME_IDENT@80..82 "\'a" WHITESPACE@82..83 " " MUT_KW@83..86 "mut" WHITESPACE@86..87 " " diff --git a/crates/syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast b/crates/syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast index e95688f56..075b438d2 100644 --- a/crates/syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast +++ b/crates/syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast @@ -13,7 +13,8 @@ SOURCE_FILE@0..35 WHITESPACE@11..12 " " TYPE_BOUND_LIST@12..32 TYPE_BOUND@12..14 - LIFETIME@12..14 "\'a" + LIFETIME@12..14 + LIFETIME_IDENT@12..14 "\'a" WHITESPACE@14..15 " " PLUS@15..16 "+" WHITESPACE@16..17 " " diff --git a/crates/syntax/test_data/parser/inline/ok/0015_continue_expr.rast b/crates/syntax/test_data/parser/inline/ok/0015_continue_expr.rast index 104e153ce..b9e92b57a 100644 --- a/crates/syntax/test_data/parser/inline/ok/0015_continue_expr.rast +++ b/crates/syntax/test_data/parser/inline/ok/0015_continue_expr.rast @@ -26,7 +26,8 @@ SOURCE_FILE@0..69 CONTINUE_EXPR@48..59 CONTINUE_KW@48..56 "continue" WHITESPACE@56..57 " " - LIFETIME@57..59 "\'l" + LIFETIME@57..59 + LIFETIME_IDENT@57..59 "\'l" SEMICOLON@59..60 ";" WHITESPACE@60..65 "\n " R_CURLY@65..66 "}" diff --git a/crates/syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast b/crates/syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast index 32b2959bd..dad4362b7 100644 --- a/crates/syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast +++ b/crates/syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast @@ -31,13 +31,15 @@ SOURCE_FILE@0..43 GENERIC_ARG_LIST@31..35 L_ANGLE@31..32 "<" LIFETIME_ARG@32..34 - LIFETIME@32..34 "\'a" + LIFETIME@32..34 + LIFETIME_IDENT@32..34 "\'a" R_ANGLE@34..35 ">" R_ANGLE@35..36 ">" WHITESPACE@36..37 " " PLUS@37..38 "+" WHITESPACE@38..39 " " TYPE_BOUND@39..41 - LIFETIME@39..41 "\'a" + LIFETIME@39..41 + LIFETIME_IDENT@39..41 "\'a" SEMICOLON@41..42 ";" WHITESPACE@42..43 "\n" diff --git a/crates/syntax/test_data/parser/inline/ok/0033_reference_type;.rast b/crates/syntax/test_data/parser/inline/ok/0033_reference_type;.rast index 974df9f9a..ac0299268 100644 --- a/crates/syntax/test_data/parser/inline/ok/0033_reference_type;.rast +++ b/crates/syntax/test_data/parser/inline/ok/0033_reference_type;.rast @@ -24,7 +24,8 @@ SOURCE_FILE@0..54 WHITESPACE@22..23 " " REF_TYPE@23..34 AMP@23..24 "&" - LIFETIME@24..31 "\'static" + LIFETIME@24..31 + LIFETIME_IDENT@24..31 "\'static" WHITESPACE@31..32 " " TUPLE_TYPE@32..34 L_PAREN@32..33 "(" diff --git a/crates/syntax/test_data/parser/inline/ok/0034_break_expr.rast b/crates/syntax/test_data/parser/inline/ok/0034_break_expr.rast index f905def6f..828013d45 100644 --- a/crates/syntax/test_data/parser/inline/ok/0034_break_expr.rast +++ b/crates/syntax/test_data/parser/inline/ok/0034_break_expr.rast @@ -26,7 +26,8 @@ SOURCE_FILE@0..102 BREAK_EXPR@45..53 BREAK_KW@45..50 "break" WHITESPACE@50..51 " " - LIFETIME@51..53 "\'l" + LIFETIME@51..53 + LIFETIME_IDENT@51..53 "\'l" SEMICOLON@53..54 ";" WHITESPACE@54..63 "\n " EXPR_STMT@63..72 @@ -41,7 +42,8 @@ SOURCE_FILE@0..102 BREAK_EXPR@81..92 BREAK_KW@81..86 "break" WHITESPACE@86..87 " " - LIFETIME@87..89 "\'l" + LIFETIME@87..89 + LIFETIME_IDENT@87..89 "\'l" WHITESPACE@89..90 " " LITERAL@90..92 INT_NUMBER@90..92 "92" diff --git a/crates/syntax/test_data/parser/inline/ok/0039_type_arg.rast b/crates/syntax/test_data/parser/inline/ok/0039_type_arg.rast index 69e98b9d6..51e881a8e 100644 --- a/crates/syntax/test_data/parser/inline/ok/0039_type_arg.rast +++ b/crates/syntax/test_data/parser/inline/ok/0039_type_arg.rast @@ -15,7 +15,8 @@ SOURCE_FILE@0..46 GENERIC_ARG_LIST@10..44 L_ANGLE@10..11 "<" LIFETIME_ARG@11..18 - LIFETIME@11..18 "\'static" + LIFETIME@11..18 + LIFETIME_IDENT@11..18 "\'static" COMMA@18..19 "," WHITESPACE@19..20 " " TYPE_ARG@20..23 diff --git a/crates/syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast b/crates/syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast index 6baea6e3c..b6f5a5689 100644 --- a/crates/syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast +++ b/crates/syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast @@ -33,7 +33,8 @@ SOURCE_FILE@0..35 GENERIC_ARG_LIST@24..28 L_ANGLE@24..25 "<" LIFETIME_ARG@25..27 - LIFETIME@25..27 "\'a" + LIFETIME@25..27 + LIFETIME_IDENT@25..27 "\'a" R_ANGLE@27..28 ">" R_PAREN@28..29 ")" R_ANGLE@29..30 ">" diff --git a/crates/syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast b/crates/syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast index 4d8404e7c..7df6e190a 100644 --- a/crates/syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast +++ b/crates/syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast @@ -31,7 +31,8 @@ SOURCE_FILE@0..58 PLUS@18..19 "+" WHITESPACE@19..20 " " TYPE_BOUND@20..22 - LIFETIME@20..22 "\'f" + LIFETIME@20..22 + LIFETIME_IDENT@20..22 "\'f" R_ANGLE@22..23 ">" WHITESPACE@23..24 " " BLOCK_EXPR@24..26 @@ -72,7 +73,8 @@ SOURCE_FILE@0..58 PLUS@49..50 "+" WHITESPACE@50..51 " " TYPE_BOUND@51..53 - LIFETIME@51..53 "\'f" + LIFETIME@51..53 + LIFETIME_IDENT@51..53 "\'f" R_ANGLE@53..54 ">" WHITESPACE@54..55 " " BLOCK_EXPR@55..57 diff --git a/crates/syntax/test_data/parser/inline/ok/0056_where_clause.rast b/crates/syntax/test_data/parser/inline/ok/0056_where_clause.rast index 28129c50c..61dea413d 100644 --- a/crates/syntax/test_data/parser/inline/ok/0056_where_clause.rast +++ b/crates/syntax/test_data/parser/inline/ok/0056_where_clause.rast @@ -12,17 +12,20 @@ SOURCE_FILE@0..116 WHERE_KW@9..14 "where" WHITESPACE@14..18 "\n " WHERE_PRED@18..29 - LIFETIME@18..20 "\'a" + LIFETIME@18..20 + LIFETIME_IDENT@18..20 "\'a" COLON@20..21 ":" WHITESPACE@21..22 " " TYPE_BOUND_LIST@22..29 TYPE_BOUND@22..24 - LIFETIME@22..24 "\'b" + LIFETIME@22..24 + LIFETIME_IDENT@22..24 "\'b" WHITESPACE@24..25 " " PLUS@25..26 "+" WHITESPACE@26..27 " " TYPE_BOUND@27..29 - LIFETIME@27..29 "\'c" + LIFETIME@27..29 + LIFETIME_IDENT@27..29 "\'c" COMMA@29..30 "," WHITESPACE@30..34 "\n " WHERE_PRED@34..59 @@ -53,7 +56,8 @@ SOURCE_FILE@0..116 PLUS@50..51 "+" WHITESPACE@51..52 " " TYPE_BOUND@52..59 - LIFETIME@52..59 "\'static" + LIFETIME@52..59 + LIFETIME_IDENT@52..59 "\'static" COMMA@59..60 "," WHITESPACE@60..64 "\n " WHERE_PRED@64..82 @@ -71,7 +75,8 @@ SOURCE_FILE@0..116 WHITESPACE@79..80 " " TYPE_BOUND_LIST@80..82 TYPE_BOUND@80..82 - LIFETIME@80..82 "\'a" + LIFETIME@80..82 + LIFETIME_IDENT@80..82 "\'a" COMMA@82..83 "," WHITESPACE@83..87 "\n " WHERE_PRED@87..112 @@ -102,7 +107,8 @@ SOURCE_FILE@0..116 WHITESPACE@109..110 " " TYPE_BOUND_LIST@110..112 TYPE_BOUND@110..112 - LIFETIME@110..112 "\'a" + LIFETIME@110..112 + LIFETIME_IDENT@110..112 "\'a" WHITESPACE@112..113 "\n" BLOCK_EXPR@113..115 L_CURLY@113..114 "{" diff --git a/crates/syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast b/crates/syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast index 3a7fcfe24..49d26cef4 100644 --- a/crates/syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast +++ b/crates/syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast @@ -31,13 +31,15 @@ SOURCE_FILE@0..42 GENERIC_ARG_LIST@30..34 L_ANGLE@30..31 "<" LIFETIME_ARG@31..33 - LIFETIME@31..33 "\'a" + LIFETIME@31..33 + LIFETIME_IDENT@31..33 "\'a" R_ANGLE@33..34 ">" R_ANGLE@34..35 ">" WHITESPACE@35..36 " " PLUS@36..37 "+" WHITESPACE@37..38 " " TYPE_BOUND@38..40 - LIFETIME@38..40 "\'a" + LIFETIME@38..40 + LIFETIME_IDENT@38..40 "\'a" SEMICOLON@40..41 ";" WHITESPACE@41..42 "\n" diff --git a/crates/syntax/test_data/parser/inline/ok/0081_for_type.rast b/crates/syntax/test_data/parser/inline/ok/0081_for_type.rast index f319d5141..8c909b5af 100644 --- a/crates/syntax/test_data/parser/inline/ok/0081_for_type.rast +++ b/crates/syntax/test_data/parser/inline/ok/0081_for_type.rast @@ -12,7 +12,8 @@ SOURCE_FILE@0..121 GENERIC_PARAM_LIST@12..16 L_ANGLE@12..13 "<" LIFETIME_PARAM@13..15 - LIFETIME@13..15 "\'a" + LIFETIME@13..15 + LIFETIME_IDENT@13..15 "\'a" R_ANGLE@15..16 ">" WHITESPACE@16..17 " " FN_PTR_TYPE@17..27 @@ -42,7 +43,8 @@ SOURCE_FILE@0..121 GENERIC_PARAM_LIST@41..45 L_ANGLE@41..42 "<" LIFETIME_PARAM@42..44 - LIFETIME@42..44 "\'a" + LIFETIME@42..44 + LIFETIME_IDENT@42..44 "\'a" R_ANGLE@44..45 ">" WHITESPACE@45..46 " " FN_PTR_TYPE@46..80 @@ -59,7 +61,8 @@ SOURCE_FILE@0..121 PARAM@67..73 REF_TYPE@67..73 AMP@67..68 "&" - LIFETIME@68..70 "\'a" + LIFETIME@68..70 + LIFETIME_IDENT@68..70 "\'a" WHITESPACE@70..71 " " TUPLE_TYPE@71..73 L_PAREN@71..72 "(" @@ -87,7 +90,8 @@ SOURCE_FILE@0..121 GENERIC_PARAM_LIST@96..100 L_ANGLE@96..97 "<" LIFETIME_PARAM@97..99 - LIFETIME@97..99 "\'a" + LIFETIME@97..99 + LIFETIME_IDENT@97..99 "\'a" R_ANGLE@99..100 ">" WHITESPACE@100..101 " " PATH_TYPE@101..119 @@ -100,7 +104,8 @@ SOURCE_FILE@0..121 TYPE_ARG@111..118 REF_TYPE@111..118 AMP@111..112 "&" - LIFETIME@112..114 "\'a" + LIFETIME@112..114 + LIFETIME_IDENT@112..114 "\'a" WHITESPACE@114..115 " " PATH_TYPE@115..118 PATH@115..118 diff --git a/crates/syntax/test_data/parser/inline/ok/0109_label.rast b/crates/syntax/test_data/parser/inline/ok/0109_label.rast index c9588025c..860dfe608 100644 --- a/crates/syntax/test_data/parser/inline/ok/0109_label.rast +++ b/crates/syntax/test_data/parser/inline/ok/0109_label.rast @@ -14,7 +14,8 @@ SOURCE_FILE@0..74 EXPR_STMT@15..26 LOOP_EXPR@15..26 LABEL@15..18 - LIFETIME@15..17 "\'a" + LIFETIME@15..17 + LIFETIME_IDENT@15..17 "\'a" COLON@17..18 ":" WHITESPACE@18..19 " " LOOP_KW@19..23 "loop" @@ -26,7 +27,8 @@ SOURCE_FILE@0..74 EXPR_STMT@31..48 WHILE_EXPR@31..48 LABEL@31..34 - LIFETIME@31..33 "\'b" + LIFETIME@31..33 + LIFETIME_IDENT@31..33 "\'b" COLON@33..34 ":" WHITESPACE@34..35 " " WHILE_KW@35..40 "while" @@ -41,7 +43,8 @@ SOURCE_FILE@0..74 WHITESPACE@48..53 "\n " FOR_EXPR@53..71 LABEL@53..56 - LIFETIME@53..55 "\'c" + LIFETIME@53..55 + LIFETIME_IDENT@53..55 "\'c" COLON@55..56 ":" WHITESPACE@56..57 " " FOR_KW@57..60 "for" diff --git a/crates/syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast b/crates/syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast index 570b95205..616aa984e 100644 --- a/crates/syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast +++ b/crates/syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast @@ -20,7 +20,8 @@ SOURCE_FILE@0..64 R_PAREN@24..25 ")" R_BRACK@25..26 "]" WHITESPACE@26..27 " " - LIFETIME@27..29 "\'a" + LIFETIME@27..29 + LIFETIME_IDENT@27..29 "\'a" COMMA@29..30 "," WHITESPACE@30..31 " " TYPE_PARAM@31..48 @@ -49,7 +50,8 @@ SOURCE_FILE@0..64 WHITESPACE@52..53 " " REF_TYPE@53..58 AMP@53..54 "&" - LIFETIME@54..56 "\'a" + LIFETIME@54..56 + LIFETIME_IDENT@54..56 "\'a" WHITESPACE@56..57 " " PATH_TYPE@57..58 PATH@57..58 diff --git a/crates/syntax/test_data/parser/inline/ok/0161_labeled_block.rast b/crates/syntax/test_data/parser/inline/ok/0161_labeled_block.rast index 9e9a5f9c5..c2dea1cc1 100644 --- a/crates/syntax/test_data/parser/inline/ok/0161_labeled_block.rast +++ b/crates/syntax/test_data/parser/inline/ok/0161_labeled_block.rast @@ -14,7 +14,8 @@ SOURCE_FILE@0..23 EXPR_STMT@9..20 EFFECT_EXPR@9..19 LABEL@9..16 - LIFETIME@9..15 "\'label" + LIFETIME@9..15 + LIFETIME_IDENT@9..15 "\'label" COLON@15..16 ":" WHITESPACE@16..17 " " BLOCK_EXPR@17..19 diff --git a/crates/syntax/test_data/parser/ok/0018_struct_type_params.rast b/crates/syntax/test_data/parser/ok/0018_struct_type_params.rast index 630aa0708..83e17757b 100644 --- a/crates/syntax/test_data/parser/ok/0018_struct_type_params.rast +++ b/crates/syntax/test_data/parser/ok/0018_struct_type_params.rast @@ -80,7 +80,8 @@ SOURCE_FILE@0..290 GENERIC_PARAM_LIST@80..84 L_ANGLE@80..81 "<" LIFETIME_PARAM@81..83 - LIFETIME@81..83 "\'a" + LIFETIME@81..83 + LIFETIME_IDENT@81..83 "\'a" R_ANGLE@83..84 ">" SEMICOLON@84..85 ";" WHITESPACE@85..86 "\n" @@ -92,7 +93,8 @@ SOURCE_FILE@0..290 GENERIC_PARAM_LIST@95..100 L_ANGLE@95..96 "<" LIFETIME_PARAM@96..99 - LIFETIME@96..98 "\'a" + LIFETIME@96..98 + LIFETIME_IDENT@96..98 "\'a" COLON@98..99 ":" R_ANGLE@99..100 ">" SEMICOLON@100..101 ";" @@ -105,10 +107,12 @@ SOURCE_FILE@0..290 GENERIC_PARAM_LIST@111..119 L_ANGLE@111..112 "<" LIFETIME_PARAM@112..118 - LIFETIME@112..114 "\'a" + LIFETIME@112..114 + LIFETIME_IDENT@112..114 "\'a" COLON@114..115 ":" WHITESPACE@115..116 " " - LIFETIME@116..118 "\'b" + LIFETIME@116..118 + LIFETIME_IDENT@116..118 "\'b" R_ANGLE@118..119 ">" SEMICOLON@119..120 ";" WHITESPACE@120..121 "\n" @@ -120,10 +124,12 @@ SOURCE_FILE@0..290 GENERIC_PARAM_LIST@130..141 L_ANGLE@130..131 "<" LIFETIME_PARAM@131..139 - LIFETIME@131..133 "\'a" + LIFETIME@131..133 + LIFETIME_IDENT@131..133 "\'a" COLON@133..134 ":" WHITESPACE@134..135 " " - LIFETIME@135..137 "\'b" + LIFETIME@135..137 + LIFETIME_IDENT@135..137 "\'b" WHITESPACE@137..138 " " PLUS@138..139 "+" WHITESPACE@139..140 " " @@ -138,14 +144,17 @@ SOURCE_FILE@0..290 GENERIC_PARAM_LIST@152..165 L_ANGLE@152..153 "<" LIFETIME_PARAM@153..164 - LIFETIME@153..155 "\'a" + LIFETIME@153..155 + LIFETIME_IDENT@153..155 "\'a" COLON@155..156 ":" WHITESPACE@156..157 " " - LIFETIME@157..159 "\'b" + LIFETIME@157..159 + LIFETIME_IDENT@157..159 "\'b" WHITESPACE@159..160 " " PLUS@160..161 "+" WHITESPACE@161..162 " " - LIFETIME@162..164 "\'c" + LIFETIME@162..164 + LIFETIME_IDENT@162..164 "\'c" R_ANGLE@164..165 ">" SEMICOLON@165..166 ";" WHITESPACE@166..167 "\n" @@ -157,7 +166,8 @@ SOURCE_FILE@0..290 GENERIC_PARAM_LIST@177..182 L_ANGLE@177..178 "<" LIFETIME_PARAM@178..180 - LIFETIME@178..180 "\'a" + LIFETIME@178..180 + LIFETIME_IDENT@178..180 "\'a" COMMA@180..181 "," R_ANGLE@181..182 ">" SEMICOLON@182..183 ";" @@ -170,11 +180,13 @@ SOURCE_FILE@0..290 GENERIC_PARAM_LIST@194..202 L_ANGLE@194..195 "<" LIFETIME_PARAM@195..197 - LIFETIME@195..197 "\'a" + LIFETIME@195..197 + LIFETIME_IDENT@195..197 "\'a" COMMA@197..198 "," WHITESPACE@198..199 " " LIFETIME_PARAM@199..201 - LIFETIME@199..201 "\'b" + LIFETIME@199..201 + LIFETIME_IDENT@199..201 "\'b" R_ANGLE@201..202 ">" SEMICOLON@202..203 ";" WHITESPACE@203..204 "\n" @@ -186,18 +198,22 @@ SOURCE_FILE@0..290 GENERIC_PARAM_LIST@214..232 L_ANGLE@214..215 "<" LIFETIME_PARAM@215..222 - LIFETIME@215..217 "\'a" + LIFETIME@215..217 + LIFETIME_IDENT@215..217 "\'a" COLON@217..218 ":" WHITESPACE@218..219 " " - LIFETIME@219..221 "\'b" + LIFETIME@219..221 + LIFETIME_IDENT@219..221 "\'b" PLUS@221..222 "+" COMMA@222..223 "," WHITESPACE@223..224 " " LIFETIME_PARAM@224..230 - LIFETIME@224..226 "\'b" + LIFETIME@224..226 + LIFETIME_IDENT@224..226 "\'b" COLON@226..227 ":" WHITESPACE@227..228 " " - LIFETIME@228..230 "\'c" + LIFETIME@228..230 + LIFETIME_IDENT@228..230 "\'c" COMMA@230..231 "," R_ANGLE@231..232 ">" SEMICOLON@232..233 ";" @@ -241,7 +257,8 @@ SOURCE_FILE@0..290 GENERIC_PARAM_LIST@278..288 L_ANGLE@278..279 "<" LIFETIME_PARAM@279..281 - LIFETIME@279..281 "\'a" + LIFETIME@279..281 + LIFETIME_IDENT@279..281 "\'a" COMMA@281..282 "," WHITESPACE@282..283 " " TYPE_PARAM@283..284 diff --git a/crates/syntax/test_data/parser/ok/0020_type_param_bounds.rast b/crates/syntax/test_data/parser/ok/0020_type_param_bounds.rast index 9bdc50e1e..0612a71de 100644 --- a/crates/syntax/test_data/parser/ok/0020_type_param_bounds.rast +++ b/crates/syntax/test_data/parser/ok/0020_type_param_bounds.rast @@ -41,7 +41,8 @@ SOURCE_FILE@0..250 WHITESPACE@38..39 " " TYPE_BOUND_LIST@39..41 TYPE_BOUND@39..41 - LIFETIME@39..41 "\'a" + LIFETIME@39..41 + LIFETIME_IDENT@39..41 "\'a" R_ANGLE@41..42 ">" SEMICOLON@42..43 ";" WHITESPACE@43..44 "\n" @@ -59,7 +60,8 @@ SOURCE_FILE@0..250 WHITESPACE@55..56 " " TYPE_BOUND_LIST@56..60 TYPE_BOUND@56..58 - LIFETIME@56..58 "\'a" + LIFETIME@56..58 + LIFETIME_IDENT@56..58 "\'a" WHITESPACE@58..59 " " PLUS@59..60 "+" WHITESPACE@60..61 " " @@ -80,12 +82,14 @@ SOURCE_FILE@0..250 WHITESPACE@75..76 " " TYPE_BOUND_LIST@76..83 TYPE_BOUND@76..78 - LIFETIME@76..78 "\'a" + LIFETIME@76..78 + LIFETIME_IDENT@76..78 "\'a" WHITESPACE@78..79 " " PLUS@79..80 "+" WHITESPACE@80..81 " " TYPE_BOUND@81..83 - LIFETIME@81..83 "\'d" + LIFETIME@81..83 + LIFETIME_IDENT@81..83 "\'d" WHITESPACE@83..84 " " R_ANGLE@84..85 ">" SEMICOLON@85..86 ";" @@ -104,12 +108,14 @@ SOURCE_FILE@0..250 WHITESPACE@98..99 " " TYPE_BOUND_LIST@99..114 TYPE_BOUND@99..101 - LIFETIME@99..101 "\'a" + LIFETIME@99..101 + LIFETIME_IDENT@99..101 "\'a" WHITESPACE@101..102 " " PLUS@102..103 "+" WHITESPACE@103..104 " " TYPE_BOUND@104..106 - LIFETIME@104..106 "\'d" + LIFETIME@104..106 + LIFETIME_IDENT@104..106 "\'d" WHITESPACE@106..107 " " PLUS@107..108 "+" WHITESPACE@108..109 " " @@ -190,7 +196,8 @@ SOURCE_FILE@0..250 PLUS@174..175 "+" WHITESPACE@175..176 " " TYPE_BOUND@176..178 - LIFETIME@176..178 "\'a" + LIFETIME@176..178 + LIFETIME_IDENT@176..178 "\'a" R_ANGLE@178..179 ">" SEMICOLON@179..180 ";" WHITESPACE@180..181 "\n" @@ -225,21 +232,26 @@ SOURCE_FILE@0..250 GENERIC_PARAM_LIST@208..249 L_ANGLE@208..209 "<" LIFETIME_PARAM@209..215 - LIFETIME@209..211 "\'a" + LIFETIME@209..211 + LIFETIME_IDENT@209..211 "\'a" COLON@211..212 ":" WHITESPACE@212..213 " " - LIFETIME@213..215 "\'d" + LIFETIME@213..215 + LIFETIME_IDENT@213..215 "\'d" COMMA@215..216 "," WHITESPACE@216..217 " " LIFETIME_PARAM@217..228 - LIFETIME@217..219 "\'d" + LIFETIME@217..219 + LIFETIME_IDENT@217..219 "\'d" COLON@219..220 ":" WHITESPACE@220..221 " " - LIFETIME@221..223 "\'a" + LIFETIME@221..223 + LIFETIME_IDENT@221..223 "\'a" WHITESPACE@223..224 " " PLUS@224..225 "+" WHITESPACE@225..226 " " - LIFETIME@226..228 "\'b" + LIFETIME@226..228 + LIFETIME_IDENT@226..228 "\'b" COMMA@228..229 "," WHITESPACE@229..230 " " TYPE_PARAM@230..248 @@ -249,12 +261,14 @@ SOURCE_FILE@0..250 WHITESPACE@232..233 " " TYPE_BOUND_LIST@233..248 TYPE_BOUND@233..235 - LIFETIME@233..235 "\'a" + LIFETIME@233..235 + LIFETIME_IDENT@233..235 "\'a" WHITESPACE@235..236 " " PLUS@236..237 "+" WHITESPACE@237..238 " " TYPE_BOUND@238..240 - LIFETIME@238..240 "\'d" + LIFETIME@238..240 + LIFETIME_IDENT@238..240 "\'d" WHITESPACE@240..241 " " PLUS@241..242 "+" WHITESPACE@242..243 " " diff --git a/crates/syntax/test_data/parser/ok/0032_where_for.rast b/crates/syntax/test_data/parser/ok/0032_where_for.rast index d59548f21..0cb2eca33 100644 --- a/crates/syntax/test_data/parser/ok/0032_where_for.rast +++ b/crates/syntax/test_data/parser/ok/0032_where_for.rast @@ -41,7 +41,8 @@ SOURCE_FILE@0..116 GENERIC_PARAM_LIST@59..64 L_ANGLE@59..60 "<" LIFETIME_PARAM@60..63 - LIFETIME@60..63 "\'de" + LIFETIME@60..63 + LIFETIME_IDENT@60..63 "\'de" R_ANGLE@63..64 ">" WHITESPACE@64..65 " " PATH_TYPE@65..81 @@ -52,7 +53,8 @@ SOURCE_FILE@0..116 GENERIC_ARG_LIST@76..81 L_ANGLE@76..77 "<" LIFETIME_ARG@77..80 - LIFETIME@77..80 "\'de" + LIFETIME@77..80 + LIFETIME_IDENT@77..80 "\'de" R_ANGLE@80..81 ">" WHITESPACE@81..82 " " PLUS@82..83 "+" diff --git a/crates/syntax/test_data/parser/ok/0033_label_break.rast b/crates/syntax/test_data/parser/ok/0033_label_break.rast index 88800ca7a..487e073ba 100644 --- a/crates/syntax/test_data/parser/ok/0033_label_break.rast +++ b/crates/syntax/test_data/parser/ok/0033_label_break.rast @@ -16,7 +16,8 @@ SOURCE_FILE@0..506 EXPR_STMT@50..66 EFFECT_EXPR@50..66 LABEL@50..63 - LIFETIME@50..62 "\'empty_block" + LIFETIME@50..62 + LIFETIME_IDENT@50..62 "\'empty_block" COLON@62..63 ":" WHITESPACE@63..64 " " BLOCK_EXPR@64..66 @@ -26,7 +27,8 @@ SOURCE_FILE@0..506 EXPR_STMT@72..295 EFFECT_EXPR@72..295 LABEL@72..79 - LIFETIME@72..78 "\'block" + LIFETIME@72..78 + LIFETIME_IDENT@72..78 "\'block" COLON@78..79 ":" WHITESPACE@79..80 " " BLOCK_EXPR@80..295 @@ -66,7 +68,8 @@ SOURCE_FILE@0..506 BREAK_EXPR@147..159 BREAK_KW@147..152 "break" WHITESPACE@152..153 " " - LIFETIME@153..159 "\'block" + LIFETIME@153..159 + LIFETIME_IDENT@153..159 "\'block" SEMICOLON@159..160 ";" WHITESPACE@160..169 "\n " R_CURLY@169..170 "}" @@ -105,7 +108,8 @@ SOURCE_FILE@0..506 BREAK_EXPR@241..253 BREAK_KW@241..246 "break" WHITESPACE@246..247 " " - LIFETIME@247..253 "\'block" + LIFETIME@247..253 + LIFETIME_IDENT@247..253 "\'block" SEMICOLON@253..254 ";" WHITESPACE@254..263 "\n " R_CURLY@263..264 "}" @@ -135,7 +139,8 @@ SOURCE_FILE@0..506 WHITESPACE@313..314 " " EFFECT_EXPR@314..502 LABEL@314..321 - LIFETIME@314..320 "\'block" + LIFETIME@314..320 + LIFETIME_IDENT@314..320 "\'block" COLON@320..321 ":" WHITESPACE@321..322 " " BLOCK_EXPR@322..502 @@ -165,7 +170,8 @@ SOURCE_FILE@0..506 BREAK_EXPR@378..392 BREAK_KW@378..383 "break" WHITESPACE@383..384 " " - LIFETIME@384..390 "\'block" + LIFETIME@384..390 + LIFETIME_IDENT@384..390 "\'block" WHITESPACE@390..391 " " LITERAL@391..392 INT_NUMBER@391..392 "1" @@ -197,7 +203,8 @@ SOURCE_FILE@0..506 BREAK_EXPR@461..475 BREAK_KW@461..466 "break" WHITESPACE@466..467 " " - LIFETIME@467..473 "\'block" + LIFETIME@467..473 + LIFETIME_IDENT@467..473 "\'block" WHITESPACE@473..474 " " LITERAL@474..475 INT_NUMBER@474..475 "2" diff --git a/crates/syntax/test_data/parser/ok/0035_weird_exprs.rast b/crates/syntax/test_data/parser/ok/0035_weird_exprs.rast index 7c61b5006..46b192dc1 100644 --- a/crates/syntax/test_data/parser/ok/0035_weird_exprs.rast +++ b/crates/syntax/test_data/parser/ok/0035_weird_exprs.rast @@ -1373,14 +1373,14 @@ SOURCE_FILE@0..3813 WHITESPACE@2376..2377 " " IDENT@2377..2379 "u8" L_ANGLE@2379..2380 "<" - LIFETIME@2380..2383 "\'u8" + LIFETIME_IDENT@2380..2383 "\'u8" COLON@2383..2384 ":" WHITESPACE@2384..2385 " " - LIFETIME@2385..2388 "\'u8" + LIFETIME_IDENT@2385..2388 "\'u8" WHITESPACE@2388..2389 " " PLUS@2389..2390 "+" WHITESPACE@2390..2391 " " - LIFETIME@2391..2394 "\'u8" + LIFETIME_IDENT@2391..2394 "\'u8" R_ANGLE@2394..2395 ">" TOKEN_TREE@2395..2408 L_PAREN@2395..2396 "(" @@ -1388,7 +1388,7 @@ SOURCE_FILE@0..3813 COLON@2398..2399 ":" WHITESPACE@2399..2400 " " AMP@2400..2401 "&" - LIFETIME@2401..2404 "\'u8" + LIFETIME_IDENT@2401..2404 "\'u8" WHITESPACE@2404..2405 " " IDENT@2405..2407 "u8" R_PAREN@2407..2408 ")" @@ -1397,7 +1397,7 @@ SOURCE_FILE@0..3813 R_ANGLE@2410..2411 ">" WHITESPACE@2411..2412 " " AMP@2412..2413 "&" - LIFETIME@2413..2416 "\'u8" + LIFETIME_IDENT@2413..2416 "\'u8" WHITESPACE@2416..2417 " " IDENT@2417..2419 "u8" WHITESPACE@2419..2420 " " @@ -1568,7 +1568,8 @@ SOURCE_FILE@0..3813 GENERIC_PARAM_LIST@2862..2870 L_ANGLE@2862..2863 "<" LIFETIME_PARAM@2863..2869 - LIFETIME@2863..2869 "\'union" + LIFETIME@2863..2869 + LIFETIME_IDENT@2863..2869 "\'union" R_ANGLE@2869..2870 ">" WHITESPACE@2870..2871 " " RECORD_FIELD_LIST@2871..2904 @@ -1581,7 +1582,8 @@ SOURCE_FILE@0..3813 WHITESPACE@2879..2880 " " REF_TYPE@2880..2901 AMP@2880..2881 "&" - LIFETIME@2881..2887 "\'union" + LIFETIME@2881..2887 + LIFETIME_IDENT@2881..2887 "\'union" WHITESPACE@2887..2888 " " PATH_TYPE@2888..2901 PATH@2888..2901 @@ -1591,7 +1593,8 @@ SOURCE_FILE@0..3813 GENERIC_ARG_LIST@2893..2901 L_ANGLE@2893..2894 "<" LIFETIME_ARG@2894..2900 - LIFETIME@2894..2900 "\'union" + LIFETIME@2894..2900 + LIFETIME_IDENT@2894..2900 "\'union" R_ANGLE@2900..2901 ">" COMMA@2901..2902 "," WHITESPACE@2902..2903 " " diff --git a/crates/syntax/test_data/parser/ok/0051_parameter_attrs.rast b/crates/syntax/test_data/parser/ok/0051_parameter_attrs.rast index d4f05f279..8974f9e40 100644 --- a/crates/syntax/test_data/parser/ok/0051_parameter_attrs.rast +++ b/crates/syntax/test_data/parser/ok/0051_parameter_attrs.rast @@ -175,7 +175,8 @@ SOURCE_FILE@0..519 GENERIC_ARG_LIST@162..166 L_ANGLE@162..163 "<" LIFETIME_ARG@163..165 - LIFETIME@163..165 "\'a" + LIFETIME@163..165 + LIFETIME_IDENT@163..165 "\'a" R_ANGLE@165..166 ">" R_PAREN@166..167 ")" R_ANGLE@167..168 ">" @@ -344,7 +345,8 @@ SOURCE_FILE@0..519 GENERIC_PARAM_LIST@345..349 L_ANGLE@345..346 "<" LIFETIME_PARAM@346..348 - LIFETIME@346..348 "\'a" + LIFETIME@346..348 + LIFETIME_IDENT@346..348 "\'a" R_ANGLE@348..349 ">" PARAM_LIST@349..368 L_PAREN@349..350 "(" @@ -376,7 +378,8 @@ SOURCE_FILE@0..519 GENERIC_PARAM_LIST@382..386 L_ANGLE@382..383 "<" LIFETIME_PARAM@383..385 - LIFETIME@383..385 "\'a" + LIFETIME@383..385 + LIFETIME_IDENT@383..385 "\'a" R_ANGLE@385..386 ">" PARAM_LIST@386..404 L_PAREN@386..387 "(" @@ -391,7 +394,8 @@ SOURCE_FILE@0..519 WHITESPACE@394..395 " " SELF_PARAM@395..403 AMP@395..396 "&" - LIFETIME@396..398 "\'a" + LIFETIME@396..398 + LIFETIME_IDENT@396..398 "\'a" WHITESPACE@398..399 " " SELF_KW@399..403 "self" R_PAREN@403..404 ")" @@ -408,7 +412,8 @@ SOURCE_FILE@0..519 GENERIC_PARAM_LIST@418..422 L_ANGLE@418..419 "<" LIFETIME_PARAM@419..421 - LIFETIME@419..421 "\'a" + LIFETIME@419..421 + LIFETIME_IDENT@419..421 "\'a" R_ANGLE@421..422 ">" PARAM_LIST@422..444 L_PAREN@422..423 "(" @@ -423,7 +428,8 @@ SOURCE_FILE@0..519 WHITESPACE@430..431 " " SELF_PARAM@431..443 AMP@431..432 "&" - LIFETIME@432..434 "\'a" + LIFETIME@432..434 + LIFETIME_IDENT@432..434 "\'a" WHITESPACE@434..435 " " MUT_KW@435..438 "mut" WHITESPACE@438..439 " " diff --git a/crates/syntax/test_data/parser/ok/0067_where_for_pred.rast b/crates/syntax/test_data/parser/ok/0067_where_for_pred.rast index 8f8639a37..325e9e655 100644 --- a/crates/syntax/test_data/parser/ok/0067_where_for_pred.rast +++ b/crates/syntax/test_data/parser/ok/0067_where_for_pred.rast @@ -22,7 +22,8 @@ SOURCE_FILE@0..374 GENERIC_PARAM_LIST@31..35 L_ANGLE@31..32 "<" LIFETIME_PARAM@32..34 - LIFETIME@32..34 "\'a" + LIFETIME@32..34 + LIFETIME_IDENT@32..34 "\'a" R_ANGLE@34..35 ">" WHITESPACE@35..36 " " PATH_TYPE@36..37 @@ -44,7 +45,8 @@ SOURCE_FILE@0..374 PARAM@42..49 REF_TYPE@42..49 AMP@42..43 "&" - LIFETIME@43..45 "\'a" + LIFETIME@43..45 + LIFETIME_IDENT@43..45 "\'a" WHITESPACE@45..46 " " PATH_TYPE@46..49 PATH@46..49 @@ -82,12 +84,14 @@ SOURCE_FILE@0..374 GENERIC_PARAM_LIST@85..89 L_ANGLE@85..86 "<" LIFETIME_PARAM@86..88 - LIFETIME@86..88 "\'a" + LIFETIME@86..88 + LIFETIME_IDENT@86..88 "\'a" R_ANGLE@88..89 ">" WHITESPACE@89..90 " " REF_TYPE@90..95 AMP@90..91 "&" - LIFETIME@91..93 "\'a" + LIFETIME@91..93 + LIFETIME_IDENT@91..93 "\'a" WHITESPACE@93..94 " " PATH_TYPE@94..95 PATH@94..95 @@ -133,14 +137,16 @@ SOURCE_FILE@0..374 GENERIC_PARAM_LIST@140..144 L_ANGLE@140..141 "<" LIFETIME_PARAM@141..143 - LIFETIME@141..143 "\'a" + LIFETIME@141..143 + LIFETIME_IDENT@141..143 "\'a" R_ANGLE@143..144 ">" WHITESPACE@144..145 " " PAREN_TYPE@145..152 L_PAREN@145..146 "(" REF_TYPE@146..151 AMP@146..147 "&" - LIFETIME@147..149 "\'a" + LIFETIME@147..149 + LIFETIME_IDENT@147..149 "\'a" WHITESPACE@149..150 " " PATH_TYPE@150..151 PATH@150..151 @@ -162,7 +168,8 @@ SOURCE_FILE@0..374 PARAM@157..164 REF_TYPE@157..164 AMP@157..158 "&" - LIFETIME@158..160 "\'a" + LIFETIME@158..160 + LIFETIME_IDENT@158..160 "\'a" WHITESPACE@160..161 " " PATH_TYPE@161..164 PATH@161..164 @@ -200,14 +207,16 @@ SOURCE_FILE@0..374 GENERIC_PARAM_LIST@202..206 L_ANGLE@202..203 "<" LIFETIME_PARAM@203..205 - LIFETIME@203..205 "\'a" + LIFETIME@203..205 + LIFETIME_IDENT@203..205 "\'a" R_ANGLE@205..206 ">" WHITESPACE@206..207 " " SLICE_TYPE@207..214 L_BRACK@207..208 "[" REF_TYPE@208..213 AMP@208..209 "&" - LIFETIME@209..211 "\'a" + LIFETIME@209..211 + LIFETIME_IDENT@209..211 "\'a" WHITESPACE@211..212 " " PATH_TYPE@212..213 PATH@212..213 @@ -267,7 +276,8 @@ SOURCE_FILE@0..374 GENERIC_PARAM_LIST@261..265 L_ANGLE@261..262 "<" LIFETIME_PARAM@262..264 - LIFETIME@262..264 "\'a" + LIFETIME@262..264 + LIFETIME_IDENT@262..264 "\'a" R_ANGLE@264..265 ">" WHITESPACE@265..266 " " PATH_TYPE@266..285 @@ -277,7 +287,8 @@ SOURCE_FILE@0..374 L_ANGLE@266..267 "<" REF_TYPE@267..272 AMP@267..268 "&" - LIFETIME@268..270 "\'a" + LIFETIME@268..270 + LIFETIME_IDENT@268..270 "\'a" WHITESPACE@270..271 " " PATH_TYPE@271..272 PATH@271..272 @@ -336,7 +347,8 @@ SOURCE_FILE@0..374 GENERIC_PARAM_LIST@333..337 L_ANGLE@333..334 "<" LIFETIME_PARAM@334..336 - LIFETIME@334..336 "\'a" + LIFETIME@334..336 + LIFETIME_IDENT@334..336 "\'a" R_ANGLE@336..337 ">" WHITESPACE@337..338 " " FOR_TYPE@338..362 @@ -344,7 +356,8 @@ SOURCE_FILE@0..374 GENERIC_PARAM_LIST@341..345 L_ANGLE@341..342 "<" LIFETIME_PARAM@342..344 - LIFETIME@342..344 "\'b" + LIFETIME@342..344 + LIFETIME_IDENT@342..344 "\'b" R_ANGLE@344..345 ">" WHITESPACE@345..346 " " FN_PTR_TYPE@346..362 @@ -354,7 +367,8 @@ SOURCE_FILE@0..374 PARAM@349..354 REF_TYPE@349..354 AMP@349..350 "&" - LIFETIME@350..352 "\'a" + LIFETIME@350..352 + LIFETIME_IDENT@350..352 "\'a" WHITESPACE@352..353 " " PATH_TYPE@353..354 PATH@353..354 @@ -366,7 +380,8 @@ SOURCE_FILE@0..374 PARAM@356..361 REF_TYPE@356..361 AMP@356..357 "&" - LIFETIME@357..359 "\'b" + LIFETIME@357..359 + LIFETIME_IDENT@357..359 "\'b" WHITESPACE@359..360 " " PATH_TYPE@360..361 PATH@360..361 diff --git a/crates/syntax/test_data/parser/ok/0069_multi_trait_object.rast b/crates/syntax/test_data/parser/ok/0069_multi_trait_object.rast index 0cd868a83..8d3e187ae 100644 --- a/crates/syntax/test_data/parser/ok/0069_multi_trait_object.rast +++ b/crates/syntax/test_data/parser/ok/0069_multi_trait_object.rast @@ -7,14 +7,16 @@ SOURCE_FILE@0..195 GENERIC_PARAM_LIST@8..12 L_ANGLE@8..9 "<" LIFETIME_PARAM@9..11 - LIFETIME@9..11 "\'a" + LIFETIME@9..11 + LIFETIME_IDENT@9..11 "\'a" R_ANGLE@11..12 ">" WHITESPACE@12..13 " " EQ@13..14 "=" WHITESPACE@14..15 " " REF_TYPE@15..36 AMP@15..16 "&" - LIFETIME@16..18 "\'a" + LIFETIME@16..18 + LIFETIME_IDENT@16..18 "\'a" WHITESPACE@18..19 " " PAREN_TYPE@19..36 L_PAREN@19..20 "(" @@ -109,7 +111,8 @@ SOURCE_FILE@0..195 PLUS@104..105 "+" WHITESPACE@105..106 " " TYPE_BOUND@106..113 - LIFETIME@106..113 "\'static" + LIFETIME@106..113 + LIFETIME_IDENT@106..113 "\'static" R_PAREN@113..114 ")" SEMICOLON@114..115 ";" WHITESPACE@115..116 "\n" -- cgit v1.2.3