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

Fixed declaration file errors #135

Merged
merged 2 commits into from
Aug 15, 2022
Merged

Fixed declaration file errors #135

merged 2 commits into from
Aug 15, 2022

Conversation

poohcom1
Copy link
Contributor

Currently, the godot.d.ts declaration file generated by the editor have syntax errors. These are:

  1. The term push_*/pop in the documentation terminating multi-line comments due to the */ token. This is fixed by replacing all */ with * /.

  2. KeyModifierMask.KEY_MASK_CMD not having a value due to the doc having "platform-dependent" as a value instead of an integer. This is fixed by adding a manual check for this specific enum to replace the value with the correct one.

I'm happy to discuss alternative solutions or any other comments you might have. I also think having unit tests to detect these errors might be helpful, as future changes to the documentations could result in new errors.

 - Added checks for multiline comment endings
 - Added exception for KEY_MASK_CMD due to missing value
@poohcom1 poohcom1 mentioned this pull request Aug 15, 2022
31 tasks
@Geequlim
Copy link
Collaborator

Thanks for your contribution.
It would be better if you use enum values ​​or constants instead of hardcoding value.

@poohcom1
Copy link
Contributor Author

Thanks for the comment!
Somehow it didn't occur to me to just use the actual enum values; I've fixed it with the latest commit.

Please tell me if there are any other things you need me to change.

@Geequlim
Copy link
Collaborator

Thanks

@Geequlim Geequlim merged commit 7bc2a92 into godotjs:master Aug 15, 2022
@poohcom1 poohcom1 deleted the fix-declaration-file branch August 18, 2022 12:11
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 this pull request may close these issues.

2 participants