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

I've been working on another parser for groovy #5

Open
murtaza64 opened this issue Nov 10, 2023 · 22 comments
Open

I've been working on another parser for groovy #5

murtaza64 opened this issue Nov 10, 2023 · 22 comments

Comments

@murtaza64
Copy link

Hi, I just noticed that this parser already existed after spending like two weeks working on my own version from scratch. Would you like to check it out at https://github.com/murtaza64/tree-sitter-jenkins?

(It's called Jenkins but there's very few jenkins-specific features, so it can be adapted to be a general groovy parser)

I haven't tested your implementation but mine seems to, at face value, be more feature complete as of now.

Would you be interested in merging our projects so that the upstream parser in nvim-treesitter is more feature complete?

@Decodetalkers
Copy link
Owner

You can make pr now. I write this parse just for android development .And I also handle decorate, generics_class and etc, it works good, if just come from gradle and general groovy script, it has no error when parse these, I am satisfied with it. But I do not know groovy very much. so I just make it performs well on android gradle script. so , yes , if you think this is not good enough, make pr now, and I also willing to make you the maintainer if you willing to

@Decodetalkers
Copy link
Owner

Can you let me take a look at the highlight of yours? I will take a try this weekend.. and of course, you can make a pr, because here , there are some important ci. have you try that in gradle script?

@Decodetalkers
Copy link
Owner

Well, yours are good enough, please make pr now, and I will push scheme update to nvim-treesitter

@Decodetalkers
Copy link
Owner

And
image

can this be highlighted?

@Decodetalkers
Copy link
Owner

and also Generics

@Decodetalkers
Copy link
Owner

My parse have already handle most error, and decorate and generic.. can you help add support for them?

@Decodetalkers
Copy link
Owner

Emm, there is too many error.. but it is still good. though to many error

@murtaza64
Copy link
Author

murtaza64 commented Nov 10, 2023

Yes, I will work on generics, decorators and stuff before making any PRs. Just wanted to gauge your interest in merging projects. When it's ready, would you prefer to push my version to upstream?

can this be highlighted?

You mean dependencies? Sure. But I am not sure if the current way of highlighting jenkins-specific symbols is great because they will still be highlighted even when not using jenkins, and the same problem will happen for gradle. Any ideas here?

Thanks for sharing examples of files where it doesn't work well.

Also, feel free to contribute to the project. Or I might take a look at your error/decorator/generics parsing and bring it into mine.

@murtaza64
Copy link
Author

Today I'll look at your code and see how we can merge the parts you've implemented with the parts I have.

@fussybeaver
Copy link

I'm quite excited to see this and hope you merge your work streams...

@murtaza64
Copy link
Author

murtaza64 commented Nov 10, 2023

I've implemented annotations and generics, please take another look! (no highlighting yet) (Haven't got around to import and package yet)

@Decodetalkers
Copy link
Owner

Cool grammar, can you make pr now? Just replace the gammer, test, and c code under src

@Decodetalkers
Copy link
Owner

And after this pr, you should also add your name to package.json..and you should make a pr to nvim-treesitter

@Decodetalkers
Copy link
Owner

And do you write any groovy script? I think we need someone who are using this script to maintain it.. before I keep this gammer simple enough to make it works under most case

@Decodetalkers
Copy link
Owner

Decodetalkers commented Nov 11, 2023

You also need to test it yourself. Replace the name in package.json and gammer.js to groovy, and test it. You also need find some groovy examples

@Decodetalkers
Copy link
Owner

Emm, have you test grammer like

foreach { map -> 
  print(map)
}

@Decodetalkers
Copy link
Owner

Ping..

@murtaza64
Copy link
Author

Sorry, I've been busy with work

  • Yes, I work with groovy daily (in Jenkins)
  • I have to implement closures still
  • I think it's better to switch the upstream config to use my repo instead of completely overwriting this repo, thoughts?
  • I will add more full-script tests and stuff once this is production ready. I've been using it on my machine for a few days and most things work, but I still keep finding bugs here and there so I'm not ready to merge it. If you would like to help with development, feel free to make PRs in my repo

@murtaza64
Copy link
Author

Sorry it's still been very busy at work. I will try to finish this up over the holidays!

@murtaza64
Copy link
Author

@Decodetalkers I think my parser is mature enough to replace this one now. Would you be OK with switching the upstream parser to mine instead of yours?

@Decodetalkers
Copy link
Owner

Ok, please

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

3 participants