From 63e2ed4e75bc16cdd1882be031d026469b49dbc4 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 31 Jul 2018 19:37:40 +0300 Subject: Nodes for type args --- tests/data/parser/inline/0039_path_expr.txt | 11 ++++---- tests/data/parser/inline/0058_type_arg.rs | 1 + tests/data/parser/inline/0058_type_arg.txt | 39 +++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 5 deletions(-) create mode 100644 tests/data/parser/inline/0058_type_arg.rs create mode 100644 tests/data/parser/inline/0058_type_arg.txt (limited to 'tests/data/parser/inline') diff --git a/tests/data/parser/inline/0039_path_expr.txt b/tests/data/parser/inline/0039_path_expr.txt index 36a4ace6a..c3fc0c4bf 100644 --- a/tests/data/parser/inline/0039_path_expr.txt +++ b/tests/data/parser/inline/0039_path_expr.txt @@ -63,11 +63,12 @@ FILE@[0; 68) TYPE_ARG_LIST@[59; 64) COLONCOLON@[59; 61) L_ANGLE@[61; 62) - PATH_TYPE@[62; 63) - PATH@[62; 63) - PATH_SEGMENT@[62; 63) - NAME_REF@[62; 63) - IDENT@[62; 63) "b" + TYPE_ARG@[62; 63) + PATH_TYPE@[62; 63) + PATH@[62; 63) + PATH_SEGMENT@[62; 63) + NAME_REF@[62; 63) + IDENT@[62; 63) "b" R_ANGLE@[63; 64) SEMI@[64; 65) WHITESPACE@[65; 66) diff --git a/tests/data/parser/inline/0058_type_arg.rs b/tests/data/parser/inline/0058_type_arg.rs new file mode 100644 index 000000000..f0c8cc3a8 --- /dev/null +++ b/tests/data/parser/inline/0058_type_arg.rs @@ -0,0 +1 @@ +type A = B<'static, i32, Item=u64> diff --git a/tests/data/parser/inline/0058_type_arg.txt b/tests/data/parser/inline/0058_type_arg.txt new file mode 100644 index 000000000..af4bcedef --- /dev/null +++ b/tests/data/parser/inline/0058_type_arg.txt @@ -0,0 +1,39 @@ +FILE@[0; 35) + TYPE_ITEM@[0; 35) + TYPE_KW@[0; 4) + NAME@[4; 7) + WHITESPACE@[4; 5) + IDENT@[5; 6) "A" + WHITESPACE@[6; 7) + EQ@[7; 8) + PATH_TYPE@[8; 35) + PATH@[8; 35) + PATH_SEGMENT@[8; 35) + NAME_REF@[8; 10) + WHITESPACE@[8; 9) + IDENT@[9; 10) "B" + TYPE_ARG_LIST@[10; 35) + L_ANGLE@[10; 11) + LIFETIME_ARG@[11; 18) + LIFETIME@[11; 18) "'static" + COMMA@[18; 19) + TYPE_ARG@[19; 23) + PATH_TYPE@[19; 23) + PATH@[19; 23) + PATH_SEGMENT@[19; 23) + NAME_REF@[19; 23) + WHITESPACE@[19; 20) + IDENT@[20; 23) "i32" + COMMA@[23; 24) + ASSOC_TYPE_ARG@[24; 33) + WHITESPACE@[24; 25) + IDENT@[25; 29) "Item" + EQ@[29; 30) + PATH_TYPE@[30; 33) + PATH@[30; 33) + PATH_SEGMENT@[30; 33) + NAME_REF@[30; 33) + IDENT@[30; 33) "u64" + R_ANGLE@[33; 34) + WHITESPACE@[34; 35) + err: `expected SEMI` -- cgit v1.2.3