@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.
- package/lib/assets/editor.worker-BxEYBjj-.js +7352 -0
- package/lib/assets/parserTccWorker-D5cq4N-Y.js +80540 -0
- package/lib/assets/scriptsRunWorker-CaEvEpNA.js +37748 -0
- package/lib/components/diffEditor/index.d.ts +1 -0
- package/lib/components/editor/config/monarchTokens.d.ts +2 -4
- package/lib/components/editor/constants/common.d.ts +38 -0
- package/lib/components/editor/constants/locals.d.ts +1 -0
- package/lib/components/editor/index.d.ts +1 -0
- package/lib/components/editor/tokenizer/utils.d.ts +0 -16
- package/lib/components/editor/type/index.d.ts +32 -1
- package/lib/components/editor/utils/completions.d.ts +3 -1
- package/lib/components/editor/utils/importLibrary.d.ts +2 -160
- package/lib/components/editor/utils/initEditor.d.ts +3 -0
- package/lib/components/editor/utils/parse.d.ts +2 -0
- package/lib/components/editor/utils/parserTccWorker.d.ts +1 -7
- package/lib/components/editor/utils/scriptsRunWorker.d.ts +1 -1
- package/lib/components/editor/utils/signatureHelp.d.ts +2 -0
- package/lib/components/editor/utils/tools.d.ts +6 -0
- package/lib/components/editor/v3/config/monarchTokens.d.ts +3 -0
- package/lib/components/editor/v3/constants/contents_zh.d.ts +6 -0
- package/lib/components/editor/{constants/contents.d.ts → v3/constants/index.d.ts} +1 -5
- package/lib/components/editor/v3/parseScript/buildInConstants.d.ts +179 -0
- package/lib/components/editor/v3/parseScript/buildInFuncNamespace/index.d.ts +9 -0
- package/lib/components/editor/v3/parseScript/buildInFuncNamespace/input.d.ts +43 -0
- package/lib/components/editor/v3/parseScript/buildInFuncNamespace/math.d.ts +50 -0
- package/lib/components/editor/v3/parseScript/buildInFuncNamespace/strategy.d.ts +243 -0
- package/lib/components/editor/v3/parseScript/buildInFuncNamespace/ta.d.ts +102 -0
- package/lib/components/editor/{parseScript → v3/parseScript}/buildInFuncNamespace/timeframe.d.ts +1 -1
- package/lib/components/editor/v3/parseScript/buildInVarNamespace/barstate.d.ts +19 -0
- package/lib/components/editor/v3/parseScript/buildInVarNamespace/index.d.ts +4 -0
- package/lib/components/editor/v3/parseScript/buildInVarNamespace/strategy.d.ts +126 -0
- package/lib/components/editor/v3/parseScript/buildInVarNamespace/syminfo.d.ts +22 -0
- package/lib/components/editor/v3/parseScript/buildInVarNamespace/ta.d.ts +17 -0
- package/lib/components/editor/v3/parseScript/buildInVariables.d.ts +96 -0
- package/lib/components/editor/v3/parseScript/constants.d.ts +119 -0
- package/lib/components/editor/v3/parseScript/enum.d.ts +283 -0
- package/lib/components/editor/v3/parseScript/parseToJs.d.ts +65 -0
- package/lib/components/editor/v3/parseScript/runType.d.ts +119 -0
- package/lib/components/editor/v3/parseScript/strategyNamespace/index.d.ts +2 -0
- package/lib/components/editor/{parseScript → v3/parseScript}/type.d.ts +1 -1
- package/lib/components/editor/v3/parseScript/utils.d.ts +21 -0
- package/lib/components/editor/v3/parseScript/visitorParser.d.ts +321 -0
- package/lib/components/editor/v3/parseScript/visitorUtils.d.ts +25 -0
- package/lib/components/editor/v3/parserTccWorker.d.ts +32 -0
- package/lib/components/editor/v3/scriptsRunWorker.d.ts +11 -0
- package/lib/{tccParser → components/editor/v3/tccParser}/LexerBase.d.ts +1 -1
- package/lib/components/editor/v3/tccParser/tccScriptParserVisitor.d.ts +359 -0
- package/lib/components/editor/v4/config/monarchTokens.d.ts +205 -0
- package/lib/components/editor/v4/constants/contents_zh.d.ts +6 -0
- package/lib/components/editor/v4/constants/index.d.ts +44 -0
- package/lib/components/editor/v4/parseScript/buildInConstants.d.ts +308 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/array.d.ts +84 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/box.d.ts +60 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/errorListener.d.ts +9 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/index.d.ts +17 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/input.d.ts +44 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/label.d.ts +61 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/line.d.ts +62 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/math.d.ts +50 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/strategy.d.ts +244 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/string.d.ts +38 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/ta.d.ts +118 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/table.d.ts +87 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/timeframe.d.ts +22 -0
- package/lib/components/editor/{parseScript → v4/parseScript}/buildInVarNamespace/barstate.d.ts +1 -1
- package/lib/components/editor/v4/parseScript/buildInVarNamespace/index.d.ts +8 -0
- package/lib/components/editor/v4/parseScript/buildInVarNamespace/strategy.d.ts +126 -0
- package/lib/components/editor/v4/parseScript/buildInVarNamespace/syminfo.d.ts +18 -0
- package/lib/components/editor/v4/parseScript/buildInVarNamespace/ta.d.ts +34 -0
- package/lib/components/editor/{parseScript → v4/parseScript}/constants.d.ts +1 -160
- package/lib/components/editor/v4/parseScript/constantsRun.d.ts +3 -0
- package/lib/components/editor/v4/parseScript/enum.d.ts +282 -0
- package/lib/components/editor/v4/parseScript/parseToJs.d.ts +65 -0
- package/lib/components/editor/v4/parseScript/strategyNamespace/index.d.ts +2 -0
- package/lib/components/editor/v4/parseScript/strategyNamespace/risk.d.ts +22 -0
- package/lib/components/editor/v4/parseScript/type.d.ts +39 -0
- package/lib/components/editor/v4/parseScript/utils.d.ts +21 -0
- package/lib/components/editor/v4/parseScript/visitorParser.d.ts +323 -0
- package/lib/components/editor/v4/parseScript/visitorUtils.d.ts +29 -0
- package/lib/components/editor/v4/parserTccWorker.d.ts +32 -0
- package/lib/components/editor/v4/scriptsRunWorker.d.ts +11 -0
- package/lib/components/editor/v4/tccParser/LexerBase.d.ts +19 -0
- package/lib/components/editor/v4/tccParser/tccScriptParserVisitor.d.ts +401 -0
- package/lib/components/editor/v5/config/monarchTokens.d.ts +205 -0
- package/lib/components/editor/v5/constants/contents_en.d.ts +6 -0
- package/lib/components/editor/{constants → v5/constants}/contents_zh.d.ts +1 -1
- package/lib/components/editor/v5/constants/index.d.ts +41 -0
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/box.d.ts +1 -1
- package/lib/components/editor/v5/parseScript/buildInFuncNamespace/color.d.ts +25 -0
- package/lib/components/editor/v5/parseScript/buildInFuncNamespace/errorListener.d.ts +9 -0
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/label.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/line.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/linefill.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/log.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/map.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/math.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/polyline.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/strategy.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/ta.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/table.d.ts +1 -1
- package/lib/components/editor/v5/parseScript/buildInFuncNamespace/timeframe.d.ts +22 -0
- package/lib/components/editor/v5/parseScript/buildInVarNamespace/barstate.d.ts +22 -0
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInVarNamespace/chart.d.ts +1 -1
- package/lib/components/editor/v5/parseScript/buildInVarNamespace/dividends.d.ts +8 -0
- package/lib/components/editor/v5/parseScript/buildInVarNamespace/earnings.d.ts +9 -0
- package/lib/components/editor/v5/parseScript/buildInVarNamespace/session.d.ts +12 -0
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInVarNamespace/strategy.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInVarNamespace/syminfo.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInVarNamespace/ta.d.ts +4 -3
- package/lib/components/editor/v5/parseScript/buildInVarNamespace/timeframe.d.ts +16 -0
- package/lib/components/editor/v5/parseScript/constants.d.ts +124 -0
- package/lib/components/editor/v5/parseScript/constantsRun.d.ts +3 -0
- package/lib/components/editor/{parseScript → v5/parseScript}/parseToJs.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/parseToLibJs.d.ts +1 -1
- package/lib/components/editor/v5/parseScript/strategyNamespace/risk.d.ts +22 -0
- package/lib/components/editor/v5/parseScript/type.d.ts +39 -0
- package/lib/components/editor/{parseScript → v5/parseScript}/userTypeClass.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/utils.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/visitorParser.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/visitorUtils.d.ts +2 -2
- package/lib/components/editor/v5/parserTccWorker.d.ts +40 -0
- package/lib/components/editor/v5/scriptsRunWorker.d.ts +11 -0
- package/lib/components/editor/v5/tccParser/LexerBase.d.ts +19 -0
- package/lib/{tccParser → components/editor/v5/tccParser}/tccScriptParserVisitor.d.ts +1 -1
- package/lib/components/referenceManual/components/ContentItem.d.ts +2 -0
- package/lib/components/referenceManual/index.d.ts +2 -0
- package/lib/components/referenceManualPage/components/ContentItem.d.ts +1 -0
- package/lib/components/referenceManualPage/components/ManualLeft.d.ts +5 -0
- package/lib/components/referenceManualPage/index.d.ts +2 -0
- package/lib/index-Ce2gRdFk.js +12813 -0
- package/lib/index-CjECfhIW.js +28088 -0
- package/lib/index-UdtfRBFV.js +59792 -0
- package/lib/monarchTokens-Cj3v8l0Q.js +526 -0
- package/lib/monarchTokens-CnFYyHnR.js +191 -0
- package/lib/monarchTokens-oh3fO2YY.js +563 -0
- package/lib/packages/index.d.ts +3 -3
- package/lib/trading-vue-editor.es.packages.js +6356 -66629
- package/lib/trading-vue-editor.umd.packages.mjs +117 -75
- package/lib/utils/tools.d.ts +7 -2
- package/package.json +1 -1
- package/lib/assets/editor.worker-CT5Cb1wO.js +0 -11
- package/lib/assets/parserTccWorker-cjv11J0f.js +0 -279
- package/lib/assets/scriptsRunWorker-ISxcgzMz.js +0 -91
- /package/lib/components/editor/{parseScript → v3/parseScript}/buildInFuncNamespace/errorListener.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v3/parseScript}/constantsRun.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v3/parseScript}/strategyNamespace/risk.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v4/parseScript}/buildInFuncNamespace/color.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v4/parseScript}/buildInVarNamespace/dividends.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v4/parseScript}/buildInVarNamespace/earnings.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v4/parseScript}/buildInVarNamespace/session.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v4/parseScript}/buildInVarNamespace/timeframe.d.ts +0 -0
- /package/lib/components/editor/{constants → v5/constants}/newContents_en.d.ts +0 -0
- /package/lib/components/editor/{constants → v5/constants}/newContents_zh.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/buildInConstants.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/array.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/chartPoint.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/index.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/input.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/matrix.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/runtime.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/string.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/syminfo.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/buildInVarNamespace/index.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/enum.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/strategyNamespace/closedtrades.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/strategyNamespace/index.d.ts +0 -0
- /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
|
+
};
|