handle embedded script payload

This commit is contained in:
2023-07-04 08:57:44 +00:00
parent 4db0ba409a
commit 28d79d458c
3 changed files with 41 additions and 6 deletions

25
corpus/payload.txt Normal file
View File

@@ -0,0 +1,25 @@
==================
nix-shell with a bash payload
==================
#!/usr/bin/env nix-shell
#!nix-shell -i bash
echo "hello, world!"
---
(source_file
(first_line
(shebang_open)
(opt_ws)
(env)
(ws)
(nix_shell))
(next_line
(newline)
(annotation_line
(shebang_open)
(opt_ws)
(nix_shell)
(nix_shell_args)))
(next_line
(newline)))

View File

@@ -13,7 +13,7 @@ Minimal nix-shell invocation
(env)
(ws)
(nix_shell))
(non_first_line
(next_line
(newline)
(annotation_line
(shebang_open)