Skip to content

Commit b255b17

Browse files
Make expression_statement visible
Co-Authored-By: Nathan Sobo <[email protected]>
1 parent eeb0702 commit b255b17

File tree

12 files changed

+2324
-1266
lines changed

12 files changed

+2324
-1266
lines changed

corpus/async.txt

Lines changed: 52 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,88 @@
1-
============================================
1+
================================================================================
22
Async function
3-
============================================
3+
================================================================================
44

55
async fn abc() {}
66

77
async fn main() {
88
let x = futures.await?;
99
}
1010

11-
---
11+
--------------------------------------------------------------------------------
1212

1313
(source_file
1414
(function_item
1515
(function_modifiers)
1616
(identifier)
1717
(parameters)
1818
(block))
19-
(function_item (function_modifiers) (identifier) (parameters)
19+
(function_item
20+
(function_modifiers)
21+
(identifier)
22+
(parameters)
2023
(block
21-
(let_declaration (identifier) (try_expression
22-
(await_expression (identifier)))))))
24+
(let_declaration
25+
(identifier)
26+
(try_expression
27+
(await_expression
28+
(identifier)))))))
2329

24-
============================================
30+
================================================================================
2531
Await expression
26-
============================================
32+
================================================================================
2733

2834
futures.await;
2935
futures.await?;
3036
futures.await?.await?;
3137
futures.await?.function().await?;
3238

33-
---
39+
--------------------------------------------------------------------------------
3440

3541
(source_file
36-
(await_expression (identifier))
37-
(try_expression
38-
(await_expression (identifier)))
39-
(try_expression
42+
(expression_statement
4043
(await_expression
41-
(try_expression
42-
(await_expression (identifier)))))
43-
(try_expression
44-
(await_expression
45-
(call_expression
46-
(field_expression
47-
(try_expression
48-
(await_expression (identifier)))
49-
(field_identifier))
50-
(arguments)))))
44+
(identifier)))
45+
(expression_statement
46+
(try_expression
47+
(await_expression
48+
(identifier))))
49+
(expression_statement
50+
(try_expression
51+
(await_expression
52+
(try_expression
53+
(await_expression
54+
(identifier))))))
55+
(expression_statement
56+
(try_expression
57+
(await_expression
58+
(call_expression
59+
(field_expression
60+
(try_expression
61+
(await_expression
62+
(identifier)))
63+
(field_identifier))
64+
(arguments))))))
5165

52-
============================================
66+
================================================================================
5367
Async Block
54-
============================================
68+
================================================================================
5569

5670
async {}
5771
async { let x = 10; }
5872
async move {}
5973

60-
---
74+
--------------------------------------------------------------------------------
6175

6276
(source_file
63-
(async_block
64-
(block))
65-
(async_block
66-
(block
67-
(let_declaration
68-
(identifier)
69-
(integer_literal))))
70-
(async_block
71-
(block)))
77+
(expression_statement
78+
(async_block
79+
(block)))
80+
(expression_statement
81+
(async_block
82+
(block
83+
(let_declaration
84+
(identifier)
85+
(integer_literal)))))
86+
(expression_statement
87+
(async_block
88+
(block))))

0 commit comments

Comments
 (0)