Sorry, mentioning support in syntax highlighters might have been misleading. I am talking specifically about executable JavaScript scripts and modules. It's a common pattern in node to have programs written in JavaScript, with a shebang and the x flag set.
I just mentioned editor / syntax highlighter support to say "this is already de-facto part of real life JavaScript as it's understood by tools, it's just missing from the spec". On Fri, May 19, 2017 at 1:44 AM Alexander Jones <a...@weej.com> wrote: > It doesn't make any sense. The shebang is a UNIX way of declaring the > interpreter for an executable script, not for hinting your syntax > highlighter. If your file is not executable (as in, it can't be run with > `./filename`, it shouldn't have a shebang). > > On 19 May 2017 at 02:44, Jan Krems <jan.kr...@gmail.com> wrote: > >> Tried to search past proposals for this but couldn't find one The short >> version: Most editors / syntax highlighting engines, non-engine parsers, >> node.js - they all support a leading shebang line in .js files. With the >> advent of ES6 modules it's the final holdout where node has to patch the >> script source to make V8 parse the code (and thus producing a mismatch >> between what's on disk and what the engine sees). >> >> Is there a downside to allow any script or module to begin with the >> magical #! bytes? It should not break existing scripts because it's invalid >> syntax today & the parse overhead should be fairly limited. >> >> _______________________________________________ >> es-discuss mailing list >> es-discuss@mozilla.org >> https://mail.mozilla.org/listinfo/es-discuss >> >> >
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss