diff options
author | Aleksey Kladov <[email protected]> | 2018-07-31 21:13:08 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-07-31 21:13:08 +0100 |
commit | d82a21ab202b2f5e8c96847802d806735ec74ad3 (patch) | |
tree | aea23d0bb9760a6104f5994a73b37c869cbaf4bb /tests/data/parser | |
parent | 1af8eb9c08f974a1b3beecfebadeb03144ef337d (diff) |
lambda expressions
Diffstat (limited to 'tests/data/parser')
-rw-r--r-- | tests/data/parser/inline/0063_lambda_expr.rs | 6 | ||||
-rw-r--r-- | tests/data/parser/inline/0063_lambda_expr.txt | 91 | ||||
-rw-r--r-- | tests/data/parser/inline/0064_param_list.rs (renamed from tests/data/parser/inline/0033_fn_value_parameters.rs) | 0 | ||||
-rw-r--r-- | tests/data/parser/inline/0064_param_list.txt (renamed from tests/data/parser/inline/0033_fn_value_parameters.txt) | 0 |
4 files changed, 97 insertions, 0 deletions
diff --git a/tests/data/parser/inline/0063_lambda_expr.rs b/tests/data/parser/inline/0063_lambda_expr.rs new file mode 100644 index 000000000..3c30a9209 --- /dev/null +++ b/tests/data/parser/inline/0063_lambda_expr.rs | |||
@@ -0,0 +1,6 @@ | |||
1 | fn foo() { | ||
2 | || (); | ||
3 | || -> i32 { 92 }; | ||
4 | |x| x; | ||
5 | |x: i32,| x; | ||
6 | } | ||
diff --git a/tests/data/parser/inline/0063_lambda_expr.txt b/tests/data/parser/inline/0063_lambda_expr.txt new file mode 100644 index 000000000..b1edffc14 --- /dev/null +++ b/tests/data/parser/inline/0063_lambda_expr.txt | |||
@@ -0,0 +1,91 @@ | |||
1 | FILE@[0; 74) | ||
2 | FN_ITEM@[0; 74) | ||
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@[9; 74) | ||
12 | L_CURLY@[9; 10) | ||
13 | EXPR_STMT@[10; 26) | ||
14 | LAMBDA_EXPR@[10; 20) | ||
15 | PARAM_LIST@[10; 18) | ||
16 | WHITESPACE@[10; 15) | ||
17 | PIPE@[15; 16) | ||
18 | PIPE@[16; 17) | ||
19 | WHITESPACE@[17; 18) | ||
20 | TUPLE_EXPR@[18; 20) | ||
21 | L_PAREN@[18; 19) | ||
22 | R_PAREN@[19; 20) | ||
23 | SEMI@[20; 21) | ||
24 | WHITESPACE@[21; 26) | ||
25 | EXPR_STMT@[26; 48) | ||
26 | LAMBDA_EXPR@[26; 42) | ||
27 | PARAM_LIST@[26; 29) | ||
28 | PIPE@[26; 27) | ||
29 | PIPE@[27; 28) | ||
30 | WHITESPACE@[28; 29) | ||
31 | THIN_ARROW@[29; 31) | ||
32 | PATH_TYPE@[31; 36) | ||
33 | PATH@[31; 36) | ||
34 | PATH_SEGMENT@[31; 36) | ||
35 | NAME_REF@[31; 36) | ||
36 | WHITESPACE@[31; 32) | ||
37 | IDENT@[32; 35) "i32" | ||
38 | WHITESPACE@[35; 36) | ||
39 | BLOCK@[36; 42) | ||
40 | L_CURLY@[36; 37) | ||
41 | LITERAL@[37; 41) | ||
42 | WHITESPACE@[37; 38) | ||
43 | INT_NUMBER@[38; 40) | ||
44 | WHITESPACE@[40; 41) | ||
45 | R_CURLY@[41; 42) | ||
46 | SEMI@[42; 43) | ||
47 | WHITESPACE@[43; 48) | ||
48 | EXPR_STMT@[48; 59) | ||
49 | LAMBDA_EXPR@[48; 53) | ||
50 | PARAM_LIST@[48; 52) | ||
51 | PIPE@[48; 49) | ||
52 | VALUE_PARAMETER@[49; 50) | ||
53 | BIND_PAT@[49; 50) | ||
54 | NAME@[49; 50) | ||
55 | IDENT@[49; 50) "x" | ||
56 | PIPE@[50; 51) | ||
57 | WHITESPACE@[51; 52) | ||
58 | PATH_EXPR@[52; 53) | ||
59 | PATH@[52; 53) | ||
60 | PATH_SEGMENT@[52; 53) | ||
61 | NAME_REF@[52; 53) | ||
62 | IDENT@[52; 53) "x" | ||
63 | SEMI@[53; 54) | ||
64 | WHITESPACE@[54; 59) | ||
65 | EXPR_STMT@[59; 72) | ||
66 | LAMBDA_EXPR@[59; 70) | ||
67 | PARAM_LIST@[59; 69) | ||
68 | PIPE@[59; 60) | ||
69 | VALUE_PARAMETER@[60; 66) | ||
70 | BIND_PAT@[60; 61) | ||
71 | NAME@[60; 61) | ||
72 | IDENT@[60; 61) "x" | ||
73 | COLON@[61; 62) | ||
74 | PATH_TYPE@[62; 66) | ||
75 | PATH@[62; 66) | ||
76 | PATH_SEGMENT@[62; 66) | ||
77 | NAME_REF@[62; 66) | ||
78 | WHITESPACE@[62; 63) | ||
79 | IDENT@[63; 66) "i32" | ||
80 | COMMA@[66; 67) | ||
81 | PIPE@[67; 68) | ||
82 | WHITESPACE@[68; 69) | ||
83 | PATH_EXPR@[69; 70) | ||
84 | PATH@[69; 70) | ||
85 | PATH_SEGMENT@[69; 70) | ||
86 | NAME_REF@[69; 70) | ||
87 | IDENT@[69; 70) "x" | ||
88 | SEMI@[70; 71) | ||
89 | WHITESPACE@[71; 72) | ||
90 | R_CURLY@[72; 73) | ||
91 | WHITESPACE@[73; 74) | ||
diff --git a/tests/data/parser/inline/0033_fn_value_parameters.rs b/tests/data/parser/inline/0064_param_list.rs index 9d55bedbb..9d55bedbb 100644 --- a/tests/data/parser/inline/0033_fn_value_parameters.rs +++ b/tests/data/parser/inline/0064_param_list.rs | |||
diff --git a/tests/data/parser/inline/0033_fn_value_parameters.txt b/tests/data/parser/inline/0064_param_list.txt index 96e03d71a..96e03d71a 100644 --- a/tests/data/parser/inline/0033_fn_value_parameters.txt +++ b/tests/data/parser/inline/0064_param_list.txt | |||