From 37e1625f0139da07c2690b6ee6ca7eae5ebb061a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 1 Aug 2018 11:27:31 +0300 Subject: return expr --- tests/data/parser/inline/0068_return_expr.rs | 4 ++++ tests/data/parser/inline/0068_return_expr.txt | 28 +++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 tests/data/parser/inline/0068_return_expr.rs create mode 100644 tests/data/parser/inline/0068_return_expr.txt (limited to 'tests/data/parser') diff --git a/tests/data/parser/inline/0068_return_expr.rs b/tests/data/parser/inline/0068_return_expr.rs new file mode 100644 index 000000000..5733666b6 --- /dev/null +++ b/tests/data/parser/inline/0068_return_expr.rs @@ -0,0 +1,4 @@ +fn foo() { + return; + return 92; +} diff --git a/tests/data/parser/inline/0068_return_expr.txt b/tests/data/parser/inline/0068_return_expr.txt new file mode 100644 index 000000000..61a075fc1 --- /dev/null +++ b/tests/data/parser/inline/0068_return_expr.txt @@ -0,0 +1,28 @@ +FILE@[0; 40) + FN_ITEM@[0; 40) + 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; 40) + L_CURLY@[9; 10) + EXPR_STMT@[10; 27) + RETURN_EXPR@[10; 21) + WHITESPACE@[10; 15) + RETURN_KW@[15; 21) + SEMI@[21; 22) + WHITESPACE@[22; 27) + EXPR_STMT@[27; 38) + RETURN_EXPR@[27; 36) + RETURN_KW@[27; 33) + LITERAL@[33; 36) + WHITESPACE@[33; 34) + INT_NUMBER@[34; 36) "92" + SEMI@[36; 37) + WHITESPACE@[37; 38) + R_CURLY@[38; 39) + WHITESPACE@[39; 40) -- cgit v1.2.3