From 4d97f5f037c1b061215d4b0fb32d48a1b8be836f Mon Sep 17 00:00:00 2001 From: Pavan Kumar Sunkara Date: Sat, 5 Sep 2020 03:06:05 +0200 Subject: Rename record_field_pat to record_pat_field --- .../inline/ok/0102_record_field_pat_list.rast | 132 --------------------- .../parser/inline/ok/0102_record_field_pat_list.rs | 6 - .../inline/ok/0102_record_pat_field_list.rast | 132 +++++++++++++++++++++ .../parser/inline/ok/0102_record_pat_field_list.rs | 6 + .../parser/inline/ok/0145_record_field_pat.rast | 75 ------------ .../parser/inline/ok/0145_record_field_pat.rs | 4 - .../parser/inline/ok/0145_record_pat_field.rast | 75 ++++++++++++ .../parser/inline/ok/0145_record_pat_field.rs | 4 + 8 files changed, 217 insertions(+), 217 deletions(-) delete mode 100644 crates/syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rast delete mode 100644 crates/syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0102_record_pat_field_list.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0102_record_pat_field_list.rs delete mode 100644 crates/syntax/test_data/parser/inline/ok/0145_record_field_pat.rast delete mode 100644 crates/syntax/test_data/parser/inline/ok/0145_record_field_pat.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0145_record_pat_field.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0145_record_pat_field.rs (limited to 'crates/syntax') diff --git a/crates/syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rast b/crates/syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rast deleted file mode 100644 index 866e60ed8..000000000 --- a/crates/syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rast +++ /dev/null @@ -1,132 +0,0 @@ -SOURCE_FILE@0..119 - FN@0..118 - FN_KW@0..2 "fn" - WHITESPACE@2..3 " " - NAME@3..6 - IDENT@3..6 "foo" - PARAM_LIST@6..8 - L_PAREN@6..7 "(" - R_PAREN@7..8 ")" - WHITESPACE@8..9 " " - BLOCK_EXPR@9..118 - L_CURLY@9..10 "{" - WHITESPACE@10..15 "\n " - LET_STMT@15..29 - LET_KW@15..18 "let" - WHITESPACE@18..19 " " - RECORD_PAT@19..23 - PATH@19..20 - PATH_SEGMENT@19..20 - NAME_REF@19..20 - IDENT@19..20 "S" - WHITESPACE@20..21 " " - RECORD_PAT_FIELD_LIST@21..23 - L_CURLY@21..22 "{" - R_CURLY@22..23 "}" - WHITESPACE@23..24 " " - EQ@24..25 "=" - WHITESPACE@25..26 " " - TUPLE_EXPR@26..28 - L_PAREN@26..27 "(" - R_PAREN@27..28 ")" - SEMICOLON@28..29 ";" - WHITESPACE@29..34 "\n " - LET_STMT@34..62 - LET_KW@34..37 "let" - WHITESPACE@37..38 " " - RECORD_PAT@38..56 - PATH@38..39 - PATH_SEGMENT@38..39 - NAME_REF@38..39 - IDENT@38..39 "S" - WHITESPACE@39..40 " " - RECORD_PAT_FIELD_LIST@40..56 - L_CURLY@40..41 "{" - WHITESPACE@41..42 " " - RECORD_PAT_FIELD@42..43 - IDENT_PAT@42..43 - NAME@42..43 - IDENT@42..43 "f" - COMMA@43..44 "," - WHITESPACE@44..45 " " - RECORD_PAT_FIELD@45..54 - IDENT_PAT@45..54 - REF_KW@45..48 "ref" - WHITESPACE@48..49 " " - MUT_KW@49..52 "mut" - WHITESPACE@52..53 " " - NAME@53..54 - IDENT@53..54 "g" - WHITESPACE@54..55 " " - R_CURLY@55..56 "}" - WHITESPACE@56..57 " " - EQ@57..58 "=" - WHITESPACE@58..59 " " - TUPLE_EXPR@59..61 - L_PAREN@59..60 "(" - R_PAREN@60..61 ")" - SEMICOLON@61..62 ";" - WHITESPACE@62..67 "\n " - LET_STMT@67..90 - LET_KW@67..70 "let" - WHITESPACE@70..71 " " - RECORD_PAT@71..84 - PATH@71..72 - PATH_SEGMENT@71..72 - NAME_REF@71..72 - IDENT@71..72 "S" - WHITESPACE@72..73 " " - RECORD_PAT_FIELD_LIST@73..84 - L_CURLY@73..74 "{" - WHITESPACE@74..75 " " - RECORD_PAT_FIELD@75..79 - NAME_REF@75..76 - IDENT@75..76 "h" - COLON@76..77 ":" - WHITESPACE@77..78 " " - WILDCARD_PAT@78..79 - UNDERSCORE@78..79 "_" - COMMA@79..80 "," - WHITESPACE@80..81 " " - DOT2@81..83 ".." - R_CURLY@83..84 "}" - WHITESPACE@84..85 " " - EQ@85..86 "=" - WHITESPACE@86..87 " " - TUPLE_EXPR@87..89 - L_PAREN@87..88 "(" - R_PAREN@88..89 ")" - SEMICOLON@89..90 ";" - WHITESPACE@90..95 "\n " - LET_STMT@95..116 - LET_KW@95..98 "let" - WHITESPACE@98..99 " " - RECORD_PAT@99..110 - PATH@99..100 - PATH_SEGMENT@99..100 - NAME_REF@99..100 - IDENT@99..100 "S" - WHITESPACE@100..101 " " - RECORD_PAT_FIELD_LIST@101..110 - L_CURLY@101..102 "{" - WHITESPACE@102..103 " " - RECORD_PAT_FIELD@103..107 - NAME_REF@103..104 - IDENT@103..104 "h" - COLON@104..105 ":" - WHITESPACE@105..106 " " - WILDCARD_PAT@106..107 - UNDERSCORE@106..107 "_" - COMMA@107..108 "," - WHITESPACE@108..109 " " - R_CURLY@109..110 "}" - WHITESPACE@110..111 " " - EQ@111..112 "=" - WHITESPACE@112..113 " " - TUPLE_EXPR@113..115 - L_PAREN@113..114 "(" - R_PAREN@114..115 ")" - SEMICOLON@115..116 ";" - WHITESPACE@116..117 "\n" - R_CURLY@117..118 "}" - WHITESPACE@118..119 "\n" diff --git a/crates/syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rs b/crates/syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rs deleted file mode 100644 index da3412fa8..000000000 --- a/crates/syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rs +++ /dev/null @@ -1,6 +0,0 @@ -fn foo() { - let S {} = (); - let S { f, ref mut g } = (); - let S { h: _, ..} = (); - let S { h: _, } = (); -} diff --git a/crates/syntax/test_data/parser/inline/ok/0102_record_pat_field_list.rast b/crates/syntax/test_data/parser/inline/ok/0102_record_pat_field_list.rast new file mode 100644 index 000000000..866e60ed8 --- /dev/null +++ b/crates/syntax/test_data/parser/inline/ok/0102_record_pat_field_list.rast @@ -0,0 +1,132 @@ +SOURCE_FILE@0..119 + FN@0..118 + FN_KW@0..2 "fn" + WHITESPACE@2..3 " " + NAME@3..6 + IDENT@3..6 "foo" + PARAM_LIST@6..8 + L_PAREN@6..7 "(" + R_PAREN@7..8 ")" + WHITESPACE@8..9 " " + BLOCK_EXPR@9..118 + L_CURLY@9..10 "{" + WHITESPACE@10..15 "\n " + LET_STMT@15..29 + LET_KW@15..18 "let" + WHITESPACE@18..19 " " + RECORD_PAT@19..23 + PATH@19..20 + PATH_SEGMENT@19..20 + NAME_REF@19..20 + IDENT@19..20 "S" + WHITESPACE@20..21 " " + RECORD_PAT_FIELD_LIST@21..23 + L_CURLY@21..22 "{" + R_CURLY@22..23 "}" + WHITESPACE@23..24 " " + EQ@24..25 "=" + WHITESPACE@25..26 " " + TUPLE_EXPR@26..28 + L_PAREN@26..27 "(" + R_PAREN@27..28 ")" + SEMICOLON@28..29 ";" + WHITESPACE@29..34 "\n " + LET_STMT@34..62 + LET_KW@34..37 "let" + WHITESPACE@37..38 " " + RECORD_PAT@38..56 + PATH@38..39 + PATH_SEGMENT@38..39 + NAME_REF@38..39 + IDENT@38..39 "S" + WHITESPACE@39..40 " " + RECORD_PAT_FIELD_LIST@40..56 + L_CURLY@40..41 "{" + WHITESPACE@41..42 " " + RECORD_PAT_FIELD@42..43 + IDENT_PAT@42..43 + NAME@42..43 + IDENT@42..43 "f" + COMMA@43..44 "," + WHITESPACE@44..45 " " + RECORD_PAT_FIELD@45..54 + IDENT_PAT@45..54 + REF_KW@45..48 "ref" + WHITESPACE@48..49 " " + MUT_KW@49..52 "mut" + WHITESPACE@52..53 " " + NAME@53..54 + IDENT@53..54 "g" + WHITESPACE@54..55 " " + R_CURLY@55..56 "}" + WHITESPACE@56..57 " " + EQ@57..58 "=" + WHITESPACE@58..59 " " + TUPLE_EXPR@59..61 + L_PAREN@59..60 "(" + R_PAREN@60..61 ")" + SEMICOLON@61..62 ";" + WHITESPACE@62..67 "\n " + LET_STMT@67..90 + LET_KW@67..70 "let" + WHITESPACE@70..71 " " + RECORD_PAT@71..84 + PATH@71..72 + PATH_SEGMENT@71..72 + NAME_REF@71..72 + IDENT@71..72 "S" + WHITESPACE@72..73 " " + RECORD_PAT_FIELD_LIST@73..84 + L_CURLY@73..74 "{" + WHITESPACE@74..75 " " + RECORD_PAT_FIELD@75..79 + NAME_REF@75..76 + IDENT@75..76 "h" + COLON@76..77 ":" + WHITESPACE@77..78 " " + WILDCARD_PAT@78..79 + UNDERSCORE@78..79 "_" + COMMA@79..80 "," + WHITESPACE@80..81 " " + DOT2@81..83 ".." + R_CURLY@83..84 "}" + WHITESPACE@84..85 " " + EQ@85..86 "=" + WHITESPACE@86..87 " " + TUPLE_EXPR@87..89 + L_PAREN@87..88 "(" + R_PAREN@88..89 ")" + SEMICOLON@89..90 ";" + WHITESPACE@90..95 "\n " + LET_STMT@95..116 + LET_KW@95..98 "let" + WHITESPACE@98..99 " " + RECORD_PAT@99..110 + PATH@99..100 + PATH_SEGMENT@99..100 + NAME_REF@99..100 + IDENT@99..100 "S" + WHITESPACE@100..101 " " + RECORD_PAT_FIELD_LIST@101..110 + L_CURLY@101..102 "{" + WHITESPACE@102..103 " " + RECORD_PAT_FIELD@103..107 + NAME_REF@103..104 + IDENT@103..104 "h" + COLON@104..105 ":" + WHITESPACE@105..106 " " + WILDCARD_PAT@106..107 + UNDERSCORE@106..107 "_" + COMMA@107..108 "," + WHITESPACE@108..109 " " + R_CURLY@109..110 "}" + WHITESPACE@110..111 " " + EQ@111..112 "=" + WHITESPACE@112..113 " " + TUPLE_EXPR@113..115 + L_PAREN@113..114 "(" + R_PAREN@114..115 ")" + SEMICOLON@115..116 ";" + WHITESPACE@116..117 "\n" + R_CURLY@117..118 "}" + WHITESPACE@118..119 "\n" diff --git a/crates/syntax/test_data/parser/inline/ok/0102_record_pat_field_list.rs b/crates/syntax/test_data/parser/inline/ok/0102_record_pat_field_list.rs new file mode 100644 index 000000000..da3412fa8 --- /dev/null +++ b/crates/syntax/test_data/parser/inline/ok/0102_record_pat_field_list.rs @@ -0,0 +1,6 @@ +fn foo() { + let S {} = (); + let S { f, ref mut g } = (); + let S { h: _, ..} = (); + let S { h: _, } = (); +} diff --git a/crates/syntax/test_data/parser/inline/ok/0145_record_field_pat.rast b/crates/syntax/test_data/parser/inline/ok/0145_record_field_pat.rast deleted file mode 100644 index 925409bdf..000000000 --- a/crates/syntax/test_data/parser/inline/ok/0145_record_field_pat.rast +++ /dev/null @@ -1,75 +0,0 @@ -SOURCE_FILE@0..63 - FN@0..62 - FN_KW@0..2 "fn" - WHITESPACE@2..3 " " - NAME@3..6 - IDENT@3..6 "foo" - PARAM_LIST@6..8 - L_PAREN@6..7 "(" - R_PAREN@7..8 ")" - WHITESPACE@8..9 " " - BLOCK_EXPR@9..62 - L_CURLY@9..10 "{" - WHITESPACE@10..15 "\n " - LET_STMT@15..35 - LET_KW@15..18 "let" - WHITESPACE@18..19 " " - RECORD_PAT@19..29 - PATH@19..20 - PATH_SEGMENT@19..20 - NAME_REF@19..20 - IDENT@19..20 "S" - WHITESPACE@20..21 " " - RECORD_PAT_FIELD_LIST@21..29 - L_CURLY@21..22 "{" - WHITESPACE@22..23 " " - RECORD_PAT_FIELD@23..27 - NAME_REF@23..24 - INT_NUMBER@23..24 "0" - COLON@24..25 ":" - WHITESPACE@25..26 " " - LITERAL_PAT@26..27 - LITERAL@26..27 - INT_NUMBER@26..27 "1" - WHITESPACE@27..28 " " - R_CURLY@28..29 "}" - WHITESPACE@29..30 " " - EQ@30..31 "=" - WHITESPACE@31..32 " " - TUPLE_EXPR@32..34 - L_PAREN@32..33 "(" - R_PAREN@33..34 ")" - SEMICOLON@34..35 ";" - WHITESPACE@35..40 "\n " - LET_STMT@40..60 - LET_KW@40..43 "let" - WHITESPACE@43..44 " " - RECORD_PAT@44..54 - PATH@44..45 - PATH_SEGMENT@44..45 - NAME_REF@44..45 - IDENT@44..45 "S" - WHITESPACE@45..46 " " - RECORD_PAT_FIELD_LIST@46..54 - L_CURLY@46..47 "{" - WHITESPACE@47..48 " " - RECORD_PAT_FIELD@48..52 - NAME_REF@48..49 - IDENT@48..49 "x" - COLON@49..50 ":" - WHITESPACE@50..51 " " - LITERAL_PAT@51..52 - LITERAL@51..52 - INT_NUMBER@51..52 "1" - WHITESPACE@52..53 " " - R_CURLY@53..54 "}" - WHITESPACE@54..55 " " - EQ@55..56 "=" - WHITESPACE@56..57 " " - TUPLE_EXPR@57..59 - L_PAREN@57..58 "(" - R_PAREN@58..59 ")" - SEMICOLON@59..60 ";" - WHITESPACE@60..61 "\n" - R_CURLY@61..62 "}" - WHITESPACE@62..63 "\n" diff --git a/crates/syntax/test_data/parser/inline/ok/0145_record_field_pat.rs b/crates/syntax/test_data/parser/inline/ok/0145_record_field_pat.rs deleted file mode 100644 index 26b1d5f89..000000000 --- a/crates/syntax/test_data/parser/inline/ok/0145_record_field_pat.rs +++ /dev/null @@ -1,4 +0,0 @@ -fn foo() { - let S { 0: 1 } = (); - let S { x: 1 } = (); -} diff --git a/crates/syntax/test_data/parser/inline/ok/0145_record_pat_field.rast b/crates/syntax/test_data/parser/inline/ok/0145_record_pat_field.rast new file mode 100644 index 000000000..925409bdf --- /dev/null +++ b/crates/syntax/test_data/parser/inline/ok/0145_record_pat_field.rast @@ -0,0 +1,75 @@ +SOURCE_FILE@0..63 + FN@0..62 + FN_KW@0..2 "fn" + WHITESPACE@2..3 " " + NAME@3..6 + IDENT@3..6 "foo" + PARAM_LIST@6..8 + L_PAREN@6..7 "(" + R_PAREN@7..8 ")" + WHITESPACE@8..9 " " + BLOCK_EXPR@9..62 + L_CURLY@9..10 "{" + WHITESPACE@10..15 "\n " + LET_STMT@15..35 + LET_KW@15..18 "let" + WHITESPACE@18..19 " " + RECORD_PAT@19..29 + PATH@19..20 + PATH_SEGMENT@19..20 + NAME_REF@19..20 + IDENT@19..20 "S" + WHITESPACE@20..21 " " + RECORD_PAT_FIELD_LIST@21..29 + L_CURLY@21..22 "{" + WHITESPACE@22..23 " " + RECORD_PAT_FIELD@23..27 + NAME_REF@23..24 + INT_NUMBER@23..24 "0" + COLON@24..25 ":" + WHITESPACE@25..26 " " + LITERAL_PAT@26..27 + LITERAL@26..27 + INT_NUMBER@26..27 "1" + WHITESPACE@27..28 " " + R_CURLY@28..29 "}" + WHITESPACE@29..30 " " + EQ@30..31 "=" + WHITESPACE@31..32 " " + TUPLE_EXPR@32..34 + L_PAREN@32..33 "(" + R_PAREN@33..34 ")" + SEMICOLON@34..35 ";" + WHITESPACE@35..40 "\n " + LET_STMT@40..60 + LET_KW@40..43 "let" + WHITESPACE@43..44 " " + RECORD_PAT@44..54 + PATH@44..45 + PATH_SEGMENT@44..45 + NAME_REF@44..45 + IDENT@44..45 "S" + WHITESPACE@45..46 " " + RECORD_PAT_FIELD_LIST@46..54 + L_CURLY@46..47 "{" + WHITESPACE@47..48 " " + RECORD_PAT_FIELD@48..52 + NAME_REF@48..49 + IDENT@48..49 "x" + COLON@49..50 ":" + WHITESPACE@50..51 " " + LITERAL_PAT@51..52 + LITERAL@51..52 + INT_NUMBER@51..52 "1" + WHITESPACE@52..53 " " + R_CURLY@53..54 "}" + WHITESPACE@54..55 " " + EQ@55..56 "=" + WHITESPACE@56..57 " " + TUPLE_EXPR@57..59 + L_PAREN@57..58 "(" + R_PAREN@58..59 ")" + SEMICOLON@59..60 ";" + WHITESPACE@60..61 "\n" + R_CURLY@61..62 "}" + WHITESPACE@62..63 "\n" diff --git a/crates/syntax/test_data/parser/inline/ok/0145_record_pat_field.rs b/crates/syntax/test_data/parser/inline/ok/0145_record_pat_field.rs new file mode 100644 index 000000000..26b1d5f89 --- /dev/null +++ b/crates/syntax/test_data/parser/inline/ok/0145_record_pat_field.rs @@ -0,0 +1,4 @@ +fn foo() { + let S { 0: 1 } = (); + let S { x: 1 } = (); +} -- cgit v1.2.3