aboutsummaryrefslogtreecommitdiff
path: root/tests/data/parser
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-01 09:27:31 +0100
committerAleksey Kladov <[email protected]>2018-08-01 09:27:31 +0100
commit37e1625f0139da07c2690b6ee6ca7eae5ebb061a (patch)
tree368d3329e120fc5d76a0595110f7519bb084d70f /tests/data/parser
parent53485030dc49aa7cd66e36c8a1e1abf1bf08020c (diff)
return expr
Diffstat (limited to 'tests/data/parser')
-rw-r--r--tests/data/parser/inline/0068_return_expr.rs4
-rw-r--r--tests/data/parser/inline/0068_return_expr.txt28
2 files changed, 32 insertions, 0 deletions
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 @@
1fn foo() {
2 return;
3 return 92;
4}
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 @@
1FILE@[0; 40)
2 FN_ITEM@[0; 40)
3 FN_KW@[0; 2)
4 NAME@[2; 6)
5 WHITESPACE@[2; 3)
6 IDENT@[3; 6) "foo"
7 PARAM_LIST@[6; 9)
8 L_PAREN@[6; 7)
9 R_PAREN@[7; 8)
10 WHITESPACE@[8; 9)
11 BLOCK_EXPR@[9; 40)
12 L_CURLY@[9; 10)
13 EXPR_STMT@[10; 27)
14 RETURN_EXPR@[10; 21)
15 WHITESPACE@[10; 15)
16 RETURN_KW@[15; 21)
17 SEMI@[21; 22)
18 WHITESPACE@[22; 27)
19 EXPR_STMT@[27; 38)
20 RETURN_EXPR@[27; 36)
21 RETURN_KW@[27; 33)
22 LITERAL@[33; 36)
23 WHITESPACE@[33; 34)
24 INT_NUMBER@[34; 36) "92"
25 SEMI@[36; 37)
26 WHITESPACE@[37; 38)
27 R_CURLY@[38; 39)
28 WHITESPACE@[39; 40)