@guihz/trading-vue-editor-tes 0.0.98 → 0.0.99
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/assets/{parserTccWorker-C_GCg1II.js → parserTccWorker-ChPWymni.js} +1 -1
- package/lib/assets/{scriptsRunWorker-CgIm6yWg.js → scriptsRunWorker-C4tBpFa1.js} +27 -27
- package/lib/components/editor/parseScript/buildInFuncNamespace/box.d.ts +3 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/label.d.ts +3 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/line.d.ts +3 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/linefill.d.ts +3 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/polyline.d.ts +3 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/table.d.ts +3 -0
- package/lib/trading-vue-editor.js +2 -2
- package/lib/trading-vue-editor.umd.cjs +1 -1
- package/package.json +1 -1
@@ -214,6 +214,6 @@ Input files:
|
|
214
214
|
//# sourceMappingURL=data:application/json;charset=utf-8;base64,`+gv(x)}else e.sourceMap.url&&(E.code+=`
|
215
215
|
//# sourceMappingURL=`+e.sourceMap.url)}return e.nameCache&&e.mangle&&(e.mangle.cache&&(e.nameCache.vars=a_(e.mangle.cache)),e.mangle.properties&&e.mangle.properties.cache&&(e.nameCache.props=a_(e.mangle.properties.cache))),b&&b.source_map&&b.source_map.destroy(),r&&(r.end=Date.now(),E.timings={parse:.001*(r.rename-r.parse),rename:.001*(r.compress-r.rename),compress:.001*(r.scope-r.compress),scope:.001*(r.mangle-r.scope),mangle:.001*(r.properties-r.mangle),properties:.001*(r.format-r.properties),format:.001*(r.end-r.format),total:.001*(r.end-r.start)}),E}async function s_(t,e,n){const r=Ev(t,e,n);let a,c;do c=r.next(await a),a=c.value;while(!c.done);return c.value}function u_(t){const e=new Nm(t),n=new kl(e);n.removeErrorListeners();const r=new wm(n),a=new j(r);a._interp.predictionMode=Um.SLL,a.removeErrorListeners();const c=new Tv;n.addErrorListener(c),a.addErrorListener(c),a.buildParseTrees=!0;const h=a.program(),d=r.tokens.filter(E=>E.channel===2);return{errors:c.errors,ast:h,comments:d}}async function xv(t,e,n,r){const{errors:a,ast:c,comments:h}=u_(t+`
|
216
216
|
|
217
|
-
`),d=new Ap(r,h,n),E=await d.visit(c);let b=a.splice(0,1);b.length||(b=d.errors);let T="";const x=new zy("$"),w=e?"":x.preParser(E);if(
|
217
|
+
`),d=new Ap(r,h,n),E=await d.visit(c);let b=a.splice(0,1);b.length||(b=d.errors);let T="";const x=new zy("$"),w=e?"":x.preParser(E);if(e&&!b.some(F=>F.type===In.Error)){const F=x.parser(E)||"";T=(await s_(F,{compress:!0,mangle:!0})).code||"";const v={message:xe.indiRunErr,type:In.Error,startColumn:0,startLineNumber:0,endColumn:0,endLineNumber:0};if(d.hasUseDrawFunc){if(d.scriptType===Ui.library)d.exportPositions.length||(v.message=xe.libraryExportErr,b.push(v));else if(d.exportPositions.length){const p=d.exportPositions.map(g=>{const{type:A,...k}=g;return{message:Se(xe.exportUseErr,{type:A}),type:In.Error,...k}});b.push(...p)}}else switch(d.scriptType){case Ui.indicator:b.push(v);break;case Ui.strategy:d.hasUseCreateOrderFunc||(v.message=xe.strategyRunErr,b.push(v));break}}return{errors:b,functions:Object.fromEntries(d.userFunctions),variables:Object.fromEntries(d.userVariables),types:Object.fromEntries(d.userTypes),methods:Object.fromEntries(d.userMethods),overloadsFuncs:d.overloadsFuncs,imports:Object.fromEntries(d.imports),enums:Object.fromEntries(d.userEnums),codeStr:T,preParserCode:w}}async function Sv(t,e,n,r){const{ast:a,comments:c}=u_(t+`
|
218
218
|
|
219
219
|
`),h=new Ap(r,c,n),d=await h.visit(a),{name:E,index:b}=h.endExport,T=d.findIndex(v=>v.name===E&&v.index===b),x=d.slice(0,T+1),F=new Ky("$",e).parser(x)||"",R=await s_(F,{compress:!0,mangle:!0});return{...h.exportLibs,description:h.description,codeStr:R.code||""}}class Tv extends Rm{constructor(){super(...arguments);P(this,"errors",[])}syntaxError(n,r,a,c,h){this.errors.push({message:`syntax error: ${h.replace(/expecting.+/,"")}`,type:In.Error,startColumn:c,startLineNumber:a,endColumn:c,endLineNumber:a})}}yf({parseTcc:xv,parseLibraryCode:Sv})})();
|