@guihz/trading-vue-editor-tes 0.0.52 → 0.0.54
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/assets/{parserTccWorker-CSf0s1lk.js → parserTccWorker-HvN6ZSID.js} +43 -43
- package/lib/assets/{scriptsRunWorker-Bz0kV3Co.js → scriptsRunWorker-DBOrPbdQ.js} +16 -16
- package/lib/components/editor/parseScript/constants.d.ts +2 -0
- package/lib/components/editor/parseScript/enum.d.ts +9 -0
- package/lib/components/editor/parseScript/visitorParser.d.ts +16 -1
- package/lib/components/editor/utils/completions.d.ts +4 -0
- package/lib/components/editor/utils/suggestions.d.ts +1 -1
- package/lib/trading-vue-editor.js +1245 -1200
- package/lib/trading-vue-editor.umd.cjs +25 -25
- package/package.json +1 -1
@@ -45,6 +45,7 @@ export declare const ERRORS_TIPS: {
|
|
45
45
|
buidinAssignErr: string;
|
46
46
|
buidinVarErr: string;
|
47
47
|
useNaErr: string;
|
48
|
+
libraryTitleErr: string;
|
48
49
|
};
|
49
50
|
export declare const WARNING_TIPS: {
|
50
51
|
repeatVar: string;
|
@@ -74,3 +75,4 @@ export declare const READY_ONLY_OPTIONS: {
|
|
74
75
|
};
|
75
76
|
contextmenu: boolean;
|
76
77
|
};
|
78
|
+
export declare const COMMENTS_DESC_REG: RegExp;
|
@@ -260,3 +260,12 @@ export declare enum VInputType {
|
|
260
260
|
TEXT_AREA = "text_area",
|
261
261
|
TIMEFRAME = "timeframe"
|
262
262
|
}
|
263
|
+
export declare enum VComments {
|
264
|
+
description = "description",
|
265
|
+
field = "field",
|
266
|
+
function = "function",
|
267
|
+
param = "param",
|
268
|
+
returns = "returns",
|
269
|
+
type = "type",
|
270
|
+
variable = "variable"
|
271
|
+
}
|
@@ -19,7 +19,9 @@ export default class ParserVisitor extends ParserUtils {
|
|
19
19
|
private _overloadsFuncs;
|
20
20
|
private _hasMemberIndex;
|
21
21
|
private _isInLocalScop;
|
22
|
-
|
22
|
+
private _comments;
|
23
|
+
private _currentLine;
|
24
|
+
constructor(props: IKeyObjectValue, comments: IKeyObjectValue[]);
|
23
25
|
get overloadsFuncs(): IKeyValue[];
|
24
26
|
get errors(): IError[];
|
25
27
|
get userTypes(): Map<string, IDocValue[]>;
|
@@ -59,6 +61,18 @@ export default class ParserVisitor extends ParserUtils {
|
|
59
61
|
value: IKeyObjectValue;
|
60
62
|
};
|
61
63
|
visitVarSingle: (ctx: IKeyObjectValue) => IKeyObjectValue;
|
64
|
+
/**
|
65
|
+
* 解析注释
|
66
|
+
*
|
67
|
+
* 该方法用于解析给定行号和类型条件下的注释文本,生成一个对象,对象的键是注释的类型,值是与该类型注释相关的描述文本。
|
68
|
+
* 支持解析多行注释,并可以区分不同级别的注释键和子项。
|
69
|
+
*
|
70
|
+
* @param line 当前行号,用于筛选注释行
|
71
|
+
* @param types 需要解析的注释类型数组
|
72
|
+
* @param supportMulLines 同一类型是否支持多行注释的解析,默认为false
|
73
|
+
* @returns 返回一个对象,包含解析后的注释信息
|
74
|
+
*/
|
75
|
+
private _commentsParser;
|
62
76
|
visitVarMultiple: (ctx: IKeyObjectValue) => {
|
63
77
|
ruleType: VRuleType;
|
64
78
|
names: IKeyObjectValue[];
|
@@ -196,6 +210,7 @@ export default class ParserVisitor extends ParserUtils {
|
|
196
210
|
private _againAssignHandle;
|
197
211
|
private _typeCheck;
|
198
212
|
private _getBuildVar;
|
213
|
+
private _specialTreatmentChartPoint;
|
199
214
|
private _verifyName;
|
200
215
|
private _judgeGatherValue;
|
201
216
|
private _nameCheck;
|
@@ -17,11 +17,13 @@ export declare class MyCompletion {
|
|
17
17
|
private _methodFuncs;
|
18
18
|
private _userTypes;
|
19
19
|
private _nextIsBracket;
|
20
|
+
private _annotationSuggestions;
|
20
21
|
constructor();
|
21
22
|
get methodFuncs(): Map<string, IDocValue[]>;
|
22
23
|
get userFuncs(): Map<string, IDocValue[]>;
|
23
24
|
set nextIsBracket(value: boolean);
|
24
25
|
get nextIsBracket(): boolean;
|
26
|
+
get annotationSuggestions(): ISuggestion[];
|
25
27
|
initBuiltinsTrees(): void;
|
26
28
|
getArgSuggestions(key: string): ISuggestion[] | undefined;
|
27
29
|
getSuggestions(key?: string): ISuggestion[] | undefined;
|
@@ -39,6 +41,7 @@ export declare class MyCompletion {
|
|
39
41
|
private _setUserVariableSubItems;
|
40
42
|
private _getUserVariableCompletionItems;
|
41
43
|
private _getTypeCompletionItems;
|
44
|
+
private _getAnnotationCompletionItems;
|
42
45
|
private _getKeywordCompletionItems;
|
43
46
|
private _getMethodNamespaceCache;
|
44
47
|
private _getFunctionCompletionItems;
|
@@ -52,6 +55,7 @@ export declare class MyCompletion {
|
|
52
55
|
private _getCustomTypeCompletionItem;
|
53
56
|
private _getInstanceTypeCompletionItemProp;
|
54
57
|
private _getFunctionCompletionItem;
|
58
|
+
private _getAnnotationCompletionItem;
|
55
59
|
private _getNamespaceCompletionItem;
|
56
60
|
private _extractExamples;
|
57
61
|
private _extractDescription;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Position, editor, languages, IRange, Uri } from 'monaco-editor';
|
2
|
-
export declare function provideCompletionItems(model: editor.ITextModel, position: Position): languages.ProviderResult<languages.CompletionList>;
|
2
|
+
export declare function provideCompletionItems(model: editor.ITextModel, position: Position, context: languages.CompletionContext): languages.ProviderResult<languages.CompletionList>;
|
3
3
|
export declare function resolveCompletionItem(item: languages.CompletionItem): languages.CompletionItem;
|
4
4
|
export declare function provideHover(model: editor.ITextModel, position: Position): languages.ProviderResult<languages.Hover>;
|
5
5
|
export declare function provideSignatureHelp(model: editor.ITextModel, position: Position): languages.ProviderResult<languages.SignatureHelpResult>;
|