parent
ad69446c0a
commit
437ce2d9be
@ -43,9 +43,11 @@
|
|||||||
exports.parse_dammit = function(inpt, opts) {
|
exports.parse_dammit = function(inpt, opts) {
|
||||||
if (!opts) opts = {};
|
if (!opts) opts = {};
|
||||||
input = String(inpt);
|
input = String(inpt);
|
||||||
|
if (/^#!.*/.test(input)) input = "//" + input.slice(2);
|
||||||
|
|
||||||
options = opts;
|
options = opts;
|
||||||
if (!opts.tabSize) opts.tabSize = 4;
|
if (!opts.tabSize) opts.tabSize = 4;
|
||||||
fetchToken = acorn.tokenize(inpt, opts);
|
fetchToken = acorn.tokenize(input, opts);
|
||||||
sourceFile = options.sourceFile || null;
|
sourceFile = options.sourceFile || null;
|
||||||
context = [];
|
context = [];
|
||||||
nextLineStart = 0;
|
nextLineStart = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user