diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-03-18 09:32:28 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-03-18 09:32:28 +0000 |
commit | 1cd18f9237b6ac48ca8461307f2a4eaf273ee394 (patch) | |
tree | 7971e3753c74b98e0e5b4120adb8706a86d99e3e /crates/ra_parser/src/grammar/expressions.rs | |
parent | 7c117567ab55046a9303fc7a6676a50008ad4f33 (diff) | |
parent | 76075c74103b3204ebc1bde54a330629d9e00811 (diff) |
Merge #991
991: Use Marker argument for item parsers r=matklad a=pcpthm
Before doing this for expressions, I found that the pattern (Marker argument) should be applied to the item parsers because visiblity and modifiers are parsed in a separate function.
Fixed some parser bugs:
- Fix pub_expr: `pub 42;` was allowed.
- Fix incorrect parsing of crate::path: incorrectly parsed as `crate` as a visibility.
Co-authored-by: pcpthm <[email protected]>
Diffstat (limited to 'crates/ra_parser/src/grammar/expressions.rs')
-rw-r--r-- | crates/ra_parser/src/grammar/expressions.rs | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs index ccbc905ab..83812e938 100644 --- a/crates/ra_parser/src/grammar/expressions.rs +++ b/crates/ra_parser/src/grammar/expressions.rs | |||
@@ -67,8 +67,6 @@ pub(crate) fn expr_block_contents(p: &mut Parser) { | |||
67 | Err(m) => m, | 67 | Err(m) => m, |
68 | }; | 68 | }; |
69 | 69 | ||
70 | // test pub_expr | ||
71 | // fn foo() { pub 92; } //FIXME | ||
72 | if has_attrs { | 70 | if has_attrs { |
73 | m.abandon(p); | 71 | m.abandon(p); |
74 | p.error("expected a let statement or an item after attributes in block"); | 72 | p.error("expected a let statement or an item after attributes in block"); |