From 80fa861cd688c8e7c92e27feaf6623ecfaa4901e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 5 Aug 2018 17:24:44 +0300 Subject: index expr --- tests/data/parser/inline/0081_index_expr.rs | 3 +++ tests/data/parser/inline/0081_index_expr.txt | 33 ++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 tests/data/parser/inline/0081_index_expr.rs create mode 100644 tests/data/parser/inline/0081_index_expr.txt (limited to 'tests/data/parser') diff --git a/tests/data/parser/inline/0081_index_expr.rs b/tests/data/parser/inline/0081_index_expr.rs new file mode 100644 index 000000000..b9ba78a6c --- /dev/null +++ b/tests/data/parser/inline/0081_index_expr.rs @@ -0,0 +1,3 @@ +fn foo() { + x[1][2]; +} diff --git a/tests/data/parser/inline/0081_index_expr.txt b/tests/data/parser/inline/0081_index_expr.txt new file mode 100644 index 000000000..b77f54fb6 --- /dev/null +++ b/tests/data/parser/inline/0081_index_expr.txt @@ -0,0 +1,33 @@ +FILE@[0; 26) + FN_ITEM@[0; 26) + FN_KW@[0; 2) + NAME@[2; 6) + WHITESPACE@[2; 3) + IDENT@[3; 6) "foo" + PARAM_LIST@[6; 9) + L_PAREN@[6; 7) + R_PAREN@[7; 8) + WHITESPACE@[8; 9) + BLOCK_EXPR@[9; 26) + L_CURLY@[9; 10) + EXPR_STMT@[10; 24) + INDEX_EXPR@[10; 22) + INDEX_EXPR@[10; 19) + PATH_EXPR@[10; 16) + PATH@[10; 16) + PATH_SEGMENT@[10; 16) + NAME_REF@[10; 16) + WHITESPACE@[10; 15) + IDENT@[15; 16) "x" + L_BRACK@[16; 17) + LITERAL@[17; 18) + INT_NUMBER@[17; 18) "1" + R_BRACK@[18; 19) + L_BRACK@[19; 20) + LITERAL@[20; 21) + INT_NUMBER@[20; 21) "2" + R_BRACK@[21; 22) + SEMI@[22; 23) + WHITESPACE@[23; 24) + R_CURLY@[24; 25) + WHITESPACE@[25; 26) -- cgit v1.2.3