-
Notifications
You must be signed in to change notification settings - Fork 8
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
Code Editor 2: Comment colours are incorrect when multiple types are defined on JSDoc param lines #8704
Comments
Also, it seems the @func doesn't get coloured like the other JSDoc directives. |
Function directive has been deprecated for CE2 as it's created by the function name and parameters automatically. |
verified as of IDE v2024.1300.0.714 Runtime v2024.1300.0.727 |
A question about this. Since the @func directive is deprecated in CE2, how would one define a JSDoc header for a function/method that has a variable number of parameters? With @func, it would be sometihng like this:
How would we accomplish this without the @func directive in CE2 so that it is obvious in the Feather popup? |
You can use an Array as an argument type or use 'Any' as a type, check if the argument is an array, and cycle through it.
|
This requires changing the function signature, which I don't want to do. Let me ask a different question with the same goal in mind. How will the JSDocs for the GM runtime function |
I totally understand this. But from what I tried you can't properly replicate the behavior of built-in functions even now. Feather tooltip already ignores @func, it's just added as a description (that's why I have stopped using it). But the bottom bar (which is removed in CE2 and we want it back #7688) does show variable argument count when @func is omitted. Anyway, it's still ignored by the first line in the tooltip. You could make a new Issue about it. |
Description
When defining parameters for functions, using the comma or vertical bar breaks the color coding and it goes back to the default color only after the comma/vertical bar.
Picture because I'm bad with words.
I also included a package with this script.
Steps To Reproduce
Which version of GameMaker are you reporting this issue for?
IDE v2024.1100.0.713 Runtime v2024.1100.0.726
Which operating system(s) are you seeing the problem on?
Windows 10.0.26100.0
cc5261ac-625c-4abc-be1c-2018aa1e1e0d
The text was updated successfully, but these errors were encountered: