Closed wilmoore closed 8 years ago
I also get command
when assigning the variable to nothing:
DOMAIN=
This isn't exactly intentional, the issue is that comments aren't parsed at all right now.
@dthree this is one of the areas where peg parsing is somewhat awkward. Parsing comments cleanly would require sticking the comment
rule in the grammar everywhere a comment might appear (which is a lot of places). You could instead preprocess the input to remove all input after a #
on each line, but then your preprocessor has to be aware of quotes & heredocs.
@dthree this is one of the areas where peg parsing is somewhat awkward. Parsing comments cleanly would require sticking the comment rule in the grammar everywhere a comment might appear (which is a lot of places).
Not a lot of places, just before newlines... ;-)
@grncdr gotcha
I wasn't sure if this was intentional; however, I did notice some inconsistency when I have a variable assignment that includes an in-line comment:
actual
expected
On the other hand, I get exactly what I'm expecting if I remove the comment:
Not a huge deal as I can sort of work around this; however, I thought I'd mention it in case I was missing something.