From 76075c74103b3204ebc1bde54a330629d9e00811 Mon Sep 17 00:00:00 2001 From: pcpthm Date: Mon, 18 Mar 2019 14:34:08 +0900 Subject: Use Marker argument for item parsers - Fix pub_expr - Fix incorrect parsing of crate::path --- .../tests/data/parser/inline/err/0008_pub_expr.rs | 1 + .../tests/data/parser/inline/err/0008_pub_expr.txt | 25 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.rs create mode 100644 crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.txt (limited to 'crates/ra_syntax/tests/data/parser/inline/err') diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.rs b/crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.rs new file mode 100644 index 000000000..2976f6862 --- /dev/null +++ b/crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.rs @@ -0,0 +1 @@ +fn foo() { pub 92; } diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.txt b/crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.txt new file mode 100644 index 000000000..e65d9c9e1 --- /dev/null +++ b/crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.txt @@ -0,0 +1,25 @@ +SOURCE_FILE@[0; 21) + FN_DEF@[0; 20) + 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; 9) + BLOCK@[9; 20) + L_CURLY@[9; 10) + WHITESPACE@[10; 11) + ERROR@[11; 14) + VISIBILITY@[11; 14) + PUB_KW@[11; 14) + err: `expected an item` + WHITESPACE@[14; 15) + EXPR_STMT@[15; 18) + LITERAL@[15; 17) + INT_NUMBER@[15; 17) "92" + SEMI@[17; 18) + WHITESPACE@[18; 19) + R_CURLY@[19; 20) + WHITESPACE@[20; 21) -- cgit v1.2.3