-
Notifications
You must be signed in to change notification settings - Fork 39
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
Incorrect highlighting of keyword arguments without parentheses #26
Comments
This syntax is not something available in C, C++, Java or Awk, so all the standard "parsing" the Groovy mode is based on will misinterpret this construct. Fixing this will almost certainly necessitate reworking function call especially for Groovy. |
@russel how attached are you to basing groovy-mode on c-mode? Would you accept a PR that changed it to be a standalone mode? |
@Wilfred I am not at all attached to CC Mode, at least per se. Back in the early days there were two modes, one an adaption of Ruby Mode and this one. This one got more attention and so become the de facto standard. This Groovy Mode is based on CC Mode because of the Java and Awk stuff. You got a lot of functionality etc. for very little work. However, there are problems, some likely insoluble because of the CC Mode base. Removing the CC Mode will require a lot of work to replace all the stuff that it provides. However doing that will likely allow for solutions to the currently insoluble. I would suggest the best way forward would be to create a parallel mode either here or in a separate repository and see how it goes. If the mode not based on CC Mode begins to look like the way forward, we can then look to swap it in for what we have now. Does this seem reasonable? |
Yep, that sounds reasonable. Thanks for the feedback. I'll put something together and we'll see how it goes :) |
* Ensures we highlight all keywords correctly. Fixes Groovy-Emacs-Modes#33 and Groovy-Emacs-Modes#26. We also highlight `println` and `print` for consistency with other modes, such as python-mode. * Highlight triple-quoted strings correctly. Fixes Groovy-Emacs-Modes#29. * Ensure we consistently highlight variable declarations (fixes Groovy-Emacs-Modes#27) and variable assignments. * Highlights `it` as a variable unconditionally.
* Ensures we highlight all keywords correctly. Fixes Groovy-Emacs-Modes#33 and Groovy-Emacs-Modes#26. We also highlight `println` and `print` for consistency with other modes, such as python-mode. * Highlight triple-quoted strings correctly. Fixes Groovy-Emacs-Modes#29. * Ensure we consistently highlight variable declarations (fixes Groovy-Emacs-Modes#27) and variable assignments. * Highlights `it` as a variable unconditionally.
We have changed the Groovy mode from being a CC-Mode derived one to being a standalone one. We are therefore closing all issues relating to the old mode. If you try the new mode and see any problems please post a new issue. |
If I call a function with keyword arguments, but without parentheses (common in Jenkinsfile scripts):
The
x
is incorrectly highlighted withfont-lock-type-face
.It's not clear to me which part of the syntax is doing this -- any pointers?
The text was updated successfully, but these errors were encountered: