openpinescript 0.0.0-stage → 0.1.0

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 (103) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +346 -2
  3. package/dist/cli.mjs +108686 -0
  4. package/dist/index.cjs +108670 -0
  5. package/dist/index.mjs +108624 -0
  6. package/dist/types/index.d.ts +31 -0
  7. package/dist/types/parser/v1/generated/PineV1Lexer.d.ts +66 -0
  8. package/dist/types/parser/v1/generated/PineV1Parser.d.ts +555 -0
  9. package/dist/types/parser/v1/generated/PineV1ParserVisitor.d.ts +318 -0
  10. package/dist/types/parser/v1/index.d.ts +39 -0
  11. package/dist/types/parser/v2/generated/PineV2Lexer.d.ts +67 -0
  12. package/dist/types/parser/v2/generated/PineV2Parser.d.ts +568 -0
  13. package/dist/types/parser/v2/generated/PineV2ParserVisitor.d.ts +325 -0
  14. package/dist/types/parser/v2/index.d.ts +2 -0
  15. package/dist/types/parser/v3/generated/PineV3Lexer.d.ts +67 -0
  16. package/dist/types/parser/v3/generated/PineV3Parser.d.ts +568 -0
  17. package/dist/types/parser/v3/generated/PineV3ParserVisitor.d.ts +325 -0
  18. package/dist/types/parser/v3/index.d.ts +2 -0
  19. package/dist/types/parser/v4/generated/PineV4Lexer.d.ts +86 -0
  20. package/dist/types/parser/v4/generated/PineV4Parser.d.ts +673 -0
  21. package/dist/types/parser/v4/generated/PineV4ParserVisitor.d.ts +367 -0
  22. package/dist/types/parser/v4/index.d.ts +2 -0
  23. package/dist/types/parser/v5/generated/PineV5Lexer.d.ts +95 -0
  24. package/dist/types/parser/v5/generated/PineV5Parser.d.ts +964 -0
  25. package/dist/types/parser/v5/generated/PineV5ParserVisitor.d.ts +521 -0
  26. package/dist/types/parser/v5/index.d.ts +2 -0
  27. package/dist/types/parser/v6/generated/PineV6Lexer.d.ts +98 -0
  28. package/dist/types/parser/v6/generated/PineV6Parser.d.ts +984 -0
  29. package/dist/types/parser/v6/generated/PineV6ParserVisitor.d.ts +528 -0
  30. package/dist/types/parser/v6/index.d.ts +2 -0
  31. package/dist/types/runtime/v1/Series.d.ts +61 -0
  32. package/dist/types/runtime/v1/broker/Broker.d.ts +325 -0
  33. package/dist/types/runtime/v1/broker/index.d.ts +158 -0
  34. package/dist/types/runtime/v1/broker/val.d.ts +28 -0
  35. package/dist/types/runtime/v1/constDefault.d.ts +11 -0
  36. package/dist/types/runtime/v1/context.d.ts +1705 -0
  37. package/dist/types/runtime/v1/footprint.d.ts +32 -0
  38. package/dist/types/runtime/v1/index.d.ts +7 -0
  39. package/dist/types/runtime/v1/language-spec.d.ts +12 -0
  40. package/dist/types/runtime/v1/openTrades.d.ts +12 -0
  41. package/dist/types/runtime/v1/palette.d.ts +18 -0
  42. package/dist/types/runtime/v1/session.d.ts +482 -0
  43. package/dist/types/runtime/v1/sessions.d.ts +31 -0
  44. package/dist/types/runtime/v1/stateClone.d.ts +19 -0
  45. package/dist/types/runtime/v1/stdlib/alerts.d.ts +31 -0
  46. package/dist/types/runtime/v1/stdlib/arrays.d.ts +133 -0
  47. package/dist/types/runtime/v1/stdlib/barmerge.d.ts +27 -0
  48. package/dist/types/runtime/v1/stdlib/barstate.d.ts +79 -0
  49. package/dist/types/runtime/v1/stdlib/cast.d.ts +81 -0
  50. package/dist/types/runtime/v1/stdlib/chart.d.ts +283 -0
  51. package/dist/types/runtime/v1/stdlib/color.d.ts +51 -0
  52. package/dist/types/runtime/v1/stdlib/core.d.ts +162 -0
  53. package/dist/types/runtime/v1/stdlib/dataset.d.ts +36 -0
  54. package/dist/types/runtime/v1/stdlib/display.d.ts +50 -0
  55. package/dist/types/runtime/v1/stdlib/drawings.d.ts +407 -0
  56. package/dist/types/runtime/v1/stdlib/errors.d.ts +21 -0
  57. package/dist/types/runtime/v1/stdlib/font.d.ts +20 -0
  58. package/dist/types/runtime/v1/stdlib/footprint.d.ts +76 -0
  59. package/dist/types/runtime/v1/stdlib/format.d.ts +57 -0
  60. package/dist/types/runtime/v1/stdlib/index.d.ts +71 -0
  61. package/dist/types/runtime/v1/stdlib/input.d.ts +14 -0
  62. package/dist/types/runtime/v1/stdlib/inputs.d.ts +60 -0
  63. package/dist/types/runtime/v1/stdlib/late_members.d.ts +97 -0
  64. package/dist/types/runtime/v1/stdlib/logging.d.ts +31 -0
  65. package/dist/types/runtime/v1/stdlib/maps.d.ts +55 -0
  66. package/dist/types/runtime/v1/stdlib/math.d.ts +71 -0
  67. package/dist/types/runtime/v1/stdlib/matrix.d.ts +201 -0
  68. package/dist/types/runtime/v1/stdlib/metadata.d.ts +14 -0
  69. package/dist/types/runtime/v1/stdlib/mtf.d.ts +15 -0
  70. package/dist/types/runtime/v1/stdlib/renames.d.ts +117 -0
  71. package/dist/types/runtime/v1/stdlib/renames5.d.ts +113 -0
  72. package/dist/types/runtime/v1/stdlib/renames6.d.ts +81 -0
  73. package/dist/types/runtime/v1/stdlib/request.d.ts +207 -0
  74. package/dist/types/runtime/v1/stdlib/scale.d.ts +19 -0
  75. package/dist/types/runtime/v1/stdlib/session.d.ts +113 -0
  76. package/dist/types/runtime/v1/stdlib/sort_field.d.ts +12 -0
  77. package/dist/types/runtime/v1/stdlib/sources.d.ts +24 -0
  78. package/dist/types/runtime/v1/stdlib/str.d.ts +117 -0
  79. package/dist/types/runtime/v1/stdlib/strategy.d.ts +314 -0
  80. package/dist/types/runtime/v1/stdlib/syminfo.d.ts +209 -0
  81. package/dist/types/runtime/v1/stdlib/ta.d.ts +409 -0
  82. package/dist/types/runtime/v1/stdlib/time.d.ts +158 -0
  83. package/dist/types/runtime/v1/stdlib/trades.d.ts +108 -0
  84. package/dist/types/runtime/v1/stdlib/ui.d.ts +196 -0
  85. package/dist/types/runtime/v1/stdlib/v6_members.d.ts +68 -0
  86. package/dist/types/runtime/v1/timeframes.d.ts +139 -0
  87. package/dist/types/runtime/v1/zones.d.ts +30 -0
  88. package/dist/types/transpiler/common/index.d.ts +51 -0
  89. package/dist/types/transpiler/common/libraries.d.ts +29 -0
  90. package/dist/types/transpiler/common/parseErrors.d.ts +38 -0
  91. package/dist/types/transpiler/common/passes/ScopeAnalysis.d.ts +158 -0
  92. package/dist/types/transpiler/common/passes/TypeRules.d.ts +26 -0
  93. package/dist/types/transpiler/common/profiles/index.d.ts +96 -0
  94. package/dist/types/transpiler/common/version.d.ts +40 -0
  95. package/dist/types/transpiler/v1/ToJsVisitor.d.ts +720 -0
  96. package/dist/types/transpiler/v2/ToJsVisitor.d.ts +72 -0
  97. package/dist/types/transpiler/v3/ToJsVisitor.d.ts +87 -0
  98. package/dist/types/transpiler/v4/ToJsVisitor.d.ts +263 -0
  99. package/dist/types/transpiler/v5/ToJsVisitor.d.ts +1101 -0
  100. package/dist/types/transpiler/v6/ToJsVisitor.d.ts +237 -0
  101. package/dist/types/transpiler/v6/rules.d.ts +94 -0
  102. package/dist/types/utils/v2/common.d.ts +4 -0
  103. package/package.json +92 -4
@@ -0,0 +1,521 @@
1
+ import { ParseTreeVisitor } from "antlr4ng";
2
+ import { While_exprContext } from "./PineV5Parser.js";
3
+ import { Switch_exprContext } from "./PineV5Parser.js";
4
+ import { Switch_bodyContext } from "./PineV5Parser.js";
5
+ import { Switch_caseContext } from "./PineV5Parser.js";
6
+ import { Field_typeContext } from "./PineV5Parser.js";
7
+ import { Type_def_stmtContext } from "./PineV5Parser.js";
8
+ import { Type_bodyContext } from "./PineV5Parser.js";
9
+ import { Type_fieldContext } from "./PineV5Parser.js";
10
+ import { Method_def_stmtContext } from "./PineV5Parser.js";
11
+ import { Enum_def_stmtContext } from "./PineV5Parser.js";
12
+ import { Enum_bodyContext } from "./PineV5Parser.js";
13
+ import { Enum_fieldContext } from "./PineV5Parser.js";
14
+ import { Export_stmtContext } from "./PineV5Parser.js";
15
+ import { Import_stmtContext } from "./PineV5Parser.js";
16
+ import { Import_pathContext } from "./PineV5Parser.js";
17
+ import { Import_userContext } from "./PineV5Parser.js";
18
+ import { User_partContext } from "./PineV5Parser.js";
19
+ import { Fun_paramContext } from "./PineV5Parser.js";
20
+ import { Type_argsContext } from "./PineV5Parser.js";
21
+ import { Type_argContext } from "./PineV5Parser.js";
22
+ import { For_in_exprContext } from "./PineV5Parser.js";
23
+ import { Call_suffixContext } from "./PineV5Parser.js";
24
+ import { Fun_callContext } from "./PineV5Parser.js";
25
+ import { AtomContext } from "./PineV5Parser.js";
26
+ import { IdContext } from "./PineV5Parser.js";
27
+ import { StmtContext } from "./PineV5Parser.js";
28
+ import { Fun_headContext } from "./PineV5Parser.js";
29
+ import { Var_defContext } from "./PineV5Parser.js";
30
+ import { Var_defsContext } from "./PineV5Parser.js";
31
+ import { Id_partContext } from "./PineV5Parser.js";
32
+ import { Global_stmt_contentContext } from "./PineV5Parser.js";
33
+ import { Local_stmt_contentContext } from "./PineV5Parser.js";
34
+ import { Arith_exprContext } from "./PineV5Parser.js";
35
+ import { Decl_modContext } from "./PineV5Parser.js";
36
+ import { Type_qualContext } from "./PineV5Parser.js";
37
+ import { Type_nameContext } from "./PineV5Parser.js";
38
+ import { Compound_assign_opContext } from "./PineV5Parser.js";
39
+ import { Var_assignContext } from "./PineV5Parser.js";
40
+ import { If_exprContext } from "./PineV5Parser.js";
41
+ import { Pos_argContext } from "./PineV5Parser.js";
42
+ import { Pos_argsContext } from "./PineV5Parser.js";
43
+ import { Pine_scriptContext } from "./PineV5Parser.js";
44
+ import { Global_stmtContext } from "./PineV5Parser.js";
45
+ import { Fun_def_stmtContext } from "./PineV5Parser.js";
46
+ import { Fun_def_singlelineContext } from "./PineV5Parser.js";
47
+ import { Fun_def_multilineContext } from "./PineV5Parser.js";
48
+ import { Fun_body_singlelineContext } from "./PineV5Parser.js";
49
+ import { Local_stmt_singlelineContext } from "./PineV5Parser.js";
50
+ import { Loop_breakContext } from "./PineV5Parser.js";
51
+ import { Loop_continueContext } from "./PineV5Parser.js";
52
+ import { Fun_body_multilineContext } from "./PineV5Parser.js";
53
+ import { Local_stmts_multilineContext } from "./PineV5Parser.js";
54
+ import { Local_stmts_listContext } from "./PineV5Parser.js";
55
+ import { Local_stmt_multilineContext } from "./PineV5Parser.js";
56
+ import { Ids_arrayContext } from "./PineV5Parser.js";
57
+ import { Arith_exprsContext } from "./PineV5Parser.js";
58
+ import { For_exprContext } from "./PineV5Parser.js";
59
+ import { Stmts_blockContext } from "./PineV5Parser.js";
60
+ import { Ternary_exprContext } from "./PineV5Parser.js";
61
+ import { Or_exprContext } from "./PineV5Parser.js";
62
+ import { And_exprContext } from "./PineV5Parser.js";
63
+ import { Eq_exprContext } from "./PineV5Parser.js";
64
+ import { Cmp_exprContext } from "./PineV5Parser.js";
65
+ import { Add_exprContext } from "./PineV5Parser.js";
66
+ import { Mult_exprContext } from "./PineV5Parser.js";
67
+ import { Unary_exprContext } from "./PineV5Parser.js";
68
+ import { Sqbr_exprContext } from "./PineV5Parser.js";
69
+ import { Fun_actual_argsContext } from "./PineV5Parser.js";
70
+ import { Kw_argsContext } from "./PineV5Parser.js";
71
+ import { Kw_argContext } from "./PineV5Parser.js";
72
+ import { LiteralContext } from "./PineV5Parser.js";
73
+ import { Num_literalContext } from "./PineV5Parser.js";
74
+ import { Other_literalContext } from "./PineV5Parser.js";
75
+ /**
76
+ * This interface defines a complete generic visitor for a parse tree produced
77
+ * by `PineV5Parser`.
78
+ *
79
+ * @param <Result> The return type of the visit operation. Use `void` for
80
+ * operations with no return type.
81
+ */
82
+ export declare class PineV5ParserVisitor<Result> extends ParseTreeVisitor<Result> {
83
+ /**
84
+ * Visit a parse tree produced by `PineV5Parser.while_expr`.
85
+ * @param ctx the parse tree
86
+ * @return the visitor result
87
+ */
88
+ visitWhile_expr?: (ctx: While_exprContext) => Result;
89
+ /**
90
+ * Visit a parse tree produced by `PineV5Parser.switch_expr`.
91
+ * @param ctx the parse tree
92
+ * @return the visitor result
93
+ */
94
+ visitSwitch_expr?: (ctx: Switch_exprContext) => Result;
95
+ /**
96
+ * Visit a parse tree produced by `PineV5Parser.switch_body`.
97
+ * @param ctx the parse tree
98
+ * @return the visitor result
99
+ */
100
+ visitSwitch_body?: (ctx: Switch_bodyContext) => Result;
101
+ /**
102
+ * Visit a parse tree produced by `PineV5Parser.switch_case`.
103
+ * @param ctx the parse tree
104
+ * @return the visitor result
105
+ */
106
+ visitSwitch_case?: (ctx: Switch_caseContext) => Result;
107
+ /**
108
+ * Visit a parse tree produced by `PineV5Parser.field_type`.
109
+ * @param ctx the parse tree
110
+ * @return the visitor result
111
+ */
112
+ visitField_type?: (ctx: Field_typeContext) => Result;
113
+ /**
114
+ * Visit a parse tree produced by `PineV5Parser.type_def_stmt`.
115
+ * @param ctx the parse tree
116
+ * @return the visitor result
117
+ */
118
+ visitType_def_stmt?: (ctx: Type_def_stmtContext) => Result;
119
+ /**
120
+ * Visit a parse tree produced by `PineV5Parser.type_body`.
121
+ * @param ctx the parse tree
122
+ * @return the visitor result
123
+ */
124
+ visitType_body?: (ctx: Type_bodyContext) => Result;
125
+ /**
126
+ * Visit a parse tree produced by `PineV5Parser.type_field`.
127
+ * @param ctx the parse tree
128
+ * @return the visitor result
129
+ */
130
+ visitType_field?: (ctx: Type_fieldContext) => Result;
131
+ /**
132
+ * Visit a parse tree produced by `PineV5Parser.method_def_stmt`.
133
+ * @param ctx the parse tree
134
+ * @return the visitor result
135
+ */
136
+ visitMethod_def_stmt?: (ctx: Method_def_stmtContext) => Result;
137
+ /**
138
+ * Visit a parse tree produced by `PineV5Parser.enum_def_stmt`.
139
+ * @param ctx the parse tree
140
+ * @return the visitor result
141
+ */
142
+ visitEnum_def_stmt?: (ctx: Enum_def_stmtContext) => Result;
143
+ /**
144
+ * Visit a parse tree produced by `PineV5Parser.enum_body`.
145
+ * @param ctx the parse tree
146
+ * @return the visitor result
147
+ */
148
+ visitEnum_body?: (ctx: Enum_bodyContext) => Result;
149
+ /**
150
+ * Visit a parse tree produced by `PineV5Parser.enum_field`.
151
+ * @param ctx the parse tree
152
+ * @return the visitor result
153
+ */
154
+ visitEnum_field?: (ctx: Enum_fieldContext) => Result;
155
+ /**
156
+ * Visit a parse tree produced by `PineV5Parser.export_stmt`.
157
+ * @param ctx the parse tree
158
+ * @return the visitor result
159
+ */
160
+ visitExport_stmt?: (ctx: Export_stmtContext) => Result;
161
+ /**
162
+ * Visit a parse tree produced by `PineV5Parser.import_stmt`.
163
+ * @param ctx the parse tree
164
+ * @return the visitor result
165
+ */
166
+ visitImport_stmt?: (ctx: Import_stmtContext) => Result;
167
+ /**
168
+ * Visit a parse tree produced by `PineV5Parser.import_path`.
169
+ * @param ctx the parse tree
170
+ * @return the visitor result
171
+ */
172
+ visitImport_path?: (ctx: Import_pathContext) => Result;
173
+ /**
174
+ * Visit a parse tree produced by `PineV5Parser.import_user`.
175
+ * @param ctx the parse tree
176
+ * @return the visitor result
177
+ */
178
+ visitImport_user?: (ctx: Import_userContext) => Result;
179
+ /**
180
+ * Visit a parse tree produced by `PineV5Parser.user_part`.
181
+ * @param ctx the parse tree
182
+ * @return the visitor result
183
+ */
184
+ visitUser_part?: (ctx: User_partContext) => Result;
185
+ /**
186
+ * Visit a parse tree produced by `PineV5Parser.fun_param`.
187
+ * @param ctx the parse tree
188
+ * @return the visitor result
189
+ */
190
+ visitFun_param?: (ctx: Fun_paramContext) => Result;
191
+ /**
192
+ * Visit a parse tree produced by `PineV5Parser.type_args`.
193
+ * @param ctx the parse tree
194
+ * @return the visitor result
195
+ */
196
+ visitType_args?: (ctx: Type_argsContext) => Result;
197
+ /**
198
+ * Visit a parse tree produced by `PineV5Parser.type_arg`.
199
+ * @param ctx the parse tree
200
+ * @return the visitor result
201
+ */
202
+ visitType_arg?: (ctx: Type_argContext) => Result;
203
+ /**
204
+ * Visit a parse tree produced by `PineV5Parser.for_in_expr`.
205
+ * @param ctx the parse tree
206
+ * @return the visitor result
207
+ */
208
+ visitFor_in_expr?: (ctx: For_in_exprContext) => Result;
209
+ /**
210
+ * Visit a parse tree produced by `PineV5Parser.call_suffix`.
211
+ * @param ctx the parse tree
212
+ * @return the visitor result
213
+ */
214
+ visitCall_suffix?: (ctx: Call_suffixContext) => Result;
215
+ /**
216
+ * Visit a parse tree produced by `PineV5Parser.fun_call`.
217
+ * @param ctx the parse tree
218
+ * @return the visitor result
219
+ */
220
+ visitFun_call?: (ctx: Fun_callContext) => Result;
221
+ /**
222
+ * Visit a parse tree produced by `PineV5Parser.atom`.
223
+ * @param ctx the parse tree
224
+ * @return the visitor result
225
+ */
226
+ visitAtom?: (ctx: AtomContext) => Result;
227
+ /**
228
+ * Visit a parse tree produced by `PineV5Parser.id`.
229
+ * @param ctx the parse tree
230
+ * @return the visitor result
231
+ */
232
+ visitId?: (ctx: IdContext) => Result;
233
+ /**
234
+ * Visit a parse tree produced by `PineV5Parser.stmt`.
235
+ * @param ctx the parse tree
236
+ * @return the visitor result
237
+ */
238
+ visitStmt?: (ctx: StmtContext) => Result;
239
+ /**
240
+ * Visit a parse tree produced by `PineV5Parser.fun_head`.
241
+ * @param ctx the parse tree
242
+ * @return the visitor result
243
+ */
244
+ visitFun_head?: (ctx: Fun_headContext) => Result;
245
+ /**
246
+ * Visit a parse tree produced by `PineV5Parser.var_def`.
247
+ * @param ctx the parse tree
248
+ * @return the visitor result
249
+ */
250
+ visitVar_def?: (ctx: Var_defContext) => Result;
251
+ /**
252
+ * Visit a parse tree produced by `PineV5Parser.var_defs`.
253
+ * @param ctx the parse tree
254
+ * @return the visitor result
255
+ */
256
+ visitVar_defs?: (ctx: Var_defsContext) => Result;
257
+ /**
258
+ * Visit a parse tree produced by `PineV5Parser.id_part`.
259
+ * @param ctx the parse tree
260
+ * @return the visitor result
261
+ */
262
+ visitId_part?: (ctx: Id_partContext) => Result;
263
+ /**
264
+ * Visit a parse tree produced by `PineV5Parser.global_stmt_content`.
265
+ * @param ctx the parse tree
266
+ * @return the visitor result
267
+ */
268
+ visitGlobal_stmt_content?: (ctx: Global_stmt_contentContext) => Result;
269
+ /**
270
+ * Visit a parse tree produced by `PineV5Parser.local_stmt_content`.
271
+ * @param ctx the parse tree
272
+ * @return the visitor result
273
+ */
274
+ visitLocal_stmt_content?: (ctx: Local_stmt_contentContext) => Result;
275
+ /**
276
+ * Visit a parse tree produced by `PineV5Parser.arith_expr`.
277
+ * @param ctx the parse tree
278
+ * @return the visitor result
279
+ */
280
+ visitArith_expr?: (ctx: Arith_exprContext) => Result;
281
+ /**
282
+ * Visit a parse tree produced by `PineV5Parser.decl_mod`.
283
+ * @param ctx the parse tree
284
+ * @return the visitor result
285
+ */
286
+ visitDecl_mod?: (ctx: Decl_modContext) => Result;
287
+ /**
288
+ * Visit a parse tree produced by `PineV5Parser.type_qual`.
289
+ * @param ctx the parse tree
290
+ * @return the visitor result
291
+ */
292
+ visitType_qual?: (ctx: Type_qualContext) => Result;
293
+ /**
294
+ * Visit a parse tree produced by `PineV5Parser.type_name`.
295
+ * @param ctx the parse tree
296
+ * @return the visitor result
297
+ */
298
+ visitType_name?: (ctx: Type_nameContext) => Result;
299
+ /**
300
+ * Visit a parse tree produced by `PineV5Parser.compound_assign_op`.
301
+ * @param ctx the parse tree
302
+ * @return the visitor result
303
+ */
304
+ visitCompound_assign_op?: (ctx: Compound_assign_opContext) => Result;
305
+ /**
306
+ * Visit a parse tree produced by `PineV5Parser.var_assign`.
307
+ * @param ctx the parse tree
308
+ * @return the visitor result
309
+ */
310
+ visitVar_assign?: (ctx: Var_assignContext) => Result;
311
+ /**
312
+ * Visit a parse tree produced by `PineV5Parser.if_expr`.
313
+ * @param ctx the parse tree
314
+ * @return the visitor result
315
+ */
316
+ visitIf_expr?: (ctx: If_exprContext) => Result;
317
+ /**
318
+ * Visit a parse tree produced by `PineV5Parser.pos_arg`.
319
+ * @param ctx the parse tree
320
+ * @return the visitor result
321
+ */
322
+ visitPos_arg?: (ctx: Pos_argContext) => Result;
323
+ /**
324
+ * Visit a parse tree produced by `PineV5Parser.pos_args`.
325
+ * @param ctx the parse tree
326
+ * @return the visitor result
327
+ */
328
+ visitPos_args?: (ctx: Pos_argsContext) => Result;
329
+ /**
330
+ * Visit a parse tree produced by `PineV5Parser.pine_script`.
331
+ * @param ctx the parse tree
332
+ * @return the visitor result
333
+ */
334
+ visitPine_script?: (ctx: Pine_scriptContext) => Result;
335
+ /**
336
+ * Visit a parse tree produced by `PineV5Parser.global_stmt`.
337
+ * @param ctx the parse tree
338
+ * @return the visitor result
339
+ */
340
+ visitGlobal_stmt?: (ctx: Global_stmtContext) => Result;
341
+ /**
342
+ * Visit a parse tree produced by `PineV5Parser.fun_def_stmt`.
343
+ * @param ctx the parse tree
344
+ * @return the visitor result
345
+ */
346
+ visitFun_def_stmt?: (ctx: Fun_def_stmtContext) => Result;
347
+ /**
348
+ * Visit a parse tree produced by `PineV5Parser.fun_def_singleline`.
349
+ * @param ctx the parse tree
350
+ * @return the visitor result
351
+ */
352
+ visitFun_def_singleline?: (ctx: Fun_def_singlelineContext) => Result;
353
+ /**
354
+ * Visit a parse tree produced by `PineV5Parser.fun_def_multiline`.
355
+ * @param ctx the parse tree
356
+ * @return the visitor result
357
+ */
358
+ visitFun_def_multiline?: (ctx: Fun_def_multilineContext) => Result;
359
+ /**
360
+ * Visit a parse tree produced by `PineV5Parser.fun_body_singleline`.
361
+ * @param ctx the parse tree
362
+ * @return the visitor result
363
+ */
364
+ visitFun_body_singleline?: (ctx: Fun_body_singlelineContext) => Result;
365
+ /**
366
+ * Visit a parse tree produced by `PineV5Parser.local_stmt_singleline`.
367
+ * @param ctx the parse tree
368
+ * @return the visitor result
369
+ */
370
+ visitLocal_stmt_singleline?: (ctx: Local_stmt_singlelineContext) => Result;
371
+ /**
372
+ * Visit a parse tree produced by `PineV5Parser.loop_break`.
373
+ * @param ctx the parse tree
374
+ * @return the visitor result
375
+ */
376
+ visitLoop_break?: (ctx: Loop_breakContext) => Result;
377
+ /**
378
+ * Visit a parse tree produced by `PineV5Parser.loop_continue`.
379
+ * @param ctx the parse tree
380
+ * @return the visitor result
381
+ */
382
+ visitLoop_continue?: (ctx: Loop_continueContext) => Result;
383
+ /**
384
+ * Visit a parse tree produced by `PineV5Parser.fun_body_multiline`.
385
+ * @param ctx the parse tree
386
+ * @return the visitor result
387
+ */
388
+ visitFun_body_multiline?: (ctx: Fun_body_multilineContext) => Result;
389
+ /**
390
+ * Visit a parse tree produced by `PineV5Parser.local_stmts_multiline`.
391
+ * @param ctx the parse tree
392
+ * @return the visitor result
393
+ */
394
+ visitLocal_stmts_multiline?: (ctx: Local_stmts_multilineContext) => Result;
395
+ /**
396
+ * Visit a parse tree produced by `PineV5Parser.local_stmts_list`.
397
+ * @param ctx the parse tree
398
+ * @return the visitor result
399
+ */
400
+ visitLocal_stmts_list?: (ctx: Local_stmts_listContext) => Result;
401
+ /**
402
+ * Visit a parse tree produced by `PineV5Parser.local_stmt_multiline`.
403
+ * @param ctx the parse tree
404
+ * @return the visitor result
405
+ */
406
+ visitLocal_stmt_multiline?: (ctx: Local_stmt_multilineContext) => Result;
407
+ /**
408
+ * Visit a parse tree produced by `PineV5Parser.ids_array`.
409
+ * @param ctx the parse tree
410
+ * @return the visitor result
411
+ */
412
+ visitIds_array?: (ctx: Ids_arrayContext) => Result;
413
+ /**
414
+ * Visit a parse tree produced by `PineV5Parser.arith_exprs`.
415
+ * @param ctx the parse tree
416
+ * @return the visitor result
417
+ */
418
+ visitArith_exprs?: (ctx: Arith_exprsContext) => Result;
419
+ /**
420
+ * Visit a parse tree produced by `PineV5Parser.for_expr`.
421
+ * @param ctx the parse tree
422
+ * @return the visitor result
423
+ */
424
+ visitFor_expr?: (ctx: For_exprContext) => Result;
425
+ /**
426
+ * Visit a parse tree produced by `PineV5Parser.stmts_block`.
427
+ * @param ctx the parse tree
428
+ * @return the visitor result
429
+ */
430
+ visitStmts_block?: (ctx: Stmts_blockContext) => Result;
431
+ /**
432
+ * Visit a parse tree produced by `PineV5Parser.ternary_expr`.
433
+ * @param ctx the parse tree
434
+ * @return the visitor result
435
+ */
436
+ visitTernary_expr?: (ctx: Ternary_exprContext) => Result;
437
+ /**
438
+ * Visit a parse tree produced by `PineV5Parser.or_expr`.
439
+ * @param ctx the parse tree
440
+ * @return the visitor result
441
+ */
442
+ visitOr_expr?: (ctx: Or_exprContext) => Result;
443
+ /**
444
+ * Visit a parse tree produced by `PineV5Parser.and_expr`.
445
+ * @param ctx the parse tree
446
+ * @return the visitor result
447
+ */
448
+ visitAnd_expr?: (ctx: And_exprContext) => Result;
449
+ /**
450
+ * Visit a parse tree produced by `PineV5Parser.eq_expr`.
451
+ * @param ctx the parse tree
452
+ * @return the visitor result
453
+ */
454
+ visitEq_expr?: (ctx: Eq_exprContext) => Result;
455
+ /**
456
+ * Visit a parse tree produced by `PineV5Parser.cmp_expr`.
457
+ * @param ctx the parse tree
458
+ * @return the visitor result
459
+ */
460
+ visitCmp_expr?: (ctx: Cmp_exprContext) => Result;
461
+ /**
462
+ * Visit a parse tree produced by `PineV5Parser.add_expr`.
463
+ * @param ctx the parse tree
464
+ * @return the visitor result
465
+ */
466
+ visitAdd_expr?: (ctx: Add_exprContext) => Result;
467
+ /**
468
+ * Visit a parse tree produced by `PineV5Parser.mult_expr`.
469
+ * @param ctx the parse tree
470
+ * @return the visitor result
471
+ */
472
+ visitMult_expr?: (ctx: Mult_exprContext) => Result;
473
+ /**
474
+ * Visit a parse tree produced by `PineV5Parser.unary_expr`.
475
+ * @param ctx the parse tree
476
+ * @return the visitor result
477
+ */
478
+ visitUnary_expr?: (ctx: Unary_exprContext) => Result;
479
+ /**
480
+ * Visit a parse tree produced by `PineV5Parser.sqbr_expr`.
481
+ * @param ctx the parse tree
482
+ * @return the visitor result
483
+ */
484
+ visitSqbr_expr?: (ctx: Sqbr_exprContext) => Result;
485
+ /**
486
+ * Visit a parse tree produced by `PineV5Parser.fun_actual_args`.
487
+ * @param ctx the parse tree
488
+ * @return the visitor result
489
+ */
490
+ visitFun_actual_args?: (ctx: Fun_actual_argsContext) => Result;
491
+ /**
492
+ * Visit a parse tree produced by `PineV5Parser.kw_args`.
493
+ * @param ctx the parse tree
494
+ * @return the visitor result
495
+ */
496
+ visitKw_args?: (ctx: Kw_argsContext) => Result;
497
+ /**
498
+ * Visit a parse tree produced by `PineV5Parser.kw_arg`.
499
+ * @param ctx the parse tree
500
+ * @return the visitor result
501
+ */
502
+ visitKw_arg?: (ctx: Kw_argContext) => Result;
503
+ /**
504
+ * Visit a parse tree produced by `PineV5Parser.literal`.
505
+ * @param ctx the parse tree
506
+ * @return the visitor result
507
+ */
508
+ visitLiteral?: (ctx: LiteralContext) => Result;
509
+ /**
510
+ * Visit a parse tree produced by `PineV5Parser.num_literal`.
511
+ * @param ctx the parse tree
512
+ * @return the visitor result
513
+ */
514
+ visitNum_literal?: (ctx: Num_literalContext) => Result;
515
+ /**
516
+ * Visit a parse tree produced by `PineV5Parser.other_literal`.
517
+ * @param ctx the parse tree
518
+ * @return the visitor result
519
+ */
520
+ visitOther_literal?: (ctx: Other_literalContext) => Result;
521
+ }
@@ -0,0 +1,2 @@
1
+ export type { ParserError, ParseResult } from "../v1/index.js";
2
+ export declare const parse: (source: string) => import("./index.js").ParseResult<import("./generated/PineV5Parser.js").Pine_scriptContext>;
@@ -0,0 +1,98 @@
1
+ import * as antlr from "antlr4ng";
2
+ export declare class PineV6Lexer extends antlr.Lexer {
3
+ static readonly BEGIN = 1;
4
+ static readonly END = 2;
5
+ static readonly LEND = 3;
6
+ static readonly ONCE = 4;
7
+ static readonly MLSTRING_DQ = 5;
8
+ static readonly MLSTRING_SQ = 6;
9
+ static readonly WHILE = 7;
10
+ static readonly SWITCH = 8;
11
+ static readonly TYPE = 9;
12
+ static readonly METHOD = 10;
13
+ static readonly IMPORT = 11;
14
+ static readonly EXPORT = 12;
15
+ static readonly ENUM = 13;
16
+ static readonly AS = 14;
17
+ static readonly IN = 15;
18
+ static readonly VAR = 16;
19
+ static readonly VARIP = 17;
20
+ static readonly SERIES = 18;
21
+ static readonly SIMPLE = 19;
22
+ static readonly CONST = 20;
23
+ static readonly INT_TYPE = 21;
24
+ static readonly FLOAT_TYPE = 22;
25
+ static readonly BOOL_TYPE = 23;
26
+ static readonly STRING_TYPE = 24;
27
+ static readonly COLOR_TYPE = 25;
28
+ static readonly LINE_TYPE = 26;
29
+ static readonly LABEL_TYPE = 27;
30
+ static readonly BOX_TYPE = 28;
31
+ static readonly TABLE_TYPE = 29;
32
+ static readonly PLUS_ASSIGN = 30;
33
+ static readonly MINUS_ASSIGN = 31;
34
+ static readonly MUL_ASSIGN = 32;
35
+ static readonly DIV_ASSIGN = 33;
36
+ static readonly MOD_ASSIGN = 34;
37
+ static readonly ASSIGN = 35;
38
+ static readonly LBEG = 36;
39
+ static readonly IF_COND = 37;
40
+ static readonly IF_COND_ELSE = 38;
41
+ static readonly FOR_STMT = 39;
42
+ static readonly FOR_STMT_TO = 40;
43
+ static readonly FOR_STMT_BY = 41;
44
+ static readonly BREAK = 42;
45
+ static readonly CONTINUE = 43;
46
+ static readonly OR = 44;
47
+ static readonly AND = 45;
48
+ static readonly NOT = 46;
49
+ static readonly BOOL_LITERAL = 47;
50
+ static readonly COND = 48;
51
+ static readonly COND_ELSE = 49;
52
+ static readonly EQ = 50;
53
+ static readonly NEQ = 51;
54
+ static readonly GT = 52;
55
+ static readonly GE = 53;
56
+ static readonly LT = 54;
57
+ static readonly LE = 55;
58
+ static readonly PLUS = 56;
59
+ static readonly MINUS = 57;
60
+ static readonly MUL = 58;
61
+ static readonly DIV = 59;
62
+ static readonly MOD = 60;
63
+ static readonly DEFINE = 61;
64
+ static readonly ARROW = 62;
65
+ static readonly COMMA = 63;
66
+ static readonly LPAR = 64;
67
+ static readonly RPAR = 65;
68
+ static readonly LSQBR = 66;
69
+ static readonly RSQBR = 67;
70
+ static readonly INT_LITERAL = 68;
71
+ static readonly FLOAT_LITERAL = 69;
72
+ static readonly STR_LITERAL = 70;
73
+ static readonly COLOR_LITERAL = 71;
74
+ static readonly ID = 72;
75
+ static readonly WS = 73;
76
+ static readonly LINE_COMMENT = 74;
77
+ static readonly BLOCK_COMMENT = 75;
78
+ static readonly DOT = 76;
79
+ static readonly channelNames: string[];
80
+ static readonly literalNames: string[];
81
+ static readonly symbolicNames: string[];
82
+ static readonly modeNames: string[];
83
+ static readonly ruleNames: string[];
84
+ constructor(input: antlr.CharStream);
85
+ get grammarFileName(): string;
86
+ get literalNames(): (string | null)[];
87
+ get symbolicNames(): (string | null)[];
88
+ get ruleNames(): string[];
89
+ get serializedATN(): number[];
90
+ get channelNames(): string[];
91
+ get modeNames(): string[];
92
+ static readonly _serializedATN: number[];
93
+ private static __ATN;
94
+ static get _ATN(): antlr.ATN;
95
+ private static readonly vocabulary;
96
+ get vocabulary(): antlr.Vocabulary;
97
+ private static readonly decisionsToDFA;
98
+ }