Added optional support for hashbang directives.

Fixes #180.
This commit is contained in:
Ingvar Stepanyan
2014-12-17 19:58:38 +02:00
parent 8e84aa02f4
commit e37c07248e
3 changed files with 17 additions and 1 deletions

View File

@@ -28834,3 +28834,14 @@ test('var x = (1 + 2)', {}, {
});
test("function f(f) { 'use strict'; }", {});
// https://github.com/marijnh/acorn/issues/180
test("#!/usr/bin/node\n;", {}, {
allowHashBang: true,
onComment: [{
type: "Line",
value: "/usr/bin/node",
start: 0,
end: 15
}]
});