tree-sitter-dockerfile/test/corpus/cmd.txt
tvrinssen 1bf9daef46
Support heredocs (#45)
This adds support for heredocs in Dockerfiles. This required adding an external scanner to store the required state.

Co-authored-by: Camden Cheek <camden@ccheek.com>
2024-04-19 14:08:28 -06:00

60 lines
731 B
Plaintext

==================
Shell command
==================
CMD echo "test"
---
(source_file
(cmd_instruction
(shell_command
(shell_fragment))))
==================
Shell command multiline
==================
CMD echo "test" \
"foo" \
bar
---
(source_file
(cmd_instruction
(shell_command
(shell_fragment)
(line_continuation)
(shell_fragment)
(line_continuation)
(shell_fragment))))
==================
Run with shell empty array
==================
cmd []
---
(source_file
(cmd_instruction
(json_string_array)))
==================
Run with shell array
==================
cmd ["echo", "test"]
---
(source_file
(cmd_instruction
(json_string_array
(json_string)
(json_string))))