aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax/test_data/parser
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-01-15 14:48:21 +0000
committerGitHub <[email protected]>2021-01-15 14:48:21 +0000
commit0c58aa9dc0e24f0fa6a6ee7eb0c35041dedddb0a (patch)
tree863b6e41430b4d9f5c9dcebd443f4acdbe7e0193 /crates/syntax/test_data/parser
parentd6a708b1eae170aee4a323ea6513bc4f2a1a5bbc (diff)
parent138514bea244253f2c0007976921f4475c9d2cd5 (diff)
Merge #7209
7209: Support yield keyword r=Veykril a=sasurau4 Part of #4309 The inference of yield will be implemented at another PR. Co-authored-by: Daiki Ihara <[email protected]>
Diffstat (limited to 'crates/syntax/test_data/parser')
-rw-r--r--crates/syntax/test_data/parser/inline/ok/0159_yield_expr.rast28
-rw-r--r--crates/syntax/test_data/parser/inline/ok/0159_yield_expr.rs4
2 files changed, 32 insertions, 0 deletions
diff --git a/crates/syntax/test_data/parser/inline/ok/0159_yield_expr.rast b/crates/syntax/test_data/parser/inline/ok/0159_yield_expr.rast
new file mode 100644
index 000000000..05fc90743
--- /dev/null
+++ b/crates/syntax/test_data/parser/inline/ok/0159_yield_expr.rast
@@ -0,0 +1,28 @@
1[email protected]
2 [email protected]
3 [email protected] "fn"
4 [email protected] " "
5 [email protected]
6 [email protected] "foo"
7 [email protected]
8 [email protected] "("
9 [email protected] ")"
10 [email protected] " "
11 [email protected]
12 [email protected] "{"
13 [email protected] "\n "
14 [email protected]
15 [email protected]
16 [email protected] "yield"
17 [email protected] ";"
18 [email protected] "\n "
19 [email protected]
20 [email protected]
21 [email protected] "yield"
22 [email protected] " "
23 [email protected]
24 [email protected] "1"
25 [email protected] ";"
26 [email protected] "\n"
27 [email protected] "}"
28 [email protected] "\n"
diff --git a/crates/syntax/test_data/parser/inline/ok/0159_yield_expr.rs b/crates/syntax/test_data/parser/inline/ok/0159_yield_expr.rs
new file mode 100644
index 000000000..596e221f7
--- /dev/null
+++ b/crates/syntax/test_data/parser/inline/ok/0159_yield_expr.rs
@@ -0,0 +1,4 @@
1fn foo() {
2 yield;
3 yield 1;
4}