From 2c94c4964aa6242098f97ca3421a750a763567b4 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 23 Dec 2020 02:15:30 +0100 Subject: Parse const effect block --- .../parser/inline/ok/0157_const_block.rast | 23 ++++++++++++++++++++++ .../test_data/parser/inline/ok/0157_const_block.rs | 1 + 2 files changed, 24 insertions(+) create mode 100644 crates/syntax/test_data/parser/inline/ok/0157_const_block.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0157_const_block.rs (limited to 'crates/syntax/test_data/parser/inline') diff --git a/crates/syntax/test_data/parser/inline/ok/0157_const_block.rast b/crates/syntax/test_data/parser/inline/ok/0157_const_block.rast new file mode 100644 index 000000000..d5d2c8fe3 --- /dev/null +++ b/crates/syntax/test_data/parser/inline/ok/0157_const_block.rast @@ -0,0 +1,23 @@ +SOURCE_FILE@0..21 + FN@0..20 + FN_KW@0..2 "fn" + WHITESPACE@2..3 " " + NAME@3..4 + IDENT@3..4 "f" + PARAM_LIST@4..6 + L_PAREN@4..5 "(" + R_PAREN@5..6 ")" + WHITESPACE@6..7 " " + BLOCK_EXPR@7..20 + L_CURLY@7..8 "{" + WHITESPACE@8..9 " " + EFFECT_EXPR@9..18 + CONST_KW@9..14 "const" + WHITESPACE@14..15 " " + BLOCK_EXPR@15..18 + L_CURLY@15..16 "{" + WHITESPACE@16..17 " " + R_CURLY@17..18 "}" + WHITESPACE@18..19 " " + R_CURLY@19..20 "}" + WHITESPACE@20..21 "\n" diff --git a/crates/syntax/test_data/parser/inline/ok/0157_const_block.rs b/crates/syntax/test_data/parser/inline/ok/0157_const_block.rs new file mode 100644 index 000000000..a2e3565a3 --- /dev/null +++ b/crates/syntax/test_data/parser/inline/ok/0157_const_block.rs @@ -0,0 +1 @@ +fn f() { const { } } -- cgit v1.2.3