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 --- .../parser/inline/err/0002_misplaced_label_err.rast | 3 ++- .../parser/inline/ok/0003_where_pred_for.rast | 6 ++++-- .../test_data/parser/inline/ok/0006_self_param.rast | 6 ++++-- .../parser/inline/ok/0007_type_param_bounds.rast | 3 ++- .../test_data/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 ++- .../test_data/parser/inline/ok/0034_break_expr.rast | 6 ++++-- .../test_data/parser/inline/ok/0039_type_arg.rast | 3 ++- .../parser/inline/ok/0045_param_list_opt_patterns.rast | 3 ++- .../parser/inline/ok/0048_path_type_with_bounds.rast | 6 ++++-- .../test_data/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 ++++++++++----- .../syntax/test_data/parser/inline/ok/0109_label.rast | 9 ++++++--- .../ok/0122_generic_lifetime_type_attribute.rast | 6 ++++-- .../test_data/parser/inline/ok/0161_labeled_block.rast | 3 ++- 17 files changed, 70 insertions(+), 35 deletions(-) (limited to 'crates/syntax/test_data/parser/inline') 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 -- cgit v1.2.3