@guihz/trading-vue-editor-tes 0.0.302 → 0.1.1

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.
Files changed (167) hide show
  1. package/lib/assets/editor.worker-BxEYBjj-.js +7352 -0
  2. package/lib/assets/parserTccWorker-D5cq4N-Y.js +80540 -0
  3. package/lib/assets/scriptsRunWorker-CaEvEpNA.js +37748 -0
  4. package/lib/components/diffEditor/index.d.ts +1 -0
  5. package/lib/components/editor/config/monarchTokens.d.ts +2 -4
  6. package/lib/components/editor/constants/common.d.ts +38 -0
  7. package/lib/components/editor/constants/locals.d.ts +1 -0
  8. package/lib/components/editor/index.d.ts +1 -0
  9. package/lib/components/editor/tokenizer/utils.d.ts +0 -16
  10. package/lib/components/editor/type/index.d.ts +32 -1
  11. package/lib/components/editor/utils/completions.d.ts +3 -1
  12. package/lib/components/editor/utils/importLibrary.d.ts +2 -160
  13. package/lib/components/editor/utils/initEditor.d.ts +3 -0
  14. package/lib/components/editor/utils/parse.d.ts +2 -0
  15. package/lib/components/editor/utils/parserTccWorker.d.ts +1 -7
  16. package/lib/components/editor/utils/scriptsRunWorker.d.ts +1 -1
  17. package/lib/components/editor/utils/signatureHelp.d.ts +2 -0
  18. package/lib/components/editor/utils/tools.d.ts +6 -0
  19. package/lib/components/editor/v3/config/monarchTokens.d.ts +3 -0
  20. package/lib/components/editor/v3/constants/contents_zh.d.ts +6 -0
  21. package/lib/components/editor/{constants/contents.d.ts → v3/constants/index.d.ts} +1 -5
  22. package/lib/components/editor/v3/parseScript/buildInConstants.d.ts +179 -0
  23. package/lib/components/editor/v3/parseScript/buildInFuncNamespace/index.d.ts +9 -0
  24. package/lib/components/editor/v3/parseScript/buildInFuncNamespace/input.d.ts +43 -0
  25. package/lib/components/editor/v3/parseScript/buildInFuncNamespace/math.d.ts +50 -0
  26. package/lib/components/editor/v3/parseScript/buildInFuncNamespace/strategy.d.ts +243 -0
  27. package/lib/components/editor/v3/parseScript/buildInFuncNamespace/ta.d.ts +102 -0
  28. package/lib/components/editor/{parseScript → v3/parseScript}/buildInFuncNamespace/timeframe.d.ts +1 -1
  29. package/lib/components/editor/v3/parseScript/buildInVarNamespace/barstate.d.ts +19 -0
  30. package/lib/components/editor/v3/parseScript/buildInVarNamespace/index.d.ts +4 -0
  31. package/lib/components/editor/v3/parseScript/buildInVarNamespace/strategy.d.ts +126 -0
  32. package/lib/components/editor/v3/parseScript/buildInVarNamespace/syminfo.d.ts +22 -0
  33. package/lib/components/editor/v3/parseScript/buildInVarNamespace/ta.d.ts +17 -0
  34. package/lib/components/editor/v3/parseScript/buildInVariables.d.ts +96 -0
  35. package/lib/components/editor/v3/parseScript/constants.d.ts +119 -0
  36. package/lib/components/editor/v3/parseScript/enum.d.ts +283 -0
  37. package/lib/components/editor/v3/parseScript/parseToJs.d.ts +65 -0
  38. package/lib/components/editor/v3/parseScript/runType.d.ts +119 -0
  39. package/lib/components/editor/v3/parseScript/strategyNamespace/index.d.ts +2 -0
  40. package/lib/components/editor/{parseScript → v3/parseScript}/type.d.ts +1 -1
  41. package/lib/components/editor/v3/parseScript/utils.d.ts +21 -0
  42. package/lib/components/editor/v3/parseScript/visitorParser.d.ts +321 -0
  43. package/lib/components/editor/v3/parseScript/visitorUtils.d.ts +25 -0
  44. package/lib/components/editor/v3/parserTccWorker.d.ts +32 -0
  45. package/lib/components/editor/v3/scriptsRunWorker.d.ts +11 -0
  46. package/lib/{tccParser → components/editor/v3/tccParser}/LexerBase.d.ts +1 -1
  47. package/lib/components/editor/v3/tccParser/tccScriptParserVisitor.d.ts +359 -0
  48. package/lib/components/editor/v4/config/monarchTokens.d.ts +205 -0
  49. package/lib/components/editor/v4/constants/contents_zh.d.ts +6 -0
  50. package/lib/components/editor/v4/constants/index.d.ts +44 -0
  51. package/lib/components/editor/v4/parseScript/buildInConstants.d.ts +308 -0
  52. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/array.d.ts +84 -0
  53. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/box.d.ts +60 -0
  54. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/errorListener.d.ts +9 -0
  55. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/index.d.ts +17 -0
  56. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/input.d.ts +44 -0
  57. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/label.d.ts +61 -0
  58. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/line.d.ts +62 -0
  59. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/math.d.ts +50 -0
  60. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/strategy.d.ts +244 -0
  61. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/string.d.ts +38 -0
  62. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/ta.d.ts +118 -0
  63. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/table.d.ts +87 -0
  64. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/timeframe.d.ts +22 -0
  65. package/lib/components/editor/{parseScript → v4/parseScript}/buildInVarNamespace/barstate.d.ts +1 -1
  66. package/lib/components/editor/v4/parseScript/buildInVarNamespace/index.d.ts +8 -0
  67. package/lib/components/editor/v4/parseScript/buildInVarNamespace/strategy.d.ts +126 -0
  68. package/lib/components/editor/v4/parseScript/buildInVarNamespace/syminfo.d.ts +18 -0
  69. package/lib/components/editor/v4/parseScript/buildInVarNamespace/ta.d.ts +34 -0
  70. package/lib/components/editor/{parseScript → v4/parseScript}/constants.d.ts +1 -160
  71. package/lib/components/editor/v4/parseScript/constantsRun.d.ts +3 -0
  72. package/lib/components/editor/v4/parseScript/enum.d.ts +282 -0
  73. package/lib/components/editor/v4/parseScript/parseToJs.d.ts +65 -0
  74. package/lib/components/editor/v4/parseScript/strategyNamespace/index.d.ts +2 -0
  75. package/lib/components/editor/v4/parseScript/strategyNamespace/risk.d.ts +22 -0
  76. package/lib/components/editor/v4/parseScript/type.d.ts +39 -0
  77. package/lib/components/editor/v4/parseScript/utils.d.ts +21 -0
  78. package/lib/components/editor/v4/parseScript/visitorParser.d.ts +323 -0
  79. package/lib/components/editor/v4/parseScript/visitorUtils.d.ts +29 -0
  80. package/lib/components/editor/v4/parserTccWorker.d.ts +32 -0
  81. package/lib/components/editor/v4/scriptsRunWorker.d.ts +11 -0
  82. package/lib/components/editor/v4/tccParser/LexerBase.d.ts +19 -0
  83. package/lib/components/editor/v4/tccParser/tccScriptParserVisitor.d.ts +401 -0
  84. package/lib/components/editor/v5/config/monarchTokens.d.ts +205 -0
  85. package/lib/components/editor/v5/constants/contents_en.d.ts +6 -0
  86. package/lib/components/editor/{constants → v5/constants}/contents_zh.d.ts +1 -1
  87. package/lib/components/editor/v5/constants/index.d.ts +41 -0
  88. package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/box.d.ts +1 -1
  89. package/lib/components/editor/v5/parseScript/buildInFuncNamespace/color.d.ts +25 -0
  90. package/lib/components/editor/v5/parseScript/buildInFuncNamespace/errorListener.d.ts +9 -0
  91. package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/label.d.ts +1 -1
  92. package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/line.d.ts +1 -1
  93. package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/linefill.d.ts +1 -1
  94. package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/log.d.ts +1 -1
  95. package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/map.d.ts +1 -1
  96. package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/math.d.ts +1 -1
  97. package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/polyline.d.ts +1 -1
  98. package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/strategy.d.ts +1 -1
  99. package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/ta.d.ts +1 -1
  100. package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/table.d.ts +1 -1
  101. package/lib/components/editor/v5/parseScript/buildInFuncNamespace/timeframe.d.ts +22 -0
  102. package/lib/components/editor/v5/parseScript/buildInVarNamespace/barstate.d.ts +22 -0
  103. package/lib/components/editor/{parseScript → v5/parseScript}/buildInVarNamespace/chart.d.ts +1 -1
  104. package/lib/components/editor/v5/parseScript/buildInVarNamespace/dividends.d.ts +8 -0
  105. package/lib/components/editor/v5/parseScript/buildInVarNamespace/earnings.d.ts +9 -0
  106. package/lib/components/editor/v5/parseScript/buildInVarNamespace/session.d.ts +12 -0
  107. package/lib/components/editor/{parseScript → v5/parseScript}/buildInVarNamespace/strategy.d.ts +1 -1
  108. package/lib/components/editor/{parseScript → v5/parseScript}/buildInVarNamespace/syminfo.d.ts +1 -1
  109. package/lib/components/editor/{parseScript → v5/parseScript}/buildInVarNamespace/ta.d.ts +4 -3
  110. package/lib/components/editor/v5/parseScript/buildInVarNamespace/timeframe.d.ts +16 -0
  111. package/lib/components/editor/v5/parseScript/constants.d.ts +124 -0
  112. package/lib/components/editor/v5/parseScript/constantsRun.d.ts +3 -0
  113. package/lib/components/editor/{parseScript → v5/parseScript}/parseToJs.d.ts +1 -1
  114. package/lib/components/editor/{parseScript → v5/parseScript}/parseToLibJs.d.ts +1 -1
  115. package/lib/components/editor/v5/parseScript/strategyNamespace/risk.d.ts +22 -0
  116. package/lib/components/editor/v5/parseScript/type.d.ts +39 -0
  117. package/lib/components/editor/{parseScript → v5/parseScript}/userTypeClass.d.ts +1 -1
  118. package/lib/components/editor/{parseScript → v5/parseScript}/utils.d.ts +1 -1
  119. package/lib/components/editor/{parseScript → v5/parseScript}/visitorParser.d.ts +1 -1
  120. package/lib/components/editor/{parseScript → v5/parseScript}/visitorUtils.d.ts +2 -2
  121. package/lib/components/editor/v5/parserTccWorker.d.ts +40 -0
  122. package/lib/components/editor/v5/scriptsRunWorker.d.ts +11 -0
  123. package/lib/components/editor/v5/tccParser/LexerBase.d.ts +19 -0
  124. package/lib/{tccParser → components/editor/v5/tccParser}/tccScriptParserVisitor.d.ts +1 -1
  125. package/lib/components/referenceManual/components/ContentItem.d.ts +2 -0
  126. package/lib/components/referenceManual/index.d.ts +2 -0
  127. package/lib/components/referenceManualPage/components/ContentItem.d.ts +1 -0
  128. package/lib/components/referenceManualPage/components/ManualLeft.d.ts +5 -0
  129. package/lib/components/referenceManualPage/index.d.ts +2 -0
  130. package/lib/index-Ce2gRdFk.js +12813 -0
  131. package/lib/index-CjECfhIW.js +28088 -0
  132. package/lib/index-UdtfRBFV.js +59792 -0
  133. package/lib/monarchTokens-Cj3v8l0Q.js +526 -0
  134. package/lib/monarchTokens-CnFYyHnR.js +191 -0
  135. package/lib/monarchTokens-oh3fO2YY.js +563 -0
  136. package/lib/packages/index.d.ts +3 -3
  137. package/lib/trading-vue-editor.es.packages.js +6356 -66629
  138. package/lib/trading-vue-editor.umd.packages.mjs +117 -75
  139. package/lib/utils/tools.d.ts +7 -2
  140. package/package.json +1 -1
  141. package/lib/assets/editor.worker-CT5Cb1wO.js +0 -11
  142. package/lib/assets/parserTccWorker-cjv11J0f.js +0 -279
  143. package/lib/assets/scriptsRunWorker-ISxcgzMz.js +0 -91
  144. /package/lib/components/editor/{parseScript → v3/parseScript}/buildInFuncNamespace/errorListener.d.ts +0 -0
  145. /package/lib/components/editor/{parseScript → v3/parseScript}/constantsRun.d.ts +0 -0
  146. /package/lib/components/editor/{parseScript → v3/parseScript}/strategyNamespace/risk.d.ts +0 -0
  147. /package/lib/components/editor/{parseScript → v4/parseScript}/buildInFuncNamespace/color.d.ts +0 -0
  148. /package/lib/components/editor/{parseScript → v4/parseScript}/buildInVarNamespace/dividends.d.ts +0 -0
  149. /package/lib/components/editor/{parseScript → v4/parseScript}/buildInVarNamespace/earnings.d.ts +0 -0
  150. /package/lib/components/editor/{parseScript → v4/parseScript}/buildInVarNamespace/session.d.ts +0 -0
  151. /package/lib/components/editor/{parseScript → v4/parseScript}/buildInVarNamespace/timeframe.d.ts +0 -0
  152. /package/lib/components/editor/{constants → v5/constants}/newContents_en.d.ts +0 -0
  153. /package/lib/components/editor/{constants → v5/constants}/newContents_zh.d.ts +0 -0
  154. /package/lib/components/editor/{parseScript → v5/parseScript}/buildInConstants.d.ts +0 -0
  155. /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/array.d.ts +0 -0
  156. /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/chartPoint.d.ts +0 -0
  157. /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/index.d.ts +0 -0
  158. /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/input.d.ts +0 -0
  159. /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/matrix.d.ts +0 -0
  160. /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/runtime.d.ts +0 -0
  161. /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/string.d.ts +0 -0
  162. /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/syminfo.d.ts +0 -0
  163. /package/lib/components/editor/{parseScript → v5/parseScript}/buildInVarNamespace/index.d.ts +0 -0
  164. /package/lib/components/editor/{parseScript → v5/parseScript}/enum.d.ts +0 -0
  165. /package/lib/components/editor/{parseScript → v5/parseScript}/strategyNamespace/closedtrades.d.ts +0 -0
  166. /package/lib/components/editor/{parseScript → v5/parseScript}/strategyNamespace/index.d.ts +0 -0
  167. /package/lib/components/editor/{parseScript → v5/parseScript}/strategyNamespace/opentrades.d.ts +0 -0
@@ -0,0 +1,191 @@
1
+ const o = {
2
+ builtinFunctions: /abs|acos|alertcondition|alma|asin|atan|atr|avg|barcolor|barssince|bgcolor|cci|ceil|change|cog|color|correlation|cos|cross|crossover|crossunder|cum|dayofmonth|dayofweek|dev|ema|exp|falling|fill|fixnan|floor|heikinashi|highest|highestbars|hline|hour|iff|input|kagi|linebreak|linreg|log|log10|lowest|lowestbars|macd|max|min|minute|mom|month|na|nz|offset|percentile_linear_interpolation|percentile_nearest_rank|percentrank|pivothigh|pivotlow|plot|plotarrow|plotbar|plotcandle|plotchar|plotshape|pointfigure|pow|renko|rising|rma|roc|round|rsi|sar|second|security|sign|sin|sma|sqrt|stdev|stoch|strategy|strategy\.cancel|strategy\.cancel_all|strategy\.close|strategy\.close_all|strategy\.entry|strategy\.exit|strategy\.order|strategy\.risk\.allow_entry_in|strategy\.risk\.max_cons_loss_days|strategy\.risk\.max_drawdown|strategy\.risk\.max_intraday_filled_orders|strategy\.risk\.max_intraday_loss|strategy\.risk\.max_position_size|study|sum|swma|tan|tickerid|time|timestamp|tostring|tr|tsi|valuewhen|variance|vwap|vwma|weekofyear|wma|year/,
3
+ keywords: /and|break|by|continue|else|for|if|not|or|to/,
4
+ tokenizer: {
5
+ root: [
6
+ [/\/\/\s*(?=@)/, "comment", "@comments"],
7
+ [/\/\/.*(?!@).*/, "comment"],
8
+ [/\'([^\'\\]|\\.)*$/, "string.invalid"],
9
+ [/'([^'\\]|\\.)*$/, "string.invalid"],
10
+ [/\"/, {
11
+ token: "string",
12
+ bracket: "@open",
13
+ next: "@stringDouble"
14
+ }],
15
+ [/'/, {
16
+ token: "string",
17
+ bracket: "@open",
18
+ next: "@stringSingle"
19
+ }],
20
+ [/(@builtinFunctions)(?=\s*\(|\s*<.*>)/, {
21
+ token: "support.function",
22
+ next: "@template"
23
+ }],
24
+ [/@punctuation/, {
25
+ token: "punctuation.operator",
26
+ next: "@property"
27
+ }],
28
+ [/^(\s*)\b(?!(?:series|simple|string|array|color|const|float|bool|int|continue|break|else|and|for|not|var|by|if|or|to)\b)([\w.\d_$]+)(\[\]|)(\s+)((?!(?:continue|break|else|and|for|not|var|by|if|or|to)\b)[\w\d_$]+)(\s+)(\=)/, [{
29
+ token: "source"
30
+ }, {
31
+ token: "entity.name.type"
32
+ }, {
33
+ token: "paren"
34
+ }, {
35
+ token: "source"
36
+ }, {
37
+ token: "variable.other"
38
+ }, {
39
+ token: "source"
40
+ }, {
41
+ token: "keyword.equals"
42
+ }]],
43
+ [/[+-]?\d+\.\d*([eE][\-+]?\d+)?(?!\w+)/, "constant.numeric.float"],
44
+ [/[+-]?\.\d+([eE][\-+]?\d+)?(?!\w+)/, "constant.numeric.float"],
45
+ [/([+-]?(\d+))(?!\w+)(?!\w+)/, "constant.numeric.integer"],
46
+ [/(?:true|false)\b/, "constant.other.boolean"],
47
+ [/#[0-9a-fA-F]{6,8}\b/, "constant.other.color"],
48
+ [/[\/%*+\-]|==|!=|<=|>=|=>|<|>|\?|\:=|\:|\,/, "keyword.operator"],
49
+ [/\b(?:@keywords)\b/, "keyword"],
50
+ [/^[a-zA-Z_][a-zA-Z_0-9]+(?=\s*\()/, "entity.name.function"],
51
+ [/[0-9]+\b/, "constant.numeric.integer"],
52
+ [/=/, "keyword.equals"],
53
+ [/\b(?:@builtinVariables)\b(?!\s*=\s*\w+)/, "support.variable"],
54
+ [/[(|)|\[|\]]/, "paren"],
55
+ [/[a-zA-Z_][a-zA-Z_0-9]*(?=\s*\()/, {
56
+ token: "entity.name.method"
57
+ }],
58
+ [/\w+\b/, "variable.other"]
59
+ ],
60
+ comments: [[/@[A-Za-z]+(\s*=\s*)?$/, {
61
+ token: "comment.annotation",
62
+ next: "@pop"
63
+ }], [/@[A-Za-z]+(\s*=\s*)?/, {
64
+ token: "comment.annotation"
65
+ }], [/(?!\s*@[A-Za-z]+).+$/, {
66
+ token: "comment",
67
+ next: "@pop"
68
+ }]],
69
+ stringDouble: [[/[^\\\"]+/, "string"], [/\\./, "string.invalid"], [/\"/, {
70
+ token: "string.quote",
71
+ bracket: "@close",
72
+ next: "@pop"
73
+ }]],
74
+ stringSingle: [[/[^\\']+/, "string"], [/\\./, "string.invalid"], [/'/, {
75
+ token: "string",
76
+ bracket: "@close",
77
+ next: "@pop"
78
+ }]],
79
+ template: [[/(\((?:\s+))?((?!(?:continue|series|simple|string|array|color|const|float|break|bool|else|int|and|for|not|by|if|or|to)\b)\b[\w.\d_$]+(?=[\[\]]*(?:\s+)(?:[\w\d_$]+\s*(?:\,|\))+\s*).+(?:\=\>|\→)))/, "entity.name.type"], [/\(|\)|\[|\]|\=|\>/, {
80
+ token: "paren",
81
+ next: "@pop"
82
+ }], [/(\,)(\s+)/, ["keyword.operator", "source"]], [/(\,)/, {
83
+ token: "keyword.operator"
84
+ }], [/([\w.\d$]+)/, {
85
+ token: "entity.name.type"
86
+ }], [/(<|>)/, {
87
+ token: "paren"
88
+ }], [/\s(?=\w)|$/, {
89
+ token: "source",
90
+ next: "@pop"
91
+ }]],
92
+ property: [[/@punctuation/, {
93
+ token: "punctuation.operator"
94
+ }], [/[a-zA-Z_][a-zA-Z_0-9]+(?=\s*\()/, {
95
+ token: "entity.name.method",
96
+ next: "@pop"
97
+ }], [/[a-zA-Z0-9_]+/, {
98
+ token: "variable.other.property",
99
+ next: "@pop"
100
+ }], [/@empty/, {
101
+ token: "source",
102
+ next: "@pop"
103
+ }]]
104
+ },
105
+ builtinVariables: /adjustment\.dividends|adjustment\.none|adjustment\.splits|aqua|area|areabr|barmerge\.gaps_off|barmerge\.gaps_on|barmerge\.lookahead_off|barmerge\.lookahead_on|black|blue|bool|circles|columns|cross|currency\.AUD|currency\.CAD|currency\.CHF|currency\.EUR|currency\.GBP|currency\.HKD|currency\.JPY|currency\.NOK|currency\.NONE|currency\.NZD|currency\.RUB|currency\.SEK|currency\.SGD|currency\.TRY|currency\.USD|currency\.ZAR|dashed|dotted|float|friday|fuchsia|gray|green|histogram|integer|lime|line|linebr|location\.abovebar|location\.absolute|location\.belowbar|location\.bottom|location\.top|maroon|monday|navy|olive|orange|purple|red|resolution|saturday|scale\.left|scale\.none|scale\.right|session\.extended|session\.regular|session|shape\.arrowdown|shape\.arrowup|shape\.circle|shape\.cross|shape\.diamond|shape\.flag|shape\.labeldown|shape\.labelup|shape\.square|shape\.triangledown|shape\.triangleup|shape\.xcross|silver|size\.auto|size\.huge|size\.large|size\.normal|size\.small|size\.tiny|solid|source|stepline|strategy\.cash|strategy\.commission\.cash_per_contract|strategy\.commission\.cash_per_order|strategy\.commission\.percent|strategy\.direction\.all|strategy\.direction\.long|strategy\.direction\.short|strategy\.fixed|strategy\.long|strategy\.oca\.cancel|strategy\.oca\.none|strategy\.oca\.reduce|strategy\.percent_of_equity|strategy\.short|string|sunday|symbol|teal|thursday|tuesday|wednesday|white|yellow|accdist|barstate\.isconfirmed|barstate\.isfirst|barstate\.ishistory|barstate\.islast|barstate\.isnew|barstate\.isrealtime|close|dayofmonth|dayofweek|high|hl2|hlc3|hour|interval|isdaily|isdwm|isintraday|isminutes|ismonthly|isseconds|isweekly|low|minute|month|n|na|ohlc4|open|period|second|strategy\.closedtrades|strategy\.equity|strategy\.eventrades|strategy\.grossloss|strategy\.grossprofit|strategy\.initial_capital|strategy\.losstrades|strategy\.max_contracts_held_all|strategy\.max_contracts_held_long|strategy\.max_contracts_held_short|strategy\.max_drawdown|strategy\.netprofit|strategy\.openprofit|strategy\.opentrades|strategy\.position_avg_price|strategy\.position_entry_name|strategy\.position_size|strategy\.wintrades|syminfo\.mintick|syminfo\.pointvalue|syminfo\.prefix|syminfo\.root|syminfo\.session|syminfo\.timezone|ticker|tickerid|time|timenow|tr|volume|vwap|weekofyear|year/,
106
+ punctuation: /[.](?![.])/,
107
+ empty: /^$/
108
+ };
109
+ var t;
110
+ (function(e) {
111
+ e[e.None = 0] = "None", e[e.Indent = 1] = "Indent", e[e.IndentOutdent = 2] = "IndentOutdent", e[e.Outdent = 3] = "Outdent";
112
+ })(t || (t = {}));
113
+ const n = {
114
+ wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
115
+ comments: {
116
+ lineComment: "//",
117
+ blockComment: ["/*", "*/"]
118
+ },
119
+ brackets: [["(", ")"], ["[", "]"]],
120
+ folding: {
121
+ markers: {
122
+ start: /(\/\/#region)|(\/\/.*{($|\s))/,
123
+ end: /(\/\/#endregion)|(\/\/.*}($|\s))/
124
+ }
125
+ },
126
+ autoClosingPairs: [{
127
+ open: "{",
128
+ close: "}"
129
+ }, {
130
+ open: "[",
131
+ close: "]"
132
+ }, {
133
+ open: "(",
134
+ close: ")"
135
+ }, {
136
+ open: '"',
137
+ close: '"'
138
+ }, {
139
+ open: "'",
140
+ close: "'"
141
+ }],
142
+ surroundingPairs: [{
143
+ open: "{",
144
+ close: "}"
145
+ }, {
146
+ open: "[",
147
+ close: "]"
148
+ }, {
149
+ open: "(",
150
+ close: ")"
151
+ }, {
152
+ open: '"',
153
+ close: '"'
154
+ }, {
155
+ open: "'",
156
+ close: "'"
157
+ }, {
158
+ open: "<",
159
+ close: ">"
160
+ }],
161
+ onEnterRules: [{
162
+ beforeText: /\)\s*=>\s*$/,
163
+ action: {
164
+ indentAction: t.Indent
165
+ }
166
+ }, {
167
+ beforeText: /if\s+.*\s*$/,
168
+ action: {
169
+ indentAction: t.Indent
170
+ }
171
+ }, {
172
+ beforeText: /else/,
173
+ action: {
174
+ indentAction: t.Indent
175
+ }
176
+ }, {
177
+ beforeText: /for\s+\S+\s*=\s*\S+\s+to\s+\S+(?:\s+by\s+\S+)?\s*$/,
178
+ action: {
179
+ indentAction: t.Indent
180
+ }
181
+ }, {
182
+ beforeText: /^\s*$/,
183
+ action: {
184
+ indentAction: t.Outdent
185
+ }
186
+ }]
187
+ };
188
+ export {
189
+ n as CONFIGURATION,
190
+ o as LANGUAGE_MONARCH_TOKENS
191
+ };