mix init options in the Module-global
This commit is contained in:
parent
0926fad1e2
commit
12d727fd49
4 changed files with 48 additions and 29 deletions
|
|
@ -1,2 +1,23 @@
|
|||
return Parser;
|
||||
}));
|
||||
for (const name of Object.getOwnPropertyNames(ParserImpl.prototype)) {
|
||||
Object.defineProperty(Parser.prototype, name, {
|
||||
value: ParserImpl.prototype[name],
|
||||
enumerable: false,
|
||||
writable: false,
|
||||
})
|
||||
}
|
||||
|
||||
Parser.Language = Language;
|
||||
Module.onRuntimeInitialized = () => {
|
||||
ParserImpl.init();
|
||||
resolveInitPromise();
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return Parser;
|
||||
}();
|
||||
|
||||
if (typeof exports === 'object') {
|
||||
module.exports = TreeSitter;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue