index.cjs.map 1.5 KB
{"version":3,"names":["convertTokens","require","convertComments","convertAST","exports","ast","convert","code","tokLabels","visitorKeys","tokens","comments","error","convertError","err","SyntaxError","lineNumber","loc","line","column"],"sources":["../../src/convert/index.cjs"],"sourcesContent":["const convertTokens = require(\"./convertTokens.cjs\");\nconst convertComments = require(\"./convertComments.cjs\");\nconst convertAST = require(\"./convertAST.cjs\");\n\nexports.ast = function convert(ast, code, tokLabels, visitorKeys) {\n  ast.tokens = convertTokens(ast.tokens, code, tokLabels);\n  convertComments(ast.comments);\n  convertAST(ast, visitorKeys);\n  return ast;\n};\n\nexports.error = function convertError(err) {\n  if (err instanceof SyntaxError) {\n    err.lineNumber = err.loc.line;\n    err.column = err.loc.column;\n  }\n  return err;\n};\n"],"mappings":"AAAA,MAAMA,aAAa,GAAGC,OAAO,CAAC,qBAAD,CAA7B;;AACA,MAAMC,eAAe,GAAGD,OAAO,CAAC,uBAAD,CAA/B;;AACA,MAAME,UAAU,GAAGF,OAAO,CAAC,kBAAD,CAA1B;;AAEAG,OAAO,CAACC,GAAR,GAAc,SAASC,OAAT,CAAiBD,GAAjB,EAAsBE,IAAtB,EAA4BC,SAA5B,EAAuCC,WAAvC,EAAoD;EAChEJ,GAAG,CAACK,MAAJ,GAAaV,aAAa,CAACK,GAAG,CAACK,MAAL,EAAaH,IAAb,EAAmBC,SAAnB,CAA1B;EACAN,eAAe,CAACG,GAAG,CAACM,QAAL,CAAf;EACAR,UAAU,CAACE,GAAD,EAAMI,WAAN,CAAV;EACA,OAAOJ,GAAP;AACD,CALD;;AAOAD,OAAO,CAACQ,KAAR,GAAgB,SAASC,YAAT,CAAsBC,GAAtB,EAA2B;EACzC,IAAIA,GAAG,YAAYC,WAAnB,EAAgC;IAC9BD,GAAG,CAACE,UAAJ,GAAiBF,GAAG,CAACG,GAAJ,CAAQC,IAAzB;IACAJ,GAAG,CAACK,MAAJ,GAAaL,GAAG,CAACG,GAAJ,CAAQE,MAArB;EACD;;EACD,OAAOL,GAAP;AACD,CAND"}