This simplifies comment handling by adding to extras.
So, cases like these are also handled
FROM \
# some image
image
COPY . \
# to app
./app/
There is one test that doesn't pass after the change, but it is only a case where
the comment node is nested inside the shell command rather than preceding it.
There seem to be some issues with the grammar, though, for example,
RUN # comment
# comment
echo foo
is parsed OK despite first comment not ending with a line continuation,
so perhaps the line-continuation / comment precedences need to be changed?
This simplifies comment handling by adding to
extras
. So, cases like these are also handledThere is one test that doesn't pass after the change, but it is only a case where the comment node is nested inside the shell command rather than preceding it.
There seem to be some issues with the grammar, though, for example,
is parsed OK despite first comment not ending with a line continuation, so perhaps the line-continuation / comment precedences need to be changed?