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

Struct method aliasing not supported in grammar #13

Open
NexushasTaken opened this issue Nov 18, 2024 · 1 comment · May be fixed by #14
Open

Struct method aliasing not supported in grammar #13

NexushasTaken opened this issue Nov 18, 2024 · 1 comment · May be fixed by #14

Comments

@NexushasTaken
Copy link

The grammar fails to parse struct method aliasing correctly.

fn void Foo.baz(&self) {}
def foo_baz = Foo.baz;
...
(ERROR ; [1, 0] - [2, 0]
  (ident) ; [1, 4] - [1, 11]
  (type_ident) ; [1, 14] - [1, 17]
  (block_comment_text))) ; [1, 17] - [2, 0]
@tomaskallup
Copy link
Contributor

tomaskallup commented Nov 18, 2024

I've attempted to fix this, it works in test & my Vim, but more testing would be appreciated: https://github.com/tomaskallup/tree-sitter-c3/tree/fix/def-method-alias

For vim, this is simply done by chaning the config:

      install_info = {
        url = 'https://github.com/tomaskallup/tree-sitter-c3',
        files = { 'src/parser.c', 'src/scanner.c' },
        branch = 'fix/def-method-alias',
      },

And running :TSUpdate

@tomaskallup tomaskallup linked a pull request Nov 18, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants