Early Errors

November 10, 2017 ยท View on GitHub

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.

Early Errors

None

Evaluation

None

Grammar

Module := HashBang (opt) ...
Script := HashBang (opt) ...
HashBang := "#!" SingleLineCommentChars (opt)

DirectivePrologue Change

DirectivePrologue text should be changed to explicitly allow HashBang to occur in front of it.

Stage 1?