@guihz/trading-vue-editor-tes 0.1.35 → 0.1.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/assets/{parserTccWorker-BvDdoR3P.js → parserTccWorker-Douk71sp.js} +13369 -12999
- package/lib/assets/{scriptsRunWorker-8a33SSnQ.js → scriptsRunWorker-DwBycCfp.js} +560 -529
- package/lib/components/editor/tokenizer/config.d.ts +3 -1
- package/lib/components/editor/type/index.d.ts +2 -0
- package/lib/components/editor/v5/parseScript/constants.d.ts +1 -0
- package/lib/components/editor/v5/parseScript/parseToJs.d.ts +19 -2
- package/lib/components/editor/v6/parseScript/constants.d.ts +1 -0
- package/lib/components/editor/v6/parseScript/parseToJs.d.ts +19 -2
- package/lib/components/editor/v6/parseScript/visitorParser.d.ts +5 -2
- package/lib/components/editor/v6/parserTccWorker.d.ts +3 -0
- package/lib/components/editor/v6/tccParser/tccScriptParserVisitor.d.ts +7 -0
- package/lib/i18n/local/en.d.ts +2 -0
- package/lib/i18n/local/zh_cn.d.ts +2 -0
- package/lib/{index-Clupi1hX.js → index-DALxzLez.js} +67 -67
- package/lib/{index-D22ipYhi.js → index-DBn672U2.js} +91 -91
- package/lib/{index-CjECfhIW.js → index-Qjp-Unq2.js} +28 -28
- package/lib/{monarchTokens-BNkQaBBZ.js → monarchTokens-C5rW_kP9.js} +1 -1
- package/lib/{monarchTokens-BkGYzRcP.js → monarchTokens-h2q3KbTF.js} +1 -1
- package/lib/trading-vue-editor.es.packages.js +689 -661
- package/lib/trading-vue-editor.umd.packages.mjs +40 -40
- package/package.json +1 -1
- package/lib/components/editor/v5/parseScript/buildInFuncNamespace/strategyNew.d.ts +0 -261
- package/lib/components/editor/v6/parseScript/parseToLibJs.d.ts +0 -71
@@ -1,4 +1,5 @@
|
|
1
|
-
import { IKeyObjectValue } from "../../type";
|
1
|
+
import { IError, IKeyObjectValue } from "../../type";
|
2
|
+
import { VScriptType } from './enum';
|
2
3
|
export default class ParseToJs {
|
3
4
|
private _nameMap;
|
4
5
|
private _argChangeMap;
|
@@ -29,14 +30,30 @@ export default class ParseToJs {
|
|
29
30
|
private _hasRightVisibleBarTime;
|
30
31
|
private _isExperssion;
|
31
32
|
private _hasAlert;
|
32
|
-
|
33
|
+
private _libTitle?;
|
34
|
+
private _exportEles;
|
35
|
+
private _scriptType?;
|
36
|
+
constructor(prefix: string, scriptType?: VScriptType, libTitle?: string);
|
33
37
|
preParser(values: IKeyObjectValue[]): string | undefined;
|
34
38
|
parser(values: IKeyObjectValue[]): {
|
35
39
|
code: string;
|
36
40
|
hasLeftVisibleBarTime: boolean;
|
37
41
|
hasRightVisibleBarTime: boolean;
|
38
42
|
hasAlert: boolean;
|
43
|
+
errors: IError[] | undefined;
|
39
44
|
} | undefined;
|
45
|
+
parserlib(values?: IKeyObjectValue[]): {
|
46
|
+
errors: IError[];
|
47
|
+
code?: undefined;
|
48
|
+
hasLeftVisibleBarTime?: undefined;
|
49
|
+
hasRightVisibleBarTime?: undefined;
|
50
|
+
} | {
|
51
|
+
code: string;
|
52
|
+
hasLeftVisibleBarTime: boolean;
|
53
|
+
hasRightVisibleBarTime: boolean;
|
54
|
+
errors: IError[];
|
55
|
+
} | undefined;
|
56
|
+
private _getExportCodes;
|
40
57
|
private _parserStmt;
|
41
58
|
private _parserEnumStatement;
|
42
59
|
private _parserTypeStatement;
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import { IKeyObjectValue } from "../../type";
|
1
|
+
import { IKeyObjectValue, IError } from "../../type";
|
2
|
+
import { VScriptType } from './enum';
|
2
3
|
export default class ParseToJs {
|
3
4
|
private _nameMap;
|
4
5
|
private _argChangeMap;
|
@@ -27,14 +28,30 @@ export default class ParseToJs {
|
|
27
28
|
private _hasRightVisibleBarTime;
|
28
29
|
private _isExperssion;
|
29
30
|
private _hasAlert;
|
30
|
-
|
31
|
+
private _libTitle?;
|
32
|
+
private _exportEles;
|
33
|
+
private _scriptType?;
|
34
|
+
constructor(prefix: string, scriptType?: VScriptType, libTitle?: string);
|
31
35
|
preParser(values: IKeyObjectValue[]): string | undefined;
|
32
36
|
parser(values: IKeyObjectValue[]): {
|
33
37
|
code: string;
|
34
38
|
hasLeftVisibleBarTime: boolean;
|
35
39
|
hasRightVisibleBarTime: boolean;
|
36
40
|
hasAlert: boolean;
|
41
|
+
errors: IError[] | undefined;
|
37
42
|
} | undefined;
|
43
|
+
parserlib(values?: IKeyObjectValue[]): {
|
44
|
+
errors: IError[];
|
45
|
+
code?: undefined;
|
46
|
+
hasLeftVisibleBarTime?: undefined;
|
47
|
+
hasRightVisibleBarTime?: undefined;
|
48
|
+
} | {
|
49
|
+
code: string;
|
50
|
+
hasLeftVisibleBarTime: boolean;
|
51
|
+
hasRightVisibleBarTime: boolean;
|
52
|
+
errors: IError[];
|
53
|
+
} | undefined;
|
54
|
+
private _getExportCodes;
|
38
55
|
private _parserStmt;
|
39
56
|
private _parserEnumStatement;
|
40
57
|
private _parserTypeStatement;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { IKeyObjectValue, IDocValue, IKeyValue } from '../../type';
|
2
|
-
import { VRuleType } from './enum';
|
2
|
+
import { VRuleType, VScriptType } from './enum';
|
3
3
|
import { ParserUtils } from './visitorUtils';
|
4
4
|
import { IError, IRange, IPosition } from "./type";
|
5
5
|
export default class ParserVisitor extends ParserUtils {
|
@@ -30,6 +30,7 @@ export default class ParserVisitor extends ParserUtils {
|
|
30
30
|
private _exportMethods;
|
31
31
|
private _exportTypes;
|
32
32
|
private _exportEnums;
|
33
|
+
private _exportVars;
|
33
34
|
private _exportPositions;
|
34
35
|
private _description;
|
35
36
|
private _endExport;
|
@@ -51,12 +52,13 @@ export default class ParserVisitor extends ParserUtils {
|
|
51
52
|
get userMethods(): Map<string, IDocValue[]>;
|
52
53
|
get hasUseDrawFunc(): boolean;
|
53
54
|
get hasUseCreateOrderFunc(): boolean;
|
54
|
-
get scriptType():
|
55
|
+
get scriptType(): VScriptType | undefined;
|
55
56
|
get exportLibs(): {
|
56
57
|
functions: IDocValue[];
|
57
58
|
methods: IDocValue[];
|
58
59
|
types: IDocValue[];
|
59
60
|
enums: IDocValue[];
|
61
|
+
variables: IDocValue[];
|
60
62
|
};
|
61
63
|
get description(): string;
|
62
64
|
get exportPositions(): (IRange & {
|
@@ -89,6 +91,7 @@ export default class ParserVisitor extends ParserUtils {
|
|
89
91
|
visitExpressionBlockSequence: (ctx: IKeyObjectValue) => IKeyObjectValue[];
|
90
92
|
visitBlockSequence: (ctx: IKeyObjectValue) => IKeyObjectValue[];
|
91
93
|
visitVariableDeclarationStmt: (ctx: IKeyObjectValue) => IKeyObjectValue[];
|
94
|
+
visitExportDeclareAssign: (ctx: IKeyObjectValue) => IKeyObjectValue;
|
92
95
|
visitVarBlockStmt: (ctx: IKeyObjectValue) => IKeyObjectValue | {
|
93
96
|
ruleType: VRuleType;
|
94
97
|
name: IKeyObjectValue;
|
@@ -29,10 +29,13 @@ export declare function parseTcc(program: string, hasTranscoding: boolean, getIm
|
|
29
29
|
export declare function parseLibraryCode(program: string, libTitle: string, getImportLibraryFunc: (obj: IKeyObjectValue) => Promise<IKeyObjectValue>, keyObjs: IKeyObjectValue): Promise<{
|
30
30
|
description: string;
|
31
31
|
codeStr: string;
|
32
|
+
hasLeftVisibleBarTime: boolean | undefined;
|
33
|
+
hasRightVisibleBarTime: boolean | undefined;
|
32
34
|
functions: import("../type").IDocValue[];
|
33
35
|
methods: import("../type").IDocValue[];
|
34
36
|
types: import("../type").IDocValue[];
|
35
37
|
enums: import("../type").IDocValue[];
|
38
|
+
variables: import("../type").IDocValue[];
|
36
39
|
}>;
|
37
40
|
export declare class ExprErrorListener extends ErrorListener {
|
38
41
|
errors: any[];
|
@@ -9,6 +9,7 @@ import { FlowStmtContext } from "./tccScriptParser";
|
|
9
9
|
import { BlockContext } from "./tccScriptParser";
|
10
10
|
import { BlockLineContext } from "./tccScriptParser";
|
11
11
|
import { VariableDeclarationStmtContext } from "./tccScriptParser";
|
12
|
+
import { ExportDeclareAssignContext } from "./tccScriptParser";
|
12
13
|
import { DeclareAssignContext } from "./tccScriptParser";
|
13
14
|
import { AgainAssignContext } from "./tccScriptParser";
|
14
15
|
import { AgainAssignNameContext } from "./tccScriptParser";
|
@@ -130,6 +131,12 @@ export default class tccScriptParserVisitor<Result> extends ParseTreeVisitor<Res
|
|
130
131
|
* @return the visitor result
|
131
132
|
*/
|
132
133
|
visitVariableDeclarationStmt?: (ctx: VariableDeclarationStmtContext) => Result;
|
134
|
+
/**
|
135
|
+
* Visit a parse tree produced by `tccScriptParser.exportDeclareAssign`.
|
136
|
+
* @param ctx the parse tree
|
137
|
+
* @return the visitor result
|
138
|
+
*/
|
139
|
+
visitExportDeclareAssign?: (ctx: ExportDeclareAssignContext) => Result;
|
133
140
|
/**
|
134
141
|
* Visit a parse tree produced by the `DeclareAssign`
|
135
142
|
* labeled alternative in `tccScriptParser.variableDeclarationList`.
|
package/lib/i18n/local/en.d.ts
CHANGED