@guihz/trading-vue-editor-tes 0.0.52 → 0.0.53

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.
@@ -74,3 +74,4 @@ export declare const READY_ONLY_OPTIONS: {
74
74
  };
75
75
  contextmenu: boolean;
76
76
  };
77
+ 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
- constructor(props: IKeyObjectValue);
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[];
@@ -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>;