Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jump char conflicts with continuation #32

Open
matklad opened this issue Oct 16, 2022 · 0 comments
Open

Jump char conflicts with continuation #32

matklad opened this issue Oct 16, 2022 · 0 comments

Comments

@matklad
Copy link

matklad commented Oct 16, 2022

Consider the following screenshot:

image

What I want to do here is to jump to any of eprintln!s. So, I start typing ep. However, after I type e, there's a "jump char" p to jump to ident, so I end up in the wrong place.

It seems to me that, in the situation as above, after typing e, p shouldn't be considered as jump char.

Here's the above snippet as text:

fn go(
    symbols: &Symbols,
    curr: id::Mod,
    path: ast::PathRef<'_>,
) -> Result<ModSymbol, Diagnostic> {
    let curr = match path.qualifier() {
        Some(qual) => go(symbols, curr, qual)?,
        None => ModSymbol::Mod(curr),
    };
    eprintln!("path = {}", path);
    eprintln!("curr = {:?}", curr);
    let ident = match path.ident() {
        Some(it) => it,
        None => return Err(Diagnostic::InvalidSyntax),
    };
    let mod_ = match curr {
        ModSymbol::Fun(_) => return Err(Diagnostic::BadPath { path: path.id() }),
        ModSymbol::Mod(it) => it,
    };
    let name = symbols.source().add_name(ident.text());
    symbols[mod_]
        .scope
        .get(&name)
        .copied()
        .ok_or_else(|| Diagnostic::UnresolvedReceiver { receiver: ident.id() })
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant