I'm not sure if it's a bug, but following code is valid in nodejs, however it causes exception when it's parsed by narcissus. ``` javascript #!/usr/local/bin/node console.log(1) ``` I'm leaving here the fix in case someone want to edit a file with `#!` construction: Edit /usr/local/narcissus/lib/jslex.js:210: ``` javascript if (this.lineno == 1 && ch === '#' && next === '!') { for (;;) { ch = input[this.cursor++]; next = input[this.cursor]; if (ch === '\r') { if (next !== '\n') ch = '\n'; } if (ch === '\n') { if (this.scanNewLines) { this.cursor--; } else { this.lineno++; break; } } } } else ``` I'm sorry that I'm doing it here, just because https://github.com/mozilla/narcissus has no bug-tracker, and I think the fix might help someone.
I'm not sure if it's a bug, but following code is valid in nodejs, however it causes exception when it's parsed by narcissus.
I'm leaving here the fix in case someone want to edit a file with
#!construction:Edit /usr/local/narcissus/lib/jslex.js:210:
I'm sorry that I'm doing it here, just because https://github.com/mozilla/narcissus has no bug-tracker, and I think the fix might help someone.