diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-04-28 17:51:02 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-04-28 17:51:02 +0100 |
commit | 6618d1edc3edaad9ebdc216e6d7423ac9ac6a265 (patch) | |
tree | 6134e50e3b501e810c6da140257d7ccdca90602a /crates/ra_parser/src/grammar | |
parent | 8138b1da4f1564913a1a22407c65e77aa5320d56 (diff) | |
parent | d436ab05810c208b41a1b61896d3d87691cd9e99 (diff) |
Merge #1213
1213: Make lexer produce only single character puncts r=matklad a=edwin0cheng
As discussed in Zulip, this PR change `lexer` to produce only single char punct.
* Remove producing `DOTDOTDOT, DOTDOTEQ, DOTDOT, COLONCOLON, EQEQ, FAT_ARROW, NEQ, THIN_ARROW` in lexer.
* Add required code in parser to make sure everythings works fine.
* Change some tests (Mainly because the `ast::token_tree` is different)
Note: i think the use of `COLON` in rust is too overloaded :)
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/ra_parser/src/grammar')
-rw-r--r-- | crates/ra_parser/src/grammar/items.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_parser/src/grammar/items.rs b/crates/ra_parser/src/grammar/items.rs index 318fd69a1..97f8122a9 100644 --- a/crates/ra_parser/src/grammar/items.rs +++ b/crates/ra_parser/src/grammar/items.rs | |||
@@ -383,7 +383,7 @@ pub(crate) fn token_tree(p: &mut Parser) { | |||
383 | return; | 383 | return; |
384 | } | 384 | } |
385 | R_PAREN | R_BRACK => p.err_and_bump("unmatched brace"), | 385 | R_PAREN | R_BRACK => p.err_and_bump("unmatched brace"), |
386 | _ => p.bump(), | 386 | _ => p.bump_raw(), |
387 | } | 387 | } |
388 | } | 388 | } |
389 | p.expect(closing_paren_kind); | 389 | p.expect(closing_paren_kind); |