From edf2b17a572b56371cfc29bbc3a686edcb12782c Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 31 Jul 2018 17:43:44 +0300 Subject: allow items inside blocks --- tests/data/parser/inline/0053_block_items.rs | 1 + tests/data/parser/inline/0053_block_items.txt | 28 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 tests/data/parser/inline/0053_block_items.rs create mode 100644 tests/data/parser/inline/0053_block_items.txt (limited to 'tests/data/parser') diff --git a/tests/data/parser/inline/0053_block_items.rs b/tests/data/parser/inline/0053_block_items.rs new file mode 100644 index 000000000..d9868718c --- /dev/null +++ b/tests/data/parser/inline/0053_block_items.rs @@ -0,0 +1 @@ +fn a() { fn b() {} } diff --git a/tests/data/parser/inline/0053_block_items.txt b/tests/data/parser/inline/0053_block_items.txt new file mode 100644 index 000000000..1b1158aa5 --- /dev/null +++ b/tests/data/parser/inline/0053_block_items.txt @@ -0,0 +1,28 @@ +FILE@[0; 21) + FN_ITEM@[0; 21) + FN_KW@[0; 2) + NAME@[2; 4) + WHITESPACE@[2; 3) + IDENT@[3; 4) "a" + PARAM_LIST@[4; 7) + L_PAREN@[4; 5) + R_PAREN@[5; 6) + WHITESPACE@[6; 7) + BLOCK@[7; 21) + L_CURLY@[7; 8) + FN_ITEM@[8; 19) + WHITESPACE@[8; 9) + FN_KW@[9; 11) + NAME@[11; 13) + WHITESPACE@[11; 12) + IDENT@[12; 13) "b" + PARAM_LIST@[13; 16) + L_PAREN@[13; 14) + R_PAREN@[14; 15) + WHITESPACE@[15; 16) + BLOCK@[16; 19) + L_CURLY@[16; 17) + R_CURLY@[17; 18) + WHITESPACE@[18; 19) + R_CURLY@[19; 20) + WHITESPACE@[20; 21) -- cgit v1.2.3