openpinescript 0.0.0-stage → 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/LICENSE +674 -0
- package/README.md +332 -2
- package/dist/cli.mjs +108691 -0
- package/dist/index.cjs +108670 -0
- package/dist/index.mjs +108624 -0
- package/dist/types/index.d.ts +31 -0
- package/dist/types/parser/v1/generated/PineV1Lexer.d.ts +66 -0
- package/dist/types/parser/v1/generated/PineV1Parser.d.ts +555 -0
- package/dist/types/parser/v1/generated/PineV1ParserVisitor.d.ts +318 -0
- package/dist/types/parser/v1/index.d.ts +39 -0
- package/dist/types/parser/v2/generated/PineV2Lexer.d.ts +67 -0
- package/dist/types/parser/v2/generated/PineV2Parser.d.ts +568 -0
- package/dist/types/parser/v2/generated/PineV2ParserVisitor.d.ts +325 -0
- package/dist/types/parser/v2/index.d.ts +2 -0
- package/dist/types/parser/v3/generated/PineV3Lexer.d.ts +67 -0
- package/dist/types/parser/v3/generated/PineV3Parser.d.ts +568 -0
- package/dist/types/parser/v3/generated/PineV3ParserVisitor.d.ts +325 -0
- package/dist/types/parser/v3/index.d.ts +2 -0
- package/dist/types/parser/v4/generated/PineV4Lexer.d.ts +86 -0
- package/dist/types/parser/v4/generated/PineV4Parser.d.ts +673 -0
- package/dist/types/parser/v4/generated/PineV4ParserVisitor.d.ts +367 -0
- package/dist/types/parser/v4/index.d.ts +2 -0
- package/dist/types/parser/v5/generated/PineV5Lexer.d.ts +95 -0
- package/dist/types/parser/v5/generated/PineV5Parser.d.ts +964 -0
- package/dist/types/parser/v5/generated/PineV5ParserVisitor.d.ts +521 -0
- package/dist/types/parser/v5/index.d.ts +2 -0
- package/dist/types/parser/v6/generated/PineV6Lexer.d.ts +98 -0
- package/dist/types/parser/v6/generated/PineV6Parser.d.ts +984 -0
- package/dist/types/parser/v6/generated/PineV6ParserVisitor.d.ts +528 -0
- package/dist/types/parser/v6/index.d.ts +2 -0
- package/dist/types/runtime/v1/Series.d.ts +61 -0
- package/dist/types/runtime/v1/broker/Broker.d.ts +325 -0
- package/dist/types/runtime/v1/broker/index.d.ts +158 -0
- package/dist/types/runtime/v1/broker/val.d.ts +28 -0
- package/dist/types/runtime/v1/constDefault.d.ts +11 -0
- package/dist/types/runtime/v1/context.d.ts +1705 -0
- package/dist/types/runtime/v1/footprint.d.ts +32 -0
- package/dist/types/runtime/v1/index.d.ts +7 -0
- package/dist/types/runtime/v1/language-spec.d.ts +12 -0
- package/dist/types/runtime/v1/openTrades.d.ts +12 -0
- package/dist/types/runtime/v1/palette.d.ts +18 -0
- package/dist/types/runtime/v1/session.d.ts +482 -0
- package/dist/types/runtime/v1/sessions.d.ts +31 -0
- package/dist/types/runtime/v1/stateClone.d.ts +19 -0
- package/dist/types/runtime/v1/stdlib/alerts.d.ts +31 -0
- package/dist/types/runtime/v1/stdlib/arrays.d.ts +133 -0
- package/dist/types/runtime/v1/stdlib/barmerge.d.ts +27 -0
- package/dist/types/runtime/v1/stdlib/barstate.d.ts +79 -0
- package/dist/types/runtime/v1/stdlib/cast.d.ts +81 -0
- package/dist/types/runtime/v1/stdlib/chart.d.ts +283 -0
- package/dist/types/runtime/v1/stdlib/color.d.ts +51 -0
- package/dist/types/runtime/v1/stdlib/core.d.ts +162 -0
- package/dist/types/runtime/v1/stdlib/dataset.d.ts +36 -0
- package/dist/types/runtime/v1/stdlib/display.d.ts +50 -0
- package/dist/types/runtime/v1/stdlib/drawings.d.ts +407 -0
- package/dist/types/runtime/v1/stdlib/errors.d.ts +21 -0
- package/dist/types/runtime/v1/stdlib/font.d.ts +20 -0
- package/dist/types/runtime/v1/stdlib/footprint.d.ts +76 -0
- package/dist/types/runtime/v1/stdlib/format.d.ts +57 -0
- package/dist/types/runtime/v1/stdlib/index.d.ts +71 -0
- package/dist/types/runtime/v1/stdlib/input.d.ts +14 -0
- package/dist/types/runtime/v1/stdlib/inputs.d.ts +60 -0
- package/dist/types/runtime/v1/stdlib/late_members.d.ts +97 -0
- package/dist/types/runtime/v1/stdlib/logging.d.ts +31 -0
- package/dist/types/runtime/v1/stdlib/maps.d.ts +55 -0
- package/dist/types/runtime/v1/stdlib/math.d.ts +71 -0
- package/dist/types/runtime/v1/stdlib/matrix.d.ts +201 -0
- package/dist/types/runtime/v1/stdlib/metadata.d.ts +14 -0
- package/dist/types/runtime/v1/stdlib/mtf.d.ts +15 -0
- package/dist/types/runtime/v1/stdlib/renames.d.ts +117 -0
- package/dist/types/runtime/v1/stdlib/renames5.d.ts +113 -0
- package/dist/types/runtime/v1/stdlib/renames6.d.ts +81 -0
- package/dist/types/runtime/v1/stdlib/request.d.ts +207 -0
- package/dist/types/runtime/v1/stdlib/scale.d.ts +19 -0
- package/dist/types/runtime/v1/stdlib/session.d.ts +113 -0
- package/dist/types/runtime/v1/stdlib/sort_field.d.ts +12 -0
- package/dist/types/runtime/v1/stdlib/sources.d.ts +24 -0
- package/dist/types/runtime/v1/stdlib/str.d.ts +117 -0
- package/dist/types/runtime/v1/stdlib/strategy.d.ts +314 -0
- package/dist/types/runtime/v1/stdlib/syminfo.d.ts +209 -0
- package/dist/types/runtime/v1/stdlib/ta.d.ts +409 -0
- package/dist/types/runtime/v1/stdlib/time.d.ts +158 -0
- package/dist/types/runtime/v1/stdlib/trades.d.ts +108 -0
- package/dist/types/runtime/v1/stdlib/ui.d.ts +196 -0
- package/dist/types/runtime/v1/stdlib/v6_members.d.ts +68 -0
- package/dist/types/runtime/v1/timeframes.d.ts +139 -0
- package/dist/types/runtime/v1/zones.d.ts +30 -0
- package/dist/types/transpiler/common/index.d.ts +51 -0
- package/dist/types/transpiler/common/libraries.d.ts +29 -0
- package/dist/types/transpiler/common/parseErrors.d.ts +38 -0
- package/dist/types/transpiler/common/passes/ScopeAnalysis.d.ts +158 -0
- package/dist/types/transpiler/common/passes/TypeRules.d.ts +26 -0
- package/dist/types/transpiler/common/profiles/index.d.ts +96 -0
- package/dist/types/transpiler/common/version.d.ts +40 -0
- package/dist/types/transpiler/v1/ToJsVisitor.d.ts +720 -0
- package/dist/types/transpiler/v2/ToJsVisitor.d.ts +72 -0
- package/dist/types/transpiler/v3/ToJsVisitor.d.ts +87 -0
- package/dist/types/transpiler/v4/ToJsVisitor.d.ts +263 -0
- package/dist/types/transpiler/v5/ToJsVisitor.d.ts +1101 -0
- package/dist/types/transpiler/v6/ToJsVisitor.d.ts +237 -0
- package/dist/types/transpiler/v6/rules.d.ts +94 -0
- package/dist/types/utils/v2/common.d.ts +4 -0
- package/package.json +92 -4
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import { AbstractParseTreeVisitor } from "antlr4ng";
|
|
2
|
+
import { Var_assignContext } from "./PineV3Parser.js";
|
|
3
|
+
import { Global_stmt_contentContext } from "./PineV3Parser.js";
|
|
4
|
+
import { Local_stmt_contentContext } from "./PineV3Parser.js";
|
|
5
|
+
import { Pine_scriptContext } from "./PineV3Parser.js";
|
|
6
|
+
import { StmtContext } from "./PineV3Parser.js";
|
|
7
|
+
import { Global_stmtContext } from "./PineV3Parser.js";
|
|
8
|
+
import { Fun_def_stmtContext } from "./PineV3Parser.js";
|
|
9
|
+
import { Fun_def_singlelineContext } from "./PineV3Parser.js";
|
|
10
|
+
import { Fun_def_multilineContext } from "./PineV3Parser.js";
|
|
11
|
+
import { Fun_headContext } from "./PineV3Parser.js";
|
|
12
|
+
import { Fun_body_singlelineContext } from "./PineV3Parser.js";
|
|
13
|
+
import { Local_stmt_singlelineContext } from "./PineV3Parser.js";
|
|
14
|
+
import { Loop_breakContext } from "./PineV3Parser.js";
|
|
15
|
+
import { Loop_continueContext } from "./PineV3Parser.js";
|
|
16
|
+
import { Fun_body_multilineContext } from "./PineV3Parser.js";
|
|
17
|
+
import { Local_stmts_multilineContext } from "./PineV3Parser.js";
|
|
18
|
+
import { Local_stmts_listContext } from "./PineV3Parser.js";
|
|
19
|
+
import { Local_stmt_multilineContext } from "./PineV3Parser.js";
|
|
20
|
+
import { Var_defContext } from "./PineV3Parser.js";
|
|
21
|
+
import { Var_defsContext } from "./PineV3Parser.js";
|
|
22
|
+
import { Ids_arrayContext } from "./PineV3Parser.js";
|
|
23
|
+
import { Arith_exprsContext } from "./PineV3Parser.js";
|
|
24
|
+
import { Arith_exprContext } from "./PineV3Parser.js";
|
|
25
|
+
import { If_exprContext } from "./PineV3Parser.js";
|
|
26
|
+
import { For_exprContext } from "./PineV3Parser.js";
|
|
27
|
+
import { Stmts_blockContext } from "./PineV3Parser.js";
|
|
28
|
+
import { Ternary_exprContext } from "./PineV3Parser.js";
|
|
29
|
+
import { Or_exprContext } from "./PineV3Parser.js";
|
|
30
|
+
import { And_exprContext } from "./PineV3Parser.js";
|
|
31
|
+
import { Eq_exprContext } from "./PineV3Parser.js";
|
|
32
|
+
import { Cmp_exprContext } from "./PineV3Parser.js";
|
|
33
|
+
import { Add_exprContext } from "./PineV3Parser.js";
|
|
34
|
+
import { Mult_exprContext } from "./PineV3Parser.js";
|
|
35
|
+
import { Unary_exprContext } from "./PineV3Parser.js";
|
|
36
|
+
import { Sqbr_exprContext } from "./PineV3Parser.js";
|
|
37
|
+
import { AtomContext } from "./PineV3Parser.js";
|
|
38
|
+
import { Fun_callContext } from "./PineV3Parser.js";
|
|
39
|
+
import { Fun_actual_argsContext } from "./PineV3Parser.js";
|
|
40
|
+
import { Pos_argsContext } from "./PineV3Parser.js";
|
|
41
|
+
import { Kw_argsContext } from "./PineV3Parser.js";
|
|
42
|
+
import { Kw_argContext } from "./PineV3Parser.js";
|
|
43
|
+
import { LiteralContext } from "./PineV3Parser.js";
|
|
44
|
+
import { Num_literalContext } from "./PineV3Parser.js";
|
|
45
|
+
import { Other_literalContext } from "./PineV3Parser.js";
|
|
46
|
+
import { IdContext } from "./PineV3Parser.js";
|
|
47
|
+
/**
|
|
48
|
+
* This interface defines a complete generic visitor for a parse tree produced
|
|
49
|
+
* by `PineV3Parser`.
|
|
50
|
+
*
|
|
51
|
+
* @param <Result> The return type of the visit operation. Use `void` for
|
|
52
|
+
* operations with no return type.
|
|
53
|
+
*/
|
|
54
|
+
export declare class PineV3ParserVisitor<Result> extends AbstractParseTreeVisitor<Result> {
|
|
55
|
+
/**
|
|
56
|
+
* Visit a parse tree produced by `PineV3Parser.var_assign`.
|
|
57
|
+
* @param ctx the parse tree
|
|
58
|
+
* @return the visitor result
|
|
59
|
+
*/
|
|
60
|
+
visitVar_assign?: (ctx: Var_assignContext) => Result;
|
|
61
|
+
/**
|
|
62
|
+
* Visit a parse tree produced by `PineV3Parser.global_stmt_content`.
|
|
63
|
+
* @param ctx the parse tree
|
|
64
|
+
* @return the visitor result
|
|
65
|
+
*/
|
|
66
|
+
visitGlobal_stmt_content?: (ctx: Global_stmt_contentContext) => Result;
|
|
67
|
+
/**
|
|
68
|
+
* Visit a parse tree produced by `PineV3Parser.local_stmt_content`.
|
|
69
|
+
* @param ctx the parse tree
|
|
70
|
+
* @return the visitor result
|
|
71
|
+
*/
|
|
72
|
+
visitLocal_stmt_content?: (ctx: Local_stmt_contentContext) => Result;
|
|
73
|
+
/**
|
|
74
|
+
* Visit a parse tree produced by `PineV3Parser.pine_script`.
|
|
75
|
+
* @param ctx the parse tree
|
|
76
|
+
* @return the visitor result
|
|
77
|
+
*/
|
|
78
|
+
visitPine_script?: (ctx: Pine_scriptContext) => Result;
|
|
79
|
+
/**
|
|
80
|
+
* Visit a parse tree produced by `PineV3Parser.stmt`.
|
|
81
|
+
* @param ctx the parse tree
|
|
82
|
+
* @return the visitor result
|
|
83
|
+
*/
|
|
84
|
+
visitStmt?: (ctx: StmtContext) => Result;
|
|
85
|
+
/**
|
|
86
|
+
* Visit a parse tree produced by `PineV3Parser.global_stmt`.
|
|
87
|
+
* @param ctx the parse tree
|
|
88
|
+
* @return the visitor result
|
|
89
|
+
*/
|
|
90
|
+
visitGlobal_stmt?: (ctx: Global_stmtContext) => Result;
|
|
91
|
+
/**
|
|
92
|
+
* Visit a parse tree produced by `PineV3Parser.fun_def_stmt`.
|
|
93
|
+
* @param ctx the parse tree
|
|
94
|
+
* @return the visitor result
|
|
95
|
+
*/
|
|
96
|
+
visitFun_def_stmt?: (ctx: Fun_def_stmtContext) => Result;
|
|
97
|
+
/**
|
|
98
|
+
* Visit a parse tree produced by `PineV3Parser.fun_def_singleline`.
|
|
99
|
+
* @param ctx the parse tree
|
|
100
|
+
* @return the visitor result
|
|
101
|
+
*/
|
|
102
|
+
visitFun_def_singleline?: (ctx: Fun_def_singlelineContext) => Result;
|
|
103
|
+
/**
|
|
104
|
+
* Visit a parse tree produced by `PineV3Parser.fun_def_multiline`.
|
|
105
|
+
* @param ctx the parse tree
|
|
106
|
+
* @return the visitor result
|
|
107
|
+
*/
|
|
108
|
+
visitFun_def_multiline?: (ctx: Fun_def_multilineContext) => Result;
|
|
109
|
+
/**
|
|
110
|
+
* Visit a parse tree produced by `PineV3Parser.fun_head`.
|
|
111
|
+
* @param ctx the parse tree
|
|
112
|
+
* @return the visitor result
|
|
113
|
+
*/
|
|
114
|
+
visitFun_head?: (ctx: Fun_headContext) => Result;
|
|
115
|
+
/**
|
|
116
|
+
* Visit a parse tree produced by `PineV3Parser.fun_body_singleline`.
|
|
117
|
+
* @param ctx the parse tree
|
|
118
|
+
* @return the visitor result
|
|
119
|
+
*/
|
|
120
|
+
visitFun_body_singleline?: (ctx: Fun_body_singlelineContext) => Result;
|
|
121
|
+
/**
|
|
122
|
+
* Visit a parse tree produced by `PineV3Parser.local_stmt_singleline`.
|
|
123
|
+
* @param ctx the parse tree
|
|
124
|
+
* @return the visitor result
|
|
125
|
+
*/
|
|
126
|
+
visitLocal_stmt_singleline?: (ctx: Local_stmt_singlelineContext) => Result;
|
|
127
|
+
/**
|
|
128
|
+
* Visit a parse tree produced by `PineV3Parser.loop_break`.
|
|
129
|
+
* @param ctx the parse tree
|
|
130
|
+
* @return the visitor result
|
|
131
|
+
*/
|
|
132
|
+
visitLoop_break?: (ctx: Loop_breakContext) => Result;
|
|
133
|
+
/**
|
|
134
|
+
* Visit a parse tree produced by `PineV3Parser.loop_continue`.
|
|
135
|
+
* @param ctx the parse tree
|
|
136
|
+
* @return the visitor result
|
|
137
|
+
*/
|
|
138
|
+
visitLoop_continue?: (ctx: Loop_continueContext) => Result;
|
|
139
|
+
/**
|
|
140
|
+
* Visit a parse tree produced by `PineV3Parser.fun_body_multiline`.
|
|
141
|
+
* @param ctx the parse tree
|
|
142
|
+
* @return the visitor result
|
|
143
|
+
*/
|
|
144
|
+
visitFun_body_multiline?: (ctx: Fun_body_multilineContext) => Result;
|
|
145
|
+
/**
|
|
146
|
+
* Visit a parse tree produced by `PineV3Parser.local_stmts_multiline`.
|
|
147
|
+
* @param ctx the parse tree
|
|
148
|
+
* @return the visitor result
|
|
149
|
+
*/
|
|
150
|
+
visitLocal_stmts_multiline?: (ctx: Local_stmts_multilineContext) => Result;
|
|
151
|
+
/**
|
|
152
|
+
* Visit a parse tree produced by `PineV3Parser.local_stmts_list`.
|
|
153
|
+
* @param ctx the parse tree
|
|
154
|
+
* @return the visitor result
|
|
155
|
+
*/
|
|
156
|
+
visitLocal_stmts_list?: (ctx: Local_stmts_listContext) => Result;
|
|
157
|
+
/**
|
|
158
|
+
* Visit a parse tree produced by `PineV3Parser.local_stmt_multiline`.
|
|
159
|
+
* @param ctx the parse tree
|
|
160
|
+
* @return the visitor result
|
|
161
|
+
*/
|
|
162
|
+
visitLocal_stmt_multiline?: (ctx: Local_stmt_multilineContext) => Result;
|
|
163
|
+
/**
|
|
164
|
+
* Visit a parse tree produced by `PineV3Parser.var_def`.
|
|
165
|
+
* @param ctx the parse tree
|
|
166
|
+
* @return the visitor result
|
|
167
|
+
*/
|
|
168
|
+
visitVar_def?: (ctx: Var_defContext) => Result;
|
|
169
|
+
/**
|
|
170
|
+
* Visit a parse tree produced by `PineV3Parser.var_defs`.
|
|
171
|
+
* @param ctx the parse tree
|
|
172
|
+
* @return the visitor result
|
|
173
|
+
*/
|
|
174
|
+
visitVar_defs?: (ctx: Var_defsContext) => Result;
|
|
175
|
+
/**
|
|
176
|
+
* Visit a parse tree produced by `PineV3Parser.ids_array`.
|
|
177
|
+
* @param ctx the parse tree
|
|
178
|
+
* @return the visitor result
|
|
179
|
+
*/
|
|
180
|
+
visitIds_array?: (ctx: Ids_arrayContext) => Result;
|
|
181
|
+
/**
|
|
182
|
+
* Visit a parse tree produced by `PineV3Parser.arith_exprs`.
|
|
183
|
+
* @param ctx the parse tree
|
|
184
|
+
* @return the visitor result
|
|
185
|
+
*/
|
|
186
|
+
visitArith_exprs?: (ctx: Arith_exprsContext) => Result;
|
|
187
|
+
/**
|
|
188
|
+
* Visit a parse tree produced by `PineV3Parser.arith_expr`.
|
|
189
|
+
* @param ctx the parse tree
|
|
190
|
+
* @return the visitor result
|
|
191
|
+
*/
|
|
192
|
+
visitArith_expr?: (ctx: Arith_exprContext) => Result;
|
|
193
|
+
/**
|
|
194
|
+
* Visit a parse tree produced by `PineV3Parser.if_expr`.
|
|
195
|
+
* @param ctx the parse tree
|
|
196
|
+
* @return the visitor result
|
|
197
|
+
*/
|
|
198
|
+
visitIf_expr?: (ctx: If_exprContext) => Result;
|
|
199
|
+
/**
|
|
200
|
+
* Visit a parse tree produced by `PineV3Parser.for_expr`.
|
|
201
|
+
* @param ctx the parse tree
|
|
202
|
+
* @return the visitor result
|
|
203
|
+
*/
|
|
204
|
+
visitFor_expr?: (ctx: For_exprContext) => Result;
|
|
205
|
+
/**
|
|
206
|
+
* Visit a parse tree produced by `PineV3Parser.stmts_block`.
|
|
207
|
+
* @param ctx the parse tree
|
|
208
|
+
* @return the visitor result
|
|
209
|
+
*/
|
|
210
|
+
visitStmts_block?: (ctx: Stmts_blockContext) => Result;
|
|
211
|
+
/**
|
|
212
|
+
* Visit a parse tree produced by `PineV3Parser.ternary_expr`.
|
|
213
|
+
* @param ctx the parse tree
|
|
214
|
+
* @return the visitor result
|
|
215
|
+
*/
|
|
216
|
+
visitTernary_expr?: (ctx: Ternary_exprContext) => Result;
|
|
217
|
+
/**
|
|
218
|
+
* Visit a parse tree produced by `PineV3Parser.or_expr`.
|
|
219
|
+
* @param ctx the parse tree
|
|
220
|
+
* @return the visitor result
|
|
221
|
+
*/
|
|
222
|
+
visitOr_expr?: (ctx: Or_exprContext) => Result;
|
|
223
|
+
/**
|
|
224
|
+
* Visit a parse tree produced by `PineV3Parser.and_expr`.
|
|
225
|
+
* @param ctx the parse tree
|
|
226
|
+
* @return the visitor result
|
|
227
|
+
*/
|
|
228
|
+
visitAnd_expr?: (ctx: And_exprContext) => Result;
|
|
229
|
+
/**
|
|
230
|
+
* Visit a parse tree produced by `PineV3Parser.eq_expr`.
|
|
231
|
+
* @param ctx the parse tree
|
|
232
|
+
* @return the visitor result
|
|
233
|
+
*/
|
|
234
|
+
visitEq_expr?: (ctx: Eq_exprContext) => Result;
|
|
235
|
+
/**
|
|
236
|
+
* Visit a parse tree produced by `PineV3Parser.cmp_expr`.
|
|
237
|
+
* @param ctx the parse tree
|
|
238
|
+
* @return the visitor result
|
|
239
|
+
*/
|
|
240
|
+
visitCmp_expr?: (ctx: Cmp_exprContext) => Result;
|
|
241
|
+
/**
|
|
242
|
+
* Visit a parse tree produced by `PineV3Parser.add_expr`.
|
|
243
|
+
* @param ctx the parse tree
|
|
244
|
+
* @return the visitor result
|
|
245
|
+
*/
|
|
246
|
+
visitAdd_expr?: (ctx: Add_exprContext) => Result;
|
|
247
|
+
/**
|
|
248
|
+
* Visit a parse tree produced by `PineV3Parser.mult_expr`.
|
|
249
|
+
* @param ctx the parse tree
|
|
250
|
+
* @return the visitor result
|
|
251
|
+
*/
|
|
252
|
+
visitMult_expr?: (ctx: Mult_exprContext) => Result;
|
|
253
|
+
/**
|
|
254
|
+
* Visit a parse tree produced by `PineV3Parser.unary_expr`.
|
|
255
|
+
* @param ctx the parse tree
|
|
256
|
+
* @return the visitor result
|
|
257
|
+
*/
|
|
258
|
+
visitUnary_expr?: (ctx: Unary_exprContext) => Result;
|
|
259
|
+
/**
|
|
260
|
+
* Visit a parse tree produced by `PineV3Parser.sqbr_expr`.
|
|
261
|
+
* @param ctx the parse tree
|
|
262
|
+
* @return the visitor result
|
|
263
|
+
*/
|
|
264
|
+
visitSqbr_expr?: (ctx: Sqbr_exprContext) => Result;
|
|
265
|
+
/**
|
|
266
|
+
* Visit a parse tree produced by `PineV3Parser.atom`.
|
|
267
|
+
* @param ctx the parse tree
|
|
268
|
+
* @return the visitor result
|
|
269
|
+
*/
|
|
270
|
+
visitAtom?: (ctx: AtomContext) => Result;
|
|
271
|
+
/**
|
|
272
|
+
* Visit a parse tree produced by `PineV3Parser.fun_call`.
|
|
273
|
+
* @param ctx the parse tree
|
|
274
|
+
* @return the visitor result
|
|
275
|
+
*/
|
|
276
|
+
visitFun_call?: (ctx: Fun_callContext) => Result;
|
|
277
|
+
/**
|
|
278
|
+
* Visit a parse tree produced by `PineV3Parser.fun_actual_args`.
|
|
279
|
+
* @param ctx the parse tree
|
|
280
|
+
* @return the visitor result
|
|
281
|
+
*/
|
|
282
|
+
visitFun_actual_args?: (ctx: Fun_actual_argsContext) => Result;
|
|
283
|
+
/**
|
|
284
|
+
* Visit a parse tree produced by `PineV3Parser.pos_args`.
|
|
285
|
+
* @param ctx the parse tree
|
|
286
|
+
* @return the visitor result
|
|
287
|
+
*/
|
|
288
|
+
visitPos_args?: (ctx: Pos_argsContext) => Result;
|
|
289
|
+
/**
|
|
290
|
+
* Visit a parse tree produced by `PineV3Parser.kw_args`.
|
|
291
|
+
* @param ctx the parse tree
|
|
292
|
+
* @return the visitor result
|
|
293
|
+
*/
|
|
294
|
+
visitKw_args?: (ctx: Kw_argsContext) => Result;
|
|
295
|
+
/**
|
|
296
|
+
* Visit a parse tree produced by `PineV3Parser.kw_arg`.
|
|
297
|
+
* @param ctx the parse tree
|
|
298
|
+
* @return the visitor result
|
|
299
|
+
*/
|
|
300
|
+
visitKw_arg?: (ctx: Kw_argContext) => Result;
|
|
301
|
+
/**
|
|
302
|
+
* Visit a parse tree produced by `PineV3Parser.literal`.
|
|
303
|
+
* @param ctx the parse tree
|
|
304
|
+
* @return the visitor result
|
|
305
|
+
*/
|
|
306
|
+
visitLiteral?: (ctx: LiteralContext) => Result;
|
|
307
|
+
/**
|
|
308
|
+
* Visit a parse tree produced by `PineV3Parser.num_literal`.
|
|
309
|
+
* @param ctx the parse tree
|
|
310
|
+
* @return the visitor result
|
|
311
|
+
*/
|
|
312
|
+
visitNum_literal?: (ctx: Num_literalContext) => Result;
|
|
313
|
+
/**
|
|
314
|
+
* Visit a parse tree produced by `PineV3Parser.other_literal`.
|
|
315
|
+
* @param ctx the parse tree
|
|
316
|
+
* @return the visitor result
|
|
317
|
+
*/
|
|
318
|
+
visitOther_literal?: (ctx: Other_literalContext) => Result;
|
|
319
|
+
/**
|
|
320
|
+
* Visit a parse tree produced by `PineV3Parser.id`.
|
|
321
|
+
* @param ctx the parse tree
|
|
322
|
+
* @return the visitor result
|
|
323
|
+
*/
|
|
324
|
+
visitId?: (ctx: IdContext) => Result;
|
|
325
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as antlr from "antlr4ng";
|
|
2
|
+
export declare class PineV4Lexer extends antlr.Lexer {
|
|
3
|
+
static readonly BEGIN = 1;
|
|
4
|
+
static readonly END = 2;
|
|
5
|
+
static readonly LEND = 3;
|
|
6
|
+
static readonly VAR = 4;
|
|
7
|
+
static readonly VARIP = 5;
|
|
8
|
+
static readonly SERIES = 6;
|
|
9
|
+
static readonly SIMPLE = 7;
|
|
10
|
+
static readonly CONST = 8;
|
|
11
|
+
static readonly INT_TYPE = 9;
|
|
12
|
+
static readonly FLOAT_TYPE = 10;
|
|
13
|
+
static readonly BOOL_TYPE = 11;
|
|
14
|
+
static readonly STRING_TYPE = 12;
|
|
15
|
+
static readonly COLOR_TYPE = 13;
|
|
16
|
+
static readonly LINE_TYPE = 14;
|
|
17
|
+
static readonly LABEL_TYPE = 15;
|
|
18
|
+
static readonly BOX_TYPE = 16;
|
|
19
|
+
static readonly TABLE_TYPE = 17;
|
|
20
|
+
static readonly PLUS_ASSIGN = 18;
|
|
21
|
+
static readonly MINUS_ASSIGN = 19;
|
|
22
|
+
static readonly MUL_ASSIGN = 20;
|
|
23
|
+
static readonly DIV_ASSIGN = 21;
|
|
24
|
+
static readonly MOD_ASSIGN = 22;
|
|
25
|
+
static readonly ASSIGN = 23;
|
|
26
|
+
static readonly LBEG = 24;
|
|
27
|
+
static readonly IF_COND = 25;
|
|
28
|
+
static readonly IF_COND_ELSE = 26;
|
|
29
|
+
static readonly FOR_STMT = 27;
|
|
30
|
+
static readonly FOR_STMT_TO = 28;
|
|
31
|
+
static readonly FOR_STMT_BY = 29;
|
|
32
|
+
static readonly BREAK = 30;
|
|
33
|
+
static readonly CONTINUE = 31;
|
|
34
|
+
static readonly OR = 32;
|
|
35
|
+
static readonly AND = 33;
|
|
36
|
+
static readonly NOT = 34;
|
|
37
|
+
static readonly BOOL_LITERAL = 35;
|
|
38
|
+
static readonly COND = 36;
|
|
39
|
+
static readonly COND_ELSE = 37;
|
|
40
|
+
static readonly EQ = 38;
|
|
41
|
+
static readonly NEQ = 39;
|
|
42
|
+
static readonly GT = 40;
|
|
43
|
+
static readonly GE = 41;
|
|
44
|
+
static readonly LT = 42;
|
|
45
|
+
static readonly LE = 43;
|
|
46
|
+
static readonly PLUS = 44;
|
|
47
|
+
static readonly MINUS = 45;
|
|
48
|
+
static readonly MUL = 46;
|
|
49
|
+
static readonly DIV = 47;
|
|
50
|
+
static readonly MOD = 48;
|
|
51
|
+
static readonly DEFINE = 49;
|
|
52
|
+
static readonly ARROW = 50;
|
|
53
|
+
static readonly COMMA = 51;
|
|
54
|
+
static readonly LPAR = 52;
|
|
55
|
+
static readonly RPAR = 53;
|
|
56
|
+
static readonly LSQBR = 54;
|
|
57
|
+
static readonly RSQBR = 55;
|
|
58
|
+
static readonly INT_LITERAL = 56;
|
|
59
|
+
static readonly FLOAT_LITERAL = 57;
|
|
60
|
+
static readonly STR_LITERAL = 58;
|
|
61
|
+
static readonly COLOR_LITERAL = 59;
|
|
62
|
+
static readonly ID = 60;
|
|
63
|
+
static readonly WS = 61;
|
|
64
|
+
static readonly LINE_COMMENT = 62;
|
|
65
|
+
static readonly BLOCK_COMMENT = 63;
|
|
66
|
+
static readonly DOT = 64;
|
|
67
|
+
static readonly channelNames: string[];
|
|
68
|
+
static readonly literalNames: string[];
|
|
69
|
+
static readonly symbolicNames: string[];
|
|
70
|
+
static readonly modeNames: string[];
|
|
71
|
+
static readonly ruleNames: string[];
|
|
72
|
+
constructor(input: antlr.CharStream);
|
|
73
|
+
get grammarFileName(): string;
|
|
74
|
+
get literalNames(): (string | null)[];
|
|
75
|
+
get symbolicNames(): (string | null)[];
|
|
76
|
+
get ruleNames(): string[];
|
|
77
|
+
get serializedATN(): number[];
|
|
78
|
+
get channelNames(): string[];
|
|
79
|
+
get modeNames(): string[];
|
|
80
|
+
static readonly _serializedATN: number[];
|
|
81
|
+
private static __ATN;
|
|
82
|
+
static get _ATN(): antlr.ATN;
|
|
83
|
+
private static readonly vocabulary;
|
|
84
|
+
get vocabulary(): antlr.Vocabulary;
|
|
85
|
+
private static readonly decisionsToDFA;
|
|
86
|
+
}
|