Add support for extra Unix shebangs#1163
Merged
Gabriella439 merged 4 commits intodhall-lang:masterfrom May 19, 2021
Merged
Conversation
Collaborator
Author
Nadrieril
approved these changes
May 1, 2021
Gabriella439
reviewed
May 1, 2021
standard/Parser.hs
Outdated
|
|
||
| shebang :: Parser () | ||
| shebang = do "#!"; many notEndOfLine; endOfLine; return () | ||
| shebang = do |
Contributor
There was a problem hiding this comment.
Instead of changing the implementation of shebang, I'd suggest changing the implementation of completeExpression from optional shebang to many shebang. The reason I suggest this is because it would more closely correspond to the ABNF grammar
Collaborator
Author
There was a problem hiding this comment.
That also looks much simpler
Gabriella439
reviewed
May 1, 2021
| @@ -1,2 +1,3 @@ | |||
| #!/usr/bin/env -S dhall text --file | |||
| #! extra bang | |||
Contributor
There was a problem hiding this comment.
Also, rather than change this test, I'd suggest adding a new test for the nix-shell example that motivated this change
Collaborator
Author
There was a problem hiding this comment.
Done, thanks for the review!
This change enables using nix-shell multiline shebangs in dhall files.
This change fixes the scripts path in the CONTRIBUTING.md file.
647ced0 to
55f60b1
Compare
Gabriella439
approved these changes
May 2, 2021
Co-authored-by: Basile Henry <bjm.henry@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change enables using nix-shell multiline shebangs in dhall files.