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

comments in generated code #29

Open
ksjogo opened this issue Nov 21, 2021 · 2 comments · May be fixed by #64
Open

comments in generated code #29

ksjogo opened this issue Nov 21, 2021 · 2 comments · May be fixed by #64

Comments

@ksjogo
Copy link
Contributor

ksjogo commented Nov 21, 2021

Should we add some toggle to preserve comments in the generated code?

@johnfn
Copy link
Owner

johnfn commented Nov 21, 2021

Ooh, yeah, good idea. Would make troubleshooting generated code a lot easier for sure.

An interesting question: how would we get something like print(/* hello */ "hi") to work, since Godot doesn't have multiline/in-line comments? I guess we could gather all inline comments up and emit them before the line.

@adamuso
Copy link
Contributor

adamuso commented Dec 16, 2021

I think if gdscript does not support multiline comments we should just strip them. Adding behavior that will concat those comments and then generate a single line comment will be confusing for people. Also the logic would not be simple and I do not think that this feature would be used very frequently.

Additionally when we strip multiline comments then we have an ability to create comments that only exists in TypeScript code and can be used to create comments that make sense in TS but not in gdscript.

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 a pull request may close this issue.

3 participants