Amber icon indicating copy to clipboard operation
Amber copied to clipboard

✨ [feature req] Allow # as a comment that stays in compiled file

Open b1ek opened this issue 1 year ago • 2 comments

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

b1ek avatar May 25 '24 05:05 b1ek

@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!

Ph0enixKM avatar May 25 '24 18:05 Ph0enixKM

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 avatar May 25 '24 22:05 b1ek

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

b1ek avatar Jun 05 '24 13:06 b1ek

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 avatar Jun 05 '24 13:06 Ph0enixKM