project bootstrap

This commit is contained in:
2023-11-25 18:12:47 -05:00
parent 5cd875ae80
commit 6ef22d88f9
39139 changed files with 4944609 additions and 2 deletions
+18
View File
@@ -0,0 +1,18 @@
const convertTokens = require("./convertTokens.cjs");
const convertComments = require("./convertComments.cjs");
const convertAST = require("./convertAST.cjs");
exports.ast = function convert(ast, code, tokLabels, visitorKeys) {
ast.tokens = convertTokens(ast.tokens, code, tokLabels);
convertComments(ast.comments);
convertAST(ast, visitorKeys);
return ast;
};
exports.error = function convertError(err) {
if (err instanceof SyntaxError) {
err.lineNumber = err.loc.line;
err.column = err.loc.column;
}
return err;
};
//# sourceMappingURL=index.cjs.map