From 505b8d873ffe422358bb4ff47dc82d6c76d0772e Mon Sep 17 00:00:00 2001 From: Andrey Tkachenko Date: Thu, 6 Jun 2019 16:26:54 +0400 Subject: [#1083] Try block syntax: fix tests --- .../data/parser/inline/ok/0130_try_block_expr.rs | 3 +++ .../data/parser/inline/ok/0130_try_block_expr.txt | 31 ++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 crates/ra_syntax/tests/data/parser/inline/ok/0130_try_block_expr.rs create mode 100644 crates/ra_syntax/tests/data/parser/inline/ok/0130_try_block_expr.txt (limited to 'crates/ra_syntax/tests/data/parser/inline') 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 @@ +fn foo() { + let _ = try {}; +} 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 @@ +SOURCE_FILE@[0; 33) + FN_DEF@[0; 32) + FN_KW@[0; 2) "fn" + WHITESPACE@[2; 3) " " + NAME@[3; 6) + IDENT@[3; 6) "foo" + PARAM_LIST@[6; 8) + L_PAREN@[6; 7) "(" + R_PAREN@[7; 8) ")" + WHITESPACE@[8; 9) " " + BLOCK@[9; 32) + L_CURLY@[9; 10) "{" + WHITESPACE@[10; 15) "\n " + LET_STMT@[15; 30) + LET_KW@[15; 18) "let" + WHITESPACE@[18; 19) " " + PLACEHOLDER_PAT@[19; 20) + UNDERSCORE@[19; 20) "_" + WHITESPACE@[20; 21) " " + EQ@[21; 22) "=" + WHITESPACE@[22; 23) " " + TRY_EXPR@[23; 29) + TRY_KW@[23; 26) "try" + WHITESPACE@[26; 27) " " + BLOCK@[27; 29) + L_CURLY@[27; 28) "{" + R_CURLY@[28; 29) "}" + SEMI@[29; 30) ";" + WHITESPACE@[30; 31) "\n" + R_CURLY@[31; 32) "}" + WHITESPACE@[32; 33) "\n" -- cgit v1.2.3