mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
WIP: switch to fully decomposed tokens internally
This commit is contained in:
parent
e2ebb467bd
commit
40170885e7
12 changed files with 422 additions and 279 deletions
|
@ -210,7 +210,7 @@ fn opt_visibility(p: &mut Parser) -> bool {
|
|||
//
|
||||
// test crate_keyword_path
|
||||
// fn foo() { crate::foo(); }
|
||||
T![crate] if p.nth(1) != T![::] => {
|
||||
T![crate] if !p.nth_at(1, T![::]) => {
|
||||
let m = p.start();
|
||||
p.bump_any();
|
||||
m.complete(p, VISIBILITY);
|
||||
|
@ -245,7 +245,7 @@ fn abi(p: &mut Parser) {
|
|||
fn opt_fn_ret_type(p: &mut Parser) -> bool {
|
||||
if p.at(T![->]) {
|
||||
let m = p.start();
|
||||
p.bump_any();
|
||||
p.bump(T![->]);
|
||||
types::type_(p);
|
||||
m.complete(p, RET_TYPE);
|
||||
true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue