Various command line applications use an Interpreter Directive to define how they should be run.
#! js -m foo
#! node foo
#! eshost foo
I propose we add this as a top level syntax to ECMA262 as a comment that can occur before a DirectivePrologue.
None
None
Module := HashBang (opt) ...
Script := HashBang (opt) ...
HashBang := "#!" SingleLineCommentChars (opt)
DirectivePrologue text should be changed to explicitly allow HashBang to occur in front of it.
@bmeck Directive prologues are unrelated to this proposal. You should remove the mention. Remember, directive prologues may be present in function bodies, a location where we definitely don't want to allow shebangs.