diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/data/lexer/0011_keywords.rs | 2 | ||||
-rw-r--r-- | tests/data/lexer/0011_keywords.txt | 2 | ||||
-rw-r--r-- | tests/data/parser/inline/0068_return_expr.rs | 4 | ||||
-rw-r--r-- | tests/data/parser/inline/0068_return_expr.txt | 28 |
4 files changed, 35 insertions, 1 deletions
diff --git a/tests/data/lexer/0011_keywords.rs b/tests/data/lexer/0011_keywords.rs index 22b063567..e6bf64d4d 100644 --- a/tests/data/lexer/0011_keywords.rs +++ b/tests/data/lexer/0011_keywords.rs | |||
@@ -1,3 +1,3 @@ | |||
1 | fn use struct trait enum impl true false as extern crate | 1 | fn use struct trait enum impl true false as extern crate |
2 | mod pub self super in where for loop while if match const | 2 | mod pub self super in where for loop while if match const |
3 | static mut type ref let else move | 3 | static mut type ref let else move return |
diff --git a/tests/data/lexer/0011_keywords.txt b/tests/data/lexer/0011_keywords.txt index 7cfc76716..d6a1abe8a 100644 --- a/tests/data/lexer/0011_keywords.txt +++ b/tests/data/lexer/0011_keywords.txt | |||
@@ -57,4 +57,6 @@ WHITESPACE 1 " " | |||
57 | ELSE_KW 4 "else" | 57 | ELSE_KW 4 "else" |
58 | WHITESPACE 1 " " | 58 | WHITESPACE 1 " " |
59 | MOVE_KW 4 "move" | 59 | MOVE_KW 4 "move" |
60 | WHITESPACE 1 " " | ||
61 | RETURN_KW 6 "return" | ||
60 | WHITESPACE 1 "\n" | 62 | WHITESPACE 1 "\n" |
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 @@ | |||
1 | fn 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 @@ | |||
1 | FILE@[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) | ||