From 8fc7f438c4347e027deda5cda4bcd5e560610bb7 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 31 Aug 2018 13:35:48 +0300 Subject: start item recovery --- .../tests/data/parser/err/0020_fn_recover.rs | 3 +++ .../tests/data/parser/err/0020_fn_recover.txt | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 crates/libsyntax2/tests/data/parser/err/0020_fn_recover.rs create mode 100644 crates/libsyntax2/tests/data/parser/err/0020_fn_recover.txt (limited to 'crates/libsyntax2/tests/data/parser/err') diff --git a/crates/libsyntax2/tests/data/parser/err/0020_fn_recover.rs b/crates/libsyntax2/tests/data/parser/err/0020_fn_recover.rs new file mode 100644 index 000000000..3393b668b --- /dev/null +++ b/crates/libsyntax2/tests/data/parser/err/0020_fn_recover.rs @@ -0,0 +1,3 @@ +fn + +fn foo() {} diff --git a/crates/libsyntax2/tests/data/parser/err/0020_fn_recover.txt b/crates/libsyntax2/tests/data/parser/err/0020_fn_recover.txt new file mode 100644 index 000000000..b5218b0fa --- /dev/null +++ b/crates/libsyntax2/tests/data/parser/err/0020_fn_recover.txt @@ -0,0 +1,20 @@ +ROOT@[0; 16) + FN_DEF@[0; 2) + FN_KW@[0; 2) + err: `expected a name` + err: `expected function arguments` + err: `expected a block` + WHITESPACE@[2; 4) + FN_DEF@[4; 15) + FN_KW@[4; 6) + WHITESPACE@[6; 7) + NAME@[7; 10) + IDENT@[7; 10) "foo" + PARAM_LIST@[10; 12) + L_PAREN@[10; 11) + R_PAREN@[11; 12) + WHITESPACE@[12; 13) + BLOCK@[13; 15) + L_CURLY@[13; 14) + R_CURLY@[14; 15) + WHITESPACE@[15; 16) -- cgit v1.2.3