Files
tree-sitter-nix-shell/corpus/annotation.txt
2023-07-04 10:06:12 +00:00

138 lines
2.1 KiB
Plaintext

==================
empty nix-shell
==================
#!/usr/bin/env nix-shell
#!nix-shell
---
(source_file
(first_line)
(next_line
(annotation_line)))
==================
whitespace in nix-shell
==================
#!/usr/bin/env nix-shell
#! nix-shell
---
(source_file
(first_line)
(next_line
(annotation_line)))
==================
minimal nix-shell invocation with interpreter
==================
#!/usr/bin/env nix-shell
#!nix-shell -i bash
---
(source_file
(first_line)
(next_line
(annotation_line
(nix_shell_args
(interpreter
(sh_arg))))))
==================
non-interpreter argument
==================
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p gnused
---
(source_file
(first_line)
(next_line
(annotation_line
(nix_shell_args
(interpreter
(sh_arg))
(sh_arg)
(sh_arg)))))
==================
non-interpreter flags
==================
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p gnused awk
---
(source_file
(first_line)
(next_line
(annotation_line
(nix_shell_args
(interpreter
(sh_arg))
(sh_arg)
(sh_arg)
(sh_arg)))))
==================
quoted arguments
==================
#!/usr/bin/env nix-shell
#!nix-shell -i bash arg\ one 'arg"Two' "'argThree"
---
(source_file
(first_line)
(next_line
(annotation_line
(nix_shell_args
(interpreter
(sh_arg))
(sh_arg)
(sh_arg)
(sh_arg)))))
==================
order-independent
==================
#!/usr/bin/env nix-shell
#!nix-shell -p gnused -i bash
---
(source_file
(first_line)
(next_line
(annotation_line
(nix_shell_args
(sh_arg)
(sh_arg)
(interpreter
(sh_arg))))))
==================
multiple annotation lines
==================
#!/usr/bin/env nix-shell
#!nix-shell -p gnused
#!nix-shell -i bash
---
(source_file
(first_line)
(next_line
(annotation_line
(nix_shell_args
(sh_arg)
(sh_arg))))
(next_line
(annotation_line
(nix_shell_args
(interpreter
(sh_arg))))))