From ec131b6c7bd27d9034ed5e600b80420d35c00a21 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 6 Nov 2018 21:19:32 +0300 Subject: grammar: fix where clause parsing closes #205 --- .../data/parser/err/0027_incomplere_where_for.rs | 3 +++ .../data/parser/err/0027_incomplere_where_for.txt | 27 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 crates/ra_syntax/tests/data/parser/err/0027_incomplere_where_for.rs create mode 100644 crates/ra_syntax/tests/data/parser/err/0027_incomplere_where_for.txt (limited to 'crates/ra_syntax/tests/data') diff --git a/crates/ra_syntax/tests/data/parser/err/0027_incomplere_where_for.rs b/crates/ra_syntax/tests/data/parser/err/0027_incomplere_where_for.rs new file mode 100644 index 000000000..2792c2084 --- /dev/null +++ b/crates/ra_syntax/tests/data/parser/err/0027_incomplere_where_for.rs @@ -0,0 +1,3 @@ +fn foo() + where for<'a> +{} diff --git a/crates/ra_syntax/tests/data/parser/err/0027_incomplere_where_for.txt b/crates/ra_syntax/tests/data/parser/err/0027_incomplere_where_for.txt new file mode 100644 index 000000000..94b75a656 --- /dev/null +++ b/crates/ra_syntax/tests/data/parser/err/0027_incomplere_where_for.txt @@ -0,0 +1,27 @@ +ROOT@[0; 30) + FN_DEF@[0; 29) + FN_KW@[0; 2) + WHITESPACE@[2; 3) + NAME@[3; 6) + IDENT@[3; 6) "foo" + PARAM_LIST@[6; 8) + L_PAREN@[6; 7) + R_PAREN@[7; 8) + WHITESPACE@[8; 13) + WHERE_CLAUSE@[13; 26) + WHERE_KW@[13; 18) + WHITESPACE@[18; 19) + WHERE_PRED@[19; 26) + FOR_KW@[19; 22) + TYPE_PARAM_LIST@[22; 26) + L_ANGLE@[22; 23) + LIFETIME_PARAM@[23; 25) + LIFETIME@[23; 25) "'a" + R_ANGLE@[25; 26) + err: `expected a type` + err: `expected colon` + WHITESPACE@[26; 27) + BLOCK@[27; 29) + L_CURLY@[27; 28) + R_CURLY@[28; 29) + WHITESPACE@[29; 30) -- cgit v1.2.3