aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/tests/data/parser
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-06-06 13:58:28 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-06-06 13:58:28 +0100
commitba3148159974b4fa7a2e37ade3a79ba5eeb4e760 (patch)
treeb5b9eb1151c6fdbfcbeeaaf4dfd2b2db015a6266 /crates/ra_syntax/tests/data/parser
parentb79e6294a68fd41f0a3dbd9eb907dfe99646d77e (diff)
parent505b8d873ffe422358bb4ff47dc82d6c76d0772e (diff)
Merge #1380
1380: [#1083] Try block syntax r=matklad a=andreytkachenko The `try` block syntax Co-authored-by: Andrey Tkachenko <[email protected]>
Diffstat (limited to 'crates/ra_syntax/tests/data/parser')
-rw-r--r--crates/ra_syntax/tests/data/parser/inline/ok/0130_try_block_expr.rs3
-rw-r--r--crates/ra_syntax/tests/data/parser/inline/ok/0130_try_block_expr.txt31
2 files changed, 34 insertions, 0 deletions
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0130_try_block_expr.rs b/crates/ra_syntax/tests/data/parser/inline/ok/0130_try_block_expr.rs
new file mode 100644
index 000000000..0f1b41eb6
--- /dev/null
+++ b/crates/ra_syntax/tests/data/parser/inline/ok/0130_try_block_expr.rs
@@ -0,0 +1,3 @@
1fn foo() {
2 let _ = try {};
3}
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0130_try_block_expr.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0130_try_block_expr.txt
new file mode 100644
index 000000000..53f49b9b5
--- /dev/null
+++ b/crates/ra_syntax/tests/data/parser/inline/ok/0130_try_block_expr.txt
@@ -0,0 +1,31 @@
1SOURCE_FILE@[0; 33)
2 FN_DEF@[0; 32)
3 FN_KW@[0; 2) "fn"
4 WHITESPACE@[2; 3) " "
5 NAME@[3; 6)
6 IDENT@[3; 6) "foo"
7 PARAM_LIST@[6; 8)
8 L_PAREN@[6; 7) "("
9 R_PAREN@[7; 8) ")"
10 WHITESPACE@[8; 9) " "
11 BLOCK@[9; 32)
12 L_CURLY@[9; 10) "{"
13 WHITESPACE@[10; 15) "\n "
14 LET_STMT@[15; 30)
15 LET_KW@[15; 18) "let"
16 WHITESPACE@[18; 19) " "
17 PLACEHOLDER_PAT@[19; 20)
18 UNDERSCORE@[19; 20) "_"
19 WHITESPACE@[20; 21) " "
20 EQ@[21; 22) "="
21 WHITESPACE@[22; 23) " "
22 TRY_EXPR@[23; 29)
23 TRY_KW@[23; 26) "try"
24 WHITESPACE@[26; 27) " "
25 BLOCK@[27; 29)
26 L_CURLY@[27; 28) "{"
27 R_CURLY@[28; 29) "}"
28 SEMI@[29; 30) ";"
29 WHITESPACE@[30; 31) "\n"
30 R_CURLY@[31; 32) "}"
31 WHITESPACE@[32; 33) "\n"