File tree Expand file tree Collapse file tree 12 files changed +2324
-1266
lines changed Expand file tree Collapse file tree 12 files changed +2324
-1266
lines changed Original file line number Diff line number Diff line change 1
- ============================================
1
+ ================================================================================
2
2
Async function
3
- ============================================
3
+ ================================================================================
4
4
5
5
async fn abc() {}
6
6
7
7
async fn main() {
8
8
let x = futures.await?;
9
9
}
10
10
11
- ---
11
+ --------------------------------------------------------------------------------
12
12
13
13
(source_file
14
14
(function_item
15
15
(function_modifiers)
16
16
(identifier)
17
17
(parameters)
18
18
(block))
19
- (function_item (function_modifiers) (identifier) (parameters)
19
+ (function_item
20
+ (function_modifiers)
21
+ (identifier)
22
+ (parameters)
20
23
(block
21
- (let_declaration (identifier) (try_expression
22
- (await_expression (identifier)))))))
24
+ (let_declaration
25
+ (identifier)
26
+ (try_expression
27
+ (await_expression
28
+ (identifier)))))))
23
29
24
- ============================================
30
+ ================================================================================
25
31
Await expression
26
- ============================================
32
+ ================================================================================
27
33
28
34
futures.await;
29
35
futures.await?;
30
36
futures.await?.await?;
31
37
futures.await?.function().await?;
32
38
33
- ---
39
+ --------------------------------------------------------------------------------
34
40
35
41
(source_file
36
- (await_expression (identifier))
37
- (try_expression
38
- (await_expression (identifier)))
39
- (try_expression
42
+ (expression_statement
40
43
(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))))))
51
65
52
- ============================================
66
+ ================================================================================
53
67
Async Block
54
- ============================================
68
+ ================================================================================
55
69
56
70
async {}
57
71
async { let x = 10; }
58
72
async move {}
59
73
60
- ---
74
+ --------------------------------------------------------------------------------
61
75
62
76
(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))))
You can’t perform that action at this time.
0 commit comments