From f104458d45e30024f8a4a02c1ad4101ed74b08f9 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 24 Aug 2018 20:50:37 +0300 Subject: parameter parsing does not destroy blocks --- .../tests/data/parser/err/0015_curly_in_params.rs | 2 ++ .../tests/data/parser/err/0015_curly_in_params.txt | 24 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 crates/libsyntax2/tests/data/parser/err/0015_curly_in_params.rs create mode 100644 crates/libsyntax2/tests/data/parser/err/0015_curly_in_params.txt (limited to 'crates/libsyntax2/tests/data/parser/err') diff --git a/crates/libsyntax2/tests/data/parser/err/0015_curly_in_params.rs b/crates/libsyntax2/tests/data/parser/err/0015_curly_in_params.rs new file mode 100644 index 000000000..156e70251 --- /dev/null +++ b/crates/libsyntax2/tests/data/parser/err/0015_curly_in_params.rs @@ -0,0 +1,2 @@ +fn foo(}) { +} diff --git a/crates/libsyntax2/tests/data/parser/err/0015_curly_in_params.txt b/crates/libsyntax2/tests/data/parser/err/0015_curly_in_params.txt new file mode 100644 index 000000000..841379797 --- /dev/null +++ b/crates/libsyntax2/tests/data/parser/err/0015_curly_in_params.txt @@ -0,0 +1,24 @@ +FILE@[0; 14) + FN_DEF@[0; 7) + FN_KW@[0; 2) + WHITESPACE@[2; 3) + NAME@[3; 6) + IDENT@[3; 6) "foo" + PARAM_LIST@[6; 7) + L_PAREN@[6; 7) + err: `expected value parameter` + err: `expected R_PAREN` + err: `expected SEMI` + err: `expected an item` + ERROR@[7; 8) + R_CURLY@[7; 8) + err: `expected an item` + ERROR@[8; 9) + R_PAREN@[8; 9) + WHITESPACE@[9; 10) + err: `expected an item` + ERROR@[10; 13) + L_CURLY@[10; 11) + WHITESPACE@[11; 12) + R_CURLY@[12; 13) + WHITESPACE@[13; 14) -- cgit v1.2.3