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

[C] Sublime doesn't index a function name on its own line preceded with an enumeration return type #4104

Open
eepp opened this issue Dec 2, 2024 · 1 comment

Comments

@eepp
Copy link

eepp commented Dec 2, 2024

Expected behavior

Expecting mix() to be indexed, that is, to have the entity.name.function.c scope.

enum meow {
    X, Y, Z,
};

enum allo
mix()
{
    return Z;
}

Actual behavior

mix() is not indexed.

The mix part has the meta.enum.c scope.

However, it works as expected like this:

enum meow {
    X, Y, Z,
};

enum allo mix()
{
    return Z;
}

Steps to reproduce

  1. In a C file, write:

    enum meow {
        X, Y, Z,
    };
    
    enum allo
    mix()
    {
        return Z;
    }
    
  2. Try to go to the mix symbol.

@deathaxe
Copy link
Collaborator

deathaxe commented Dec 2, 2024

More or less a duplicate of #3938 and a known limitation of current C family syntax definitions, caused by ST not directly supporting pattern matching accross lines.

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

2 participants