You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Unix and Unix-like systems (such as macOS and Linux), beginning a script with #! followed by a path to an interpreter and arguments tells the system to use that interpreter to run the script - that's why, as an example, many python programs start with the line #!/usr/bin/env python.
The simplest way to implement this is to allow comments to start with # in addition to //.
I was able to get this working with only minor additions to src/lexer.rs - pull request will follow shortly.
The text was updated successfully, but these errors were encountered:
It's a language change, so it would be nice to document on the esolangs page, possibly as an optional feature
Some command-line flag (like -x) that skips the first line of the source file
Mutually exclusive with -c
Not a language change, but this is the de facto implementation anyways so that doesn't actually matter that much.
Either is acceptable for me, but I don't use shebangs often enough to have a perspective on what's preferable so I'd like some opinions.
Now I admit I haven't looked at this codebase for a long time. Since this was my first real Rust project, I also apologize for you having to skim through it 😆
I think that a command-line option would be a good idea, and some languages do it. That said, I don't know how you'd implement it in this codebase, but I might give it a try.
On Unix and Unix-like systems (such as macOS and Linux), beginning a script with
#!
followed by a path to an interpreter and arguments tells the system to use that interpreter to run the script - that's why, as an example, many python programs start with the line#!/usr/bin/env python
.The simplest way to implement this is to allow comments to start with
#
in addition to//
.I was able to get this working with only minor additions to
src/lexer.rs
- pull request will follow shortly.The text was updated successfully, but these errors were encountered: