From 8e3bec11ebd1fce78701670cf9189b5a9d0d68f8 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 22 Aug 2018 16:46:42 +0300 Subject: TypeParamList Owner --- .../tests/data/parser/ok/0001_struct_item.rs | 6 ++-- .../tests/data/parser/ok/0001_struct_item.txt | 37 ++++++++++++++++++---- 2 files changed, 34 insertions(+), 9 deletions(-) (limited to 'crates/libsyntax2/tests/data/parser/ok') diff --git a/crates/libsyntax2/tests/data/parser/ok/0001_struct_item.rs b/crates/libsyntax2/tests/data/parser/ok/0001_struct_item.rs index d3a8c1d23..512aeb3e7 100644 --- a/crates/libsyntax2/tests/data/parser/ok/0001_struct_item.rs +++ b/crates/libsyntax2/tests/data/parser/ok/0001_struct_item.rs @@ -1,3 +1,3 @@ -struct S { - -} \ No newline at end of file +struct S { + f: T, +} diff --git a/crates/libsyntax2/tests/data/parser/ok/0001_struct_item.txt b/crates/libsyntax2/tests/data/parser/ok/0001_struct_item.txt index 798c8fd37..cfe128971 100644 --- a/crates/libsyntax2/tests/data/parser/ok/0001_struct_item.txt +++ b/crates/libsyntax2/tests/data/parser/ok/0001_struct_item.txt @@ -1,10 +1,35 @@ -FILE@[0; 13) - STRUCT_DEF@[0; 13) +FILE@[0; 32) + STRUCT_DEF@[0; 31) STRUCT_KW@[0; 6) WHITESPACE@[6; 7) NAME@[7; 8) IDENT@[7; 8) "S" - WHITESPACE@[8; 9) - L_CURLY@[9; 10) - WHITESPACE@[10; 12) - R_CURLY@[12; 13) + TYPE_PARAM_LIST@[8; 17) + L_ANGLE@[8; 9) + TYPE_PARAM@[9; 16) + NAME@[9; 10) + IDENT@[9; 10) "T" + COLON@[10; 11) + WHITESPACE@[11; 12) + PATH@[12; 16) + PATH_SEGMENT@[12; 16) + NAME_REF@[12; 16) + IDENT@[12; 16) "Copy" + R_ANGLE@[16; 17) + WHITESPACE@[17; 18) + L_CURLY@[18; 19) + WHITESPACE@[19; 24) + NAMED_FIELD@[24; 28) + NAME@[24; 25) + IDENT@[24; 25) "f" + COLON@[25; 26) + WHITESPACE@[26; 27) + PATH_TYPE@[27; 28) + PATH@[27; 28) + PATH_SEGMENT@[27; 28) + NAME_REF@[27; 28) + IDENT@[27; 28) "T" + COMMA@[28; 29) + WHITESPACE@[29; 30) + R_CURLY@[30; 31) + WHITESPACE@[31; 32) -- cgit v1.2.3