-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Script Editor: Highlighting custom classes stops working when statement is continued to the next line #88808
Comments
Please add descriptions of the issue along with videos of you add a video, it makes things much easier to evaluate It looks like the issue is that highlighting doesn't work for method arguments if there are trailing spaces after the opening parentheses, but it's hard to tell from just the video |
Ok, sorry. |
Does it work with two tabs of indentation? |
This is a known bug (though not explicitly reported before). It is due to the way the highlighter works: the context is lost for each new line (except for code regions like string literals). We could try to work around this by adding a way to detect line continuations. But I think that in any case we will need a major refactoring of the highlighter (for example, to fix the highlighting of inner classes). I think we will need a simplified GDScript parser that is more performant and more tolerant to syntax errors than the full GDScript parser. |
Are we sure this is not a duplicate of #88552 ? |
I mean, there are several issues about different manifestations of the problem (for example, the |
I modified the title of the issue in an attempt to be more explicit. Next time please, try coming up with a more specific title and description of the issue. With an extremely generic title, it becomes very hard to trace back and actually address the issue in the future. |
Tested versions
v4.3.dev3.official [36e943b]
System information
w10 64
Issue description
Highlighting an custom object type does not work when what can be seen in the video occurs.
It doesn't matter if there are spaces after the function parentheses.
If you switch to a new line immediately after the function parenthesis, custom object types are not highlighted.
2024-02-25.11-47-45.mp4
Steps to reproduce
See the video
Minimal reproduction project (MRP)
...
The text was updated successfully, but these errors were encountered: