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

[Feature] Allow // as a comment that stays in compiled file #106

Closed
b1ek opened this issue May 25, 2024 · 4 comments · Fixed by #403
Closed

[Feature] Allow // as a comment that stays in compiled file #106

b1ek opened this issue May 25, 2024 · 4 comments · Fixed by #403
Assignees
Labels
compiler enhancement New feature or request

Comments

@b1ek
Copy link
Member

b1ek commented May 25, 2024

It would be pretty damn useful when debugging the compiler, as well as it makes the output more readable

@b1ek b1ek changed the title Allow # as a comment that stays in compiled file [feature req] Allow # as a comment that stays in compiled file May 25, 2024
@Ph0enixKM Ph0enixKM changed the title [feature req] Allow # as a comment that stays in compiled file ✨ [feature req] Allow # as a comment that stays in compiled file May 25, 2024
@Ph0enixKM
Copy link
Member

@b1ek That's a fantastic idea, although why not make the regular comment // stay in the bash code? I think that we could add a flag --release that will eradicate these comments from the generated bash. Overall I think this would improve DX when writing Amber a lot more!

@b1ek
Copy link
Member Author

b1ek commented May 25, 2024

why not make the regular comment // stay in the bash code?

im not sure that all users would want that to happen. Also thats somewhat of a breaking change as compared to creating a new syntax rule.

@b1ek
Copy link
Member Author

b1ek commented Jun 5, 2024

i just looked over the docs and found out that # is used for processor directives, so it can't be used as a comment symbol.

we could've easily just left the // comments in the bash file. it can be minified by using an external tool later, anyway

@Ph0enixKM
Copy link
Member

Also thats somewhat of a breaking change as compared to creating a new syntax rule.

I think we're early enough to introduce such changes. It's better now than later.

@Ph0enixKM Ph0enixKM changed the title ✨ [feature req] Allow # as a comment that stays in compiled file ✨ Allow # as a comment that stays in compiled file Jun 16, 2024
@Ph0enixKM Ph0enixKM changed the title ✨ Allow # as a comment that stays in compiled file ✨ Allow // as a comment that stays in compiled file Jun 17, 2024
@Ph0enixKM Ph0enixKM added this to the Amber 0.4.0-alpha milestone Jun 17, 2024
@Mte90 Mte90 added the enhancement New feature or request label Jun 24, 2024
@Ph0enixKM Ph0enixKM changed the title ✨ Allow // as a comment that stays in compiled file [Feature] Allow // as a comment that stays in compiled file Jul 7, 2024
@b1ek b1ek self-assigned this Jul 9, 2024
@Mte90 Mte90 added the compiler label Jul 19, 2024
@Ph0enixKM Ph0enixKM self-assigned this Aug 12, 2024
@Ph0enixKM Ph0enixKM linked a pull request Aug 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants