tree-sitter-dockerfile icon indicating copy to clipboard operation
tree-sitter-dockerfile copied to clipboard

Heredoc support?

Open neezer opened this issue 3 years ago • 3 comments

Hi! Awesome work with this!

I know it's relatively hot-off-the-press, but could we get Docker Heredoc support?

neezer avatar Aug 17 '21 06:08 neezer

Thanks for pointing that out! I saw heredocs were released, but forgot to ever follow up on it with the grammar.

I'll need to do a bit more looking into this. Basically, I think heredocs will break some assumptions the grammar currently has about command endings and what we can delegate to the nested shell grammar. If we can't delegate heredocs to the shell grammar, this will almost certainly require making an external scanner in C. I'm not particularly familiar with C, so this might be a longer-than-seemingly-necessary process, but I'll see what I can do 😄

camdencheek avatar Aug 17 '21 13:08 camdencheek

Hi, was there any progress on this?

If it's simpler, support for "COPY <<eot" with embedded files would be useful enough. No need for fancy grammars inside the doc

thanks

mmetc avatar Jan 20 '23 09:01 mmetc

I'm also interested in know what happened to this!

I've written quite a bit of C code in my time, so could help out if you point me in the right direction. I've never done much with tree-sitter so don't know where to get started.

smason avatar Jul 25 '23 12:07 smason

Thanks to @tvrinssen, this long-standing gap has finally been fixed in #45!

camdencheek avatar Apr 19 '24 20:04 camdencheek

Awesome! Thank you @tvrinssen & @camdencheek

danihodovic avatar Apr 19 '24 21:04 danihodovic