@irrelon/battlescript 3.2.6 → 4.0.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 (125) hide show
  1. package/bin/functionality.ts +16 -3
  2. package/bin/index.js +3767 -2232
  3. package/bin/index.js.map +1 -1
  4. package/dist/bin/functionality.cjs +43245 -0
  5. package/dist/bin/functionality.cjs.map +1 -0
  6. package/dist/bin/functionality.d.ts +5 -0
  7. package/dist/bin/functionality.d.ts.map +1 -1
  8. package/dist/bin/functionality.js +3769 -2234
  9. package/dist/bin/functionality.js.map +1 -1
  10. package/dist/exports/index.d.ts +0 -1
  11. package/dist/exports/index.d.ts.map +1 -1
  12. package/dist/exports/typescript/enums/EnumNodeKind.d.ts +50 -46
  13. package/dist/exports/typescript/enums/EnumNodeKind.d.ts.map +1 -1
  14. package/dist/exports/typescript/enums/EnumNodeProp.d.ts +54 -46
  15. package/dist/exports/typescript/enums/EnumNodeProp.d.ts.map +1 -1
  16. package/dist/exports/typescript/helpers/miniAstLayout.d.ts.map +1 -1
  17. package/dist/index.cjs +4280 -2448
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.mjs +4237 -2422
  20. package/dist/index.mjs.map +1 -1
  21. package/dist/scripts/exportGen/enums/generateEnums.d.ts.map +1 -1
  22. package/dist/services/fullAst/BattleScriptFromAST.d.ts +6 -2
  23. package/dist/services/fullAst/BattleScriptFromAST.d.ts.map +1 -1
  24. package/dist/services/fullAst/BattleScriptToAST.d.ts +10 -3
  25. package/dist/services/fullAst/BattleScriptToAST.d.ts.map +1 -1
  26. package/dist/services/grammar/ts/language/BattleScriptLexer.d.ts +102 -101
  27. package/dist/services/grammar/ts/language/BattleScriptLexer.d.ts.map +1 -1
  28. package/dist/services/grammar/ts/language/BattleScriptListener.d.ts +59 -15
  29. package/dist/services/grammar/ts/language/BattleScriptListener.d.ts.map +1 -1
  30. package/dist/services/grammar/ts/language/BattleScriptParser.d.ts +276 -213
  31. package/dist/services/grammar/ts/language/BattleScriptParser.d.ts.map +1 -1
  32. package/dist/services/grammar/ts/language/BattleScriptVisitor.d.ts +37 -9
  33. package/dist/services/grammar/ts/language/BattleScriptVisitor.d.ts.map +1 -1
  34. package/dist/services/index.d.ts +2 -0
  35. package/dist/services/index.d.ts.map +1 -1
  36. package/dist/services/miniAst/BattleScriptToMiniAST.d.ts +8 -0
  37. package/dist/services/miniAst/BattleScriptToMiniAST.d.ts.map +1 -1
  38. package/dist/services/miniAst/binaryReader.d.ts.map +1 -1
  39. package/dist/services/miniAst/binaryWriter.d.ts.map +1 -1
  40. package/dist/services/miniAst/index.d.ts +0 -1
  41. package/dist/services/miniAst/index.d.ts.map +1 -1
  42. package/dist/services/miniAst/miniAstLayout.d.ts.map +1 -1
  43. package/dist/services/moduleResolver.d.ts +151 -0
  44. package/dist/services/moduleResolver.d.ts.map +1 -0
  45. package/dist/services/treeShaker/DependencyAnalyzer.d.ts +38 -0
  46. package/dist/services/treeShaker/DependencyAnalyzer.d.ts.map +1 -0
  47. package/dist/services/treeShaker/EntryPointCollector.d.ts +17 -0
  48. package/dist/services/treeShaker/EntryPointCollector.d.ts.map +1 -0
  49. package/dist/services/treeShaker/TreeShaker.d.ts +17 -0
  50. package/dist/services/treeShaker/TreeShaker.d.ts.map +1 -0
  51. package/dist/services/treeShaker/index.d.ts +6 -0
  52. package/dist/services/treeShaker/index.d.ts.map +1 -0
  53. package/dist/services/treeShaker/treeShake.d.ts +12 -0
  54. package/dist/services/treeShaker/treeShake.d.ts.map +1 -0
  55. package/dist/services/treeShaker/types.d.ts +50 -0
  56. package/dist/services/treeShaker/types.d.ts.map +1 -0
  57. package/dist/tests/ast/export.test.d.ts +2 -0
  58. package/dist/tests/ast/export.test.d.ts.map +1 -0
  59. package/dist/tests/ast/import.test.d.ts +2 -0
  60. package/dist/tests/ast/import.test.d.ts.map +1 -0
  61. package/dist/tests/ast/moduleResolver.test.d.ts +2 -0
  62. package/dist/tests/ast/moduleResolver.test.d.ts.map +1 -0
  63. package/dist/tests/ast/tree-shaking.test.d.ts +2 -0
  64. package/dist/tests/ast/tree-shaking.test.d.ts.map +1 -0
  65. package/dist/tsconfig.types.tsbuildinfo +1 -1
  66. package/dist/types/BattleScriptTransformerOptions.d.ts +1 -0
  67. package/dist/types/BattleScriptTransformerOptions.d.ts.map +1 -1
  68. package/dist/types/MiniAstJson.d.ts +18 -1
  69. package/dist/types/MiniAstJson.d.ts.map +1 -1
  70. package/dist/types/TokenMetaData.d.ts +2 -0
  71. package/dist/types/TokenMetaData.d.ts.map +1 -1
  72. package/dist/types/ast/nodes/AstNode.d.ts +2 -2
  73. package/dist/types/ast/nodes/AstNode.d.ts.map +1 -1
  74. package/dist/types/ast/nodes/AstNodeBase.d.ts +2 -0
  75. package/dist/types/ast/nodes/AstNodeBase.d.ts.map +1 -1
  76. package/dist/types/ast/nodes/ConstantDeclarationNode.d.ts +2 -1
  77. package/dist/types/ast/nodes/ConstantDeclarationNode.d.ts.map +1 -1
  78. package/dist/types/ast/nodes/EndStatementNode.d.ts +1 -0
  79. package/dist/types/ast/nodes/EndStatementNode.d.ts.map +1 -1
  80. package/dist/types/ast/nodes/EnumDeclarationNode.d.ts +2 -1
  81. package/dist/types/ast/nodes/EnumDeclarationNode.d.ts.map +1 -1
  82. package/dist/types/ast/nodes/ExportNamedDeclarationNode.d.ts +32 -0
  83. package/dist/types/ast/nodes/ExportNamedDeclarationNode.d.ts.map +1 -0
  84. package/dist/types/ast/nodes/ExportSpecifierNode.d.ts +27 -0
  85. package/dist/types/ast/nodes/ExportSpecifierNode.d.ts.map +1 -0
  86. package/dist/types/ast/nodes/FunctionDeclarationNode.d.ts +2 -1
  87. package/dist/types/ast/nodes/FunctionDeclarationNode.d.ts.map +1 -1
  88. package/dist/types/ast/nodes/FunctionDefinitionNode.d.ts +2 -1
  89. package/dist/types/ast/nodes/FunctionDefinitionNode.d.ts.map +1 -1
  90. package/dist/types/ast/nodes/ImportDeclarationNode.d.ts +4 -2
  91. package/dist/types/ast/nodes/ImportDeclarationNode.d.ts.map +1 -1
  92. package/dist/types/ast/nodes/ImportSpecifierNode.d.ts +27 -0
  93. package/dist/types/ast/nodes/ImportSpecifierNode.d.ts.map +1 -0
  94. package/dist/types/ast/nodes/IncludeStatementNode.d.ts +13 -0
  95. package/dist/types/ast/nodes/IncludeStatementNode.d.ts.map +1 -0
  96. package/dist/types/ast/nodes/InterfaceNode.d.ts +2 -1
  97. package/dist/types/ast/nodes/InterfaceNode.d.ts.map +1 -1
  98. package/dist/types/ast/nodes/OffsetStatementNode.d.ts.map +1 -1
  99. package/dist/types/ast/nodes/ParityDeclarationNode.d.ts +12 -0
  100. package/dist/types/ast/nodes/ParityDeclarationNode.d.ts.map +1 -0
  101. package/dist/types/ast/nodes/ProtocolOpStatementNode.d.ts +1 -1
  102. package/dist/types/ast/nodes/ProtocolOpStatementNode.d.ts.map +1 -1
  103. package/dist/types/ast/nodes/ProtocolReadTypeNode.d.ts +1 -1
  104. package/dist/types/ast/nodes/ProtocolReadTypeNode.d.ts.map +1 -1
  105. package/dist/types/ast/nodes/RootNode.d.ts +1 -0
  106. package/dist/types/ast/nodes/RootNode.d.ts.map +1 -1
  107. package/dist/types/ast/nodes/RuleStatementNode.d.ts +4 -4
  108. package/dist/types/ast/nodes/RuleStatementNode.d.ts.map +1 -1
  109. package/dist/types/ast/nodes/StateDeclarationNode.d.ts +2 -1
  110. package/dist/types/ast/nodes/StateDeclarationNode.d.ts.map +1 -1
  111. package/dist/types/ast/nodes/VariableDeclarationNode.d.ts +2 -1
  112. package/dist/types/ast/nodes/VariableDeclarationNode.d.ts.map +1 -1
  113. package/dist/types/ast/nodes/index.d.ts +5 -1
  114. package/dist/types/ast/nodes/index.d.ts.map +1 -1
  115. package/package.json +77 -72
  116. package/dist/exports/typescript/enums/EnumOpCode.d.ts +0 -28
  117. package/dist/exports/typescript/enums/EnumOpCode.d.ts.map +0 -1
  118. package/dist/scripts/exportGen/enums/opCodes.d.ts +0 -2
  119. package/dist/scripts/exportGen/enums/opCodes.d.ts.map +0 -1
  120. package/dist/services/miniAst/miniAstInterpreter.d.ts +0 -17
  121. package/dist/services/miniAst/miniAstInterpreter.d.ts.map +0 -1
  122. package/dist/types/ast/nodes/EventDeclarationNode.d.ts +0 -15
  123. package/dist/types/ast/nodes/EventDeclarationNode.d.ts.map +0 -1
  124. package/dist/types/ast/nodes/ParityStatementNode.d.ts +0 -12
  125. package/dist/types/ast/nodes/ParityStatementNode.d.ts.map +0 -1
@@ -15,205 +15,210 @@ export declare class BattleScriptParser extends Parser {
15
15
  static readonly PURE = 4;
16
16
  static readonly DECLARE = 5;
17
17
  static readonly IMPORT = 6;
18
- static readonly EXPORT = 7;
19
- static readonly USE = 8;
20
- static readonly FROM = 9;
21
- static readonly NAMESPACE = 10;
22
- static readonly PROGRAM = 11;
23
- static readonly EXPOSE = 12;
24
- static readonly GROUP = 13;
25
- static readonly DEFAULT = 14;
26
- static readonly SWITCH = 15;
27
- static readonly FUNCTION = 16;
28
- static readonly INTERFACE = 17;
29
- static readonly EXTENDS = 18;
30
- static readonly STATE = 19;
31
- static readonly MODULE = 20;
32
- static readonly EVENT = 21;
33
- static readonly IF = 22;
34
- static readonly ELSE = 23;
35
- static readonly RETURN = 24;
36
- static readonly EVERY = 25;
37
- static readonly LIMIT = 26;
38
- static readonly AFTER = 27;
39
- static readonly CANCEL = 28;
40
- static readonly FOR = 29;
41
- static readonly EVALUATE = 30;
42
- static readonly CASE = 31;
43
- static readonly BREAK = 32;
44
- static readonly CONTINUE = 33;
45
- static readonly FALLBACK = 34;
46
- static readonly CATCH = 35;
47
- static readonly AS = 36;
48
- static readonly ENUM = 37;
49
- static readonly ANY = 38;
50
- static readonly PROTOCOL = 39;
51
- static readonly DEFINE = 40;
52
- static readonly REQUIRE = 41;
53
- static readonly TERMINATE = 42;
54
- static readonly STEP = 43;
55
- static readonly DECODE = 44;
56
- static readonly ENCODE = 45;
57
- static readonly END = 46;
58
- static readonly FORWARD = 47;
59
- static readonly REWIND = 48;
60
- static readonly OFFSET = 49;
61
- static readonly XOR = 50;
62
- static readonly XNOR = 51;
63
- static readonly BITS = 52;
64
- static readonly BYTES = 53;
65
- static readonly RULE = 54;
66
- static readonly PARITY = 55;
67
- static readonly CONST = 56;
68
- static readonly TYPE_OBJECT = 57;
69
- static readonly TYPE_ARRAY = 58;
70
- static readonly TYPE_STRING = 59;
71
- static readonly TYPE_INT = 60;
72
- static readonly TYPE_UINT = 61;
73
- static readonly TYPE_FLOAT = 62;
74
- static readonly TYPE_DOUBLE = 63;
75
- static readonly TYPE_BOOLEAN = 64;
76
- static readonly TYPE_NULL = 65;
77
- static readonly TYPE_VOID = 66;
78
- static readonly TYPE_UNDEFINED = 67;
79
- static readonly NUMBER = 68;
80
- static readonly BOOLEAN = 69;
81
- static readonly STRING = 70;
82
- static readonly COMMENT = 71;
83
- static readonly ARROW_OPERATOR = 72;
84
- static readonly INCREMENT = 73;
85
- static readonly DECREMENT = 74;
86
- static readonly PLUS = 75;
87
- static readonly MINUS = 76;
88
- static readonly DIVIDE = 77;
89
- static readonly MULTIPLY = 78;
90
- static readonly REMAINDER = 79;
91
- static readonly QUESTION_MARK = 80;
92
- static readonly ASSIGN = 81;
93
- static readonly PLUS_ASSIGN = 82;
94
- static readonly MINUS_ASSIGN = 83;
95
- static readonly AND = 84;
96
- static readonly OR = 85;
97
- static readonly NOT = 86;
98
- static readonly EQUALS = 87;
99
- static readonly NOT_EQUALS = 88;
100
- static readonly GT = 89;
101
- static readonly LT = 90;
102
- static readonly GTE = 91;
103
- static readonly LTE = 92;
104
- static readonly REST = 93;
105
- static readonly PERIOD = 94;
106
- static readonly COMMA = 95;
107
- static readonly WILDCARD = 96;
108
- static readonly PARENS_START = 97;
109
- static readonly PARENS_END = 98;
110
- static readonly BRACES_START = 99;
111
- static readonly BRACES_END = 100;
112
- static readonly BRACKETS_START = 101;
113
- static readonly BRACKETS_END = 102;
114
- static readonly DOUBLE_COLON = 103;
115
- static readonly SEMI_COLON = 104;
116
- static readonly COLON = 105;
117
- static readonly IDENTIFIER = 106;
118
- static readonly WS = 107;
18
+ static readonly INCLUDE = 7;
19
+ static readonly EXPORT = 8;
20
+ static readonly USE = 9;
21
+ static readonly FROM = 10;
22
+ static readonly NAMESPACE = 11;
23
+ static readonly PROGRAM = 12;
24
+ static readonly EXPOSE = 13;
25
+ static readonly GROUP = 14;
26
+ static readonly DEFAULT = 15;
27
+ static readonly SWITCH = 16;
28
+ static readonly FUNCTION = 17;
29
+ static readonly INTERFACE = 18;
30
+ static readonly EXTENDS = 19;
31
+ static readonly STATE = 20;
32
+ static readonly MODULE = 21;
33
+ static readonly EVENT = 22;
34
+ static readonly IF = 23;
35
+ static readonly ELSE = 24;
36
+ static readonly RETURN = 25;
37
+ static readonly EVERY = 26;
38
+ static readonly LIMIT = 27;
39
+ static readonly AFTER = 28;
40
+ static readonly CANCEL = 29;
41
+ static readonly FOR = 30;
42
+ static readonly EVALUATE = 31;
43
+ static readonly CASE = 32;
44
+ static readonly BREAK = 33;
45
+ static readonly CONTINUE = 34;
46
+ static readonly FALLBACK = 35;
47
+ static readonly CATCH = 36;
48
+ static readonly AS = 37;
49
+ static readonly ENUM = 38;
50
+ static readonly ANY = 39;
51
+ static readonly PROTOCOL = 40;
52
+ static readonly DEFINE = 41;
53
+ static readonly REQUIRE = 42;
54
+ static readonly TERMINATE = 43;
55
+ static readonly STEP = 44;
56
+ static readonly DECODE = 45;
57
+ static readonly ENCODE = 46;
58
+ static readonly END = 47;
59
+ static readonly FORWARD = 48;
60
+ static readonly REWIND = 49;
61
+ static readonly OFFSET = 50;
62
+ static readonly XOR = 51;
63
+ static readonly XNOR = 52;
64
+ static readonly BITS = 53;
65
+ static readonly BYTES = 54;
66
+ static readonly RULE = 55;
67
+ static readonly PARITY = 56;
68
+ static readonly CONST = 57;
69
+ static readonly TYPE_OBJECT = 58;
70
+ static readonly TYPE_ARRAY = 59;
71
+ static readonly TYPE_STRING = 60;
72
+ static readonly TYPE_INT = 61;
73
+ static readonly TYPE_UINT = 62;
74
+ static readonly TYPE_FLOAT = 63;
75
+ static readonly TYPE_DOUBLE = 64;
76
+ static readonly TYPE_BOOLEAN = 65;
77
+ static readonly TYPE_NULL = 66;
78
+ static readonly TYPE_VOID = 67;
79
+ static readonly TYPE_UNDEFINED = 68;
80
+ static readonly NUMBER = 69;
81
+ static readonly BOOLEAN = 70;
82
+ static readonly STRING = 71;
83
+ static readonly COMMENT = 72;
84
+ static readonly ARROW_OPERATOR = 73;
85
+ static readonly INCREMENT = 74;
86
+ static readonly DECREMENT = 75;
87
+ static readonly PLUS = 76;
88
+ static readonly MINUS = 77;
89
+ static readonly DIVIDE = 78;
90
+ static readonly MULTIPLY = 79;
91
+ static readonly REMAINDER = 80;
92
+ static readonly QUESTION_MARK = 81;
93
+ static readonly ASSIGN = 82;
94
+ static readonly PLUS_ASSIGN = 83;
95
+ static readonly MINUS_ASSIGN = 84;
96
+ static readonly AND = 85;
97
+ static readonly OR = 86;
98
+ static readonly NOT = 87;
99
+ static readonly EQUALS = 88;
100
+ static readonly NOT_EQUALS = 89;
101
+ static readonly GT = 90;
102
+ static readonly LT = 91;
103
+ static readonly GTE = 92;
104
+ static readonly LTE = 93;
105
+ static readonly REST = 94;
106
+ static readonly PERIOD = 95;
107
+ static readonly COMMA = 96;
108
+ static readonly WILDCARD = 97;
109
+ static readonly PARENS_START = 98;
110
+ static readonly PARENS_END = 99;
111
+ static readonly BRACES_START = 100;
112
+ static readonly BRACES_END = 101;
113
+ static readonly BRACKETS_START = 102;
114
+ static readonly BRACKETS_END = 103;
115
+ static readonly DOUBLE_COLON = 104;
116
+ static readonly SEMI_COLON = 105;
117
+ static readonly COLON = 106;
118
+ static readonly IDENTIFIER = 107;
119
+ static readonly WS = 108;
119
120
  static readonly RULE_root = 0;
120
121
  static readonly RULE_importDeclaration = 1;
121
- static readonly RULE_importNative = 2;
122
- static readonly RULE_importExternal = 3;
123
- static readonly RULE_programDeclaration = 4;
124
- static readonly RULE_programProperty = 5;
125
- static readonly RULE_exposeDeclaration = 6;
126
- static readonly RULE_groupDeclaration = 7;
127
- static readonly RULE_configProperty = 8;
128
- static readonly RULE_configPropertyBody = 9;
129
- static readonly RULE_rootBody = 10;
130
- static readonly RULE_interfaceDeclaration = 11;
131
- static readonly RULE_interfaceProperty = 12;
132
- static readonly RULE_statement = 13;
133
- static readonly RULE_exportStatement = 14;
134
- static readonly RULE_exportNamespace = 15;
135
- static readonly RULE_exportIdentifier = 16;
136
- static readonly RULE_expressionStatement = 17;
137
- static readonly RULE_namespacedIdentifier = 18;
138
- static readonly RULE_expression = 19;
139
- static readonly RULE_primaryExpression = 20;
140
- static readonly RULE_stateDeclaration = 21;
141
- static readonly RULE_stateBody = 22;
142
- static readonly RULE_stateModuleDeclaration = 23;
143
- static readonly RULE_stateModuleBody = 24;
144
- static readonly RULE_stateModuleEventDeclaration = 25;
145
- static readonly RULE_afterDeclaration = 26;
146
- static readonly RULE_everyDeclaration = 27;
147
- static readonly RULE_limitClause = 28;
148
- static readonly RULE_cancelStatement = 29;
149
- static readonly RULE_breakStatement = 30;
150
- static readonly RULE_continueStatement = 31;
151
- static readonly RULE_functionNameIdentifier = 32;
152
- static readonly RULE_functionDeclaration = 33;
153
- static readonly RULE_functionDefinition = 34;
154
- static readonly RULE_functionParameters = 35;
155
- static readonly RULE_functionParameter = 36;
156
- static readonly RULE_assignmentPattern = 37;
157
- static readonly RULE_restElement = 38;
158
- static readonly RULE_ifStatement = 39;
159
- static readonly RULE_elseStatement = 40;
160
- static readonly RULE_elseIfStatement = 41;
161
- static readonly RULE_variableDeclaration = 42;
162
- static readonly RULE_variableDeclarator = 43;
163
- static readonly RULE_variableDeclaratorWithInit = 44;
164
- static readonly RULE_catchStatement = 45;
165
- static readonly RULE_catchAsStatement = 46;
166
- static readonly RULE_comment = 47;
167
- static readonly RULE_returnStatement = 48;
168
- static readonly RULE_forStatement = 49;
169
- static readonly RULE_evaluateCase = 50;
170
- static readonly RULE_evaluateCaseTest = 51;
171
- static readonly RULE_wildcard = 52;
172
- static readonly RULE_evaluateFallback = 53;
173
- static readonly RULE_evaluateBranch = 54;
174
- static readonly RULE_evaluateArguments = 55;
175
- static readonly RULE_evaluateStatement = 56;
176
- static readonly RULE_callArguments = 57;
177
- static readonly RULE_protocolDeclaration = 58;
178
- static readonly RULE_protocolComparator = 59;
179
- static readonly RULE_defineStatement = 60;
180
- static readonly RULE_requireStatement = 61;
181
- static readonly RULE_terminateFlag = 62;
182
- static readonly RULE_protocolOpStatement = 63;
183
- static readonly RULE_booleanOp = 64;
184
- static readonly RULE_forwardStatement = 65;
185
- static readonly RULE_offsetStatement = 66;
186
- static readonly RULE_rewindStatement = 67;
187
- static readonly RULE_stepDeclaration = 68;
188
- static readonly RULE_protocolPhase = 69;
189
- static readonly RULE_parityStatement = 70;
190
- static readonly RULE_ruleStatement = 71;
191
- static readonly RULE_protocolBody = 72;
192
- static readonly RULE_stepBody = 73;
193
- static readonly RULE_endStatement = 74;
194
- static readonly RULE_enumDeclaration = 75;
195
- static readonly RULE_enumBody = 76;
196
- static readonly RULE_enumAssignment = 77;
197
- static readonly RULE_token = 78;
198
- static readonly RULE_debuggerStatement = 79;
199
- static readonly RULE_blockStatement = 80;
200
- static readonly RULE_literal = 81;
201
- static readonly RULE_valueInternal = 82;
202
- static readonly RULE_lineEnd = 83;
203
- static readonly RULE_customType = 84;
204
- static readonly RULE_dataType = 85;
205
- static readonly RULE_type = 86;
206
- static readonly RULE_protocolType = 87;
207
- static readonly RULE_protocolReadType = 88;
208
- static readonly RULE_arrayExpressionInternal = 89;
209
- static readonly RULE_objectExpressionInternal = 90;
210
- static readonly RULE_objectProperty = 91;
211
- static readonly RULE_stringLiteral = 92;
212
- static readonly RULE_numberLiteral = 93;
213
- static readonly RULE_booleanLiteral = 94;
214
- static readonly RULE_nullLiteral = 95;
215
- static readonly RULE_undefinedLiteral = 96;
216
- static readonly RULE_identifier = 97;
122
+ static readonly RULE_includeStatement = 2;
123
+ static readonly RULE_importNative = 3;
124
+ static readonly RULE_importExternal = 4;
125
+ static readonly RULE_importSpecifier = 5;
126
+ static readonly RULE_programDeclaration = 6;
127
+ static readonly RULE_programProperty = 7;
128
+ static readonly RULE_exposeDeclaration = 8;
129
+ static readonly RULE_groupDeclaration = 9;
130
+ static readonly RULE_configProperty = 10;
131
+ static readonly RULE_configPropertyBody = 11;
132
+ static readonly RULE_rootBody = 12;
133
+ static readonly RULE_interfaceDeclaration = 13;
134
+ static readonly RULE_interfaceProperty = 14;
135
+ static readonly RULE_statement = 15;
136
+ static readonly RULE_exportStatement = 16;
137
+ static readonly RULE_exportNamed = 17;
138
+ static readonly RULE_exportSpecifier = 18;
139
+ static readonly RULE_exportInline = 19;
140
+ static readonly RULE_exportReexport = 20;
141
+ static readonly RULE_expressionStatement = 21;
142
+ static readonly RULE_namespacedIdentifier = 22;
143
+ static readonly RULE_expression = 23;
144
+ static readonly RULE_primaryExpression = 24;
145
+ static readonly RULE_stateDeclaration = 25;
146
+ static readonly RULE_stateBody = 26;
147
+ static readonly RULE_stateModuleDeclaration = 27;
148
+ static readonly RULE_stateModuleBody = 28;
149
+ static readonly RULE_stateModuleEventDeclaration = 29;
150
+ static readonly RULE_afterDeclaration = 30;
151
+ static readonly RULE_everyDeclaration = 31;
152
+ static readonly RULE_limitClause = 32;
153
+ static readonly RULE_cancelStatement = 33;
154
+ static readonly RULE_breakStatement = 34;
155
+ static readonly RULE_continueStatement = 35;
156
+ static readonly RULE_functionNameIdentifier = 36;
157
+ static readonly RULE_functionDeclaration = 37;
158
+ static readonly RULE_functionDefinition = 38;
159
+ static readonly RULE_functionParameters = 39;
160
+ static readonly RULE_functionParameter = 40;
161
+ static readonly RULE_assignmentPattern = 41;
162
+ static readonly RULE_restElement = 42;
163
+ static readonly RULE_ifStatement = 43;
164
+ static readonly RULE_elseStatement = 44;
165
+ static readonly RULE_elseIfStatement = 45;
166
+ static readonly RULE_variableDeclaration = 46;
167
+ static readonly RULE_variableDeclarator = 47;
168
+ static readonly RULE_variableDeclaratorWithInit = 48;
169
+ static readonly RULE_catchStatement = 49;
170
+ static readonly RULE_catchAsStatement = 50;
171
+ static readonly RULE_comment = 51;
172
+ static readonly RULE_returnStatement = 52;
173
+ static readonly RULE_forStatement = 53;
174
+ static readonly RULE_evaluateCase = 54;
175
+ static readonly RULE_evaluateCaseTest = 55;
176
+ static readonly RULE_wildcard = 56;
177
+ static readonly RULE_evaluateFallback = 57;
178
+ static readonly RULE_evaluateBranch = 58;
179
+ static readonly RULE_evaluateArguments = 59;
180
+ static readonly RULE_evaluateStatement = 60;
181
+ static readonly RULE_callArguments = 61;
182
+ static readonly RULE_protocolDeclaration = 62;
183
+ static readonly RULE_protocolComparator = 63;
184
+ static readonly RULE_defineStatement = 64;
185
+ static readonly RULE_requireStatement = 65;
186
+ static readonly RULE_terminateFlag = 66;
187
+ static readonly RULE_protocolOpStatement = 67;
188
+ static readonly RULE_booleanOp = 68;
189
+ static readonly RULE_forwardStatement = 69;
190
+ static readonly RULE_offsetStatement = 70;
191
+ static readonly RULE_rewindStatement = 71;
192
+ static readonly RULE_stepDeclaration = 72;
193
+ static readonly RULE_protocolPhase = 73;
194
+ static readonly RULE_parityDeclaration = 74;
195
+ static readonly RULE_ruleStatement = 75;
196
+ static readonly RULE_protocolBody = 76;
197
+ static readonly RULE_stepBody = 77;
198
+ static readonly RULE_endStatement = 78;
199
+ static readonly RULE_enumDeclaration = 79;
200
+ static readonly RULE_enumBody = 80;
201
+ static readonly RULE_enumAssignment = 81;
202
+ static readonly RULE_token = 82;
203
+ static readonly RULE_debuggerStatement = 83;
204
+ static readonly RULE_blockStatement = 84;
205
+ static readonly RULE_literal = 85;
206
+ static readonly RULE_valueInternal = 86;
207
+ static readonly RULE_lineEnd = 87;
208
+ static readonly RULE_customType = 88;
209
+ static readonly RULE_dataType = 89;
210
+ static readonly RULE_type = 90;
211
+ static readonly RULE_protocolType = 91;
212
+ static readonly RULE_protocolReadType = 92;
213
+ static readonly RULE_arrayExpressionInternal = 93;
214
+ static readonly RULE_objectExpressionInternal = 94;
215
+ static readonly RULE_objectProperty = 95;
216
+ static readonly RULE_stringLiteral = 96;
217
+ static readonly RULE_numberLiteral = 97;
218
+ static readonly RULE_booleanLiteral = 98;
219
+ static readonly RULE_nullLiteral = 99;
220
+ static readonly RULE_undefinedLiteral = 100;
221
+ static readonly RULE_identifier = 101;
217
222
  static readonly ruleNames: string[];
218
223
  private static readonly _LITERAL_NAMES;
219
224
  private static readonly _SYMBOLIC_NAMES;
@@ -226,8 +231,10 @@ export declare class BattleScriptParser extends Parser {
226
231
  constructor(input: TokenStream);
227
232
  root(): RootContext;
228
233
  importDeclaration(): ImportDeclarationContext;
234
+ includeStatement(): IncludeStatementContext;
229
235
  importNative(): ImportNativeContext;
230
236
  importExternal(): ImportExternalContext;
237
+ importSpecifier(): ImportSpecifierContext;
231
238
  programDeclaration(): ProgramDeclarationContext;
232
239
  programProperty(): ProgramPropertyContext;
233
240
  exposeDeclaration(): ExposeDeclarationContext;
@@ -239,8 +246,10 @@ export declare class BattleScriptParser extends Parser {
239
246
  interfaceProperty(): InterfacePropertyContext;
240
247
  statement(): StatementContext;
241
248
  exportStatement(): ExportStatementContext;
242
- exportNamespace(): ExportNamespaceContext;
243
- exportIdentifier(): ExportIdentifierContext;
249
+ exportNamed(): ExportNamedContext;
250
+ exportSpecifier(): ExportSpecifierContext;
251
+ exportInline(): ExportInlineContext;
252
+ exportReexport(): ExportReexportContext;
244
253
  expressionStatement(): ExpressionStatementContext;
245
254
  namespacedIdentifier(): NamespacedIdentifierContext;
246
255
  expression(): ExpressionContext;
@@ -295,7 +304,7 @@ export declare class BattleScriptParser extends Parser {
295
304
  rewindStatement(): RewindStatementContext;
296
305
  stepDeclaration(): StepDeclarationContext;
297
306
  protocolPhase(): ProtocolPhaseContext;
298
- parityStatement(): ParityStatementContext;
307
+ parityDeclaration(): ParityDeclarationContext;
299
308
  ruleStatement(): RuleStatementContext;
300
309
  protocolBody(): ProtocolBodyContext;
301
310
  stepBody(): StepBodyContext;
@@ -355,6 +364,16 @@ export declare class ImportDeclarationContext extends ParserRuleContext {
355
364
  exitRule(listener: BattleScriptListener): void;
356
365
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
357
366
  }
367
+ export declare class IncludeStatementContext extends ParserRuleContext {
368
+ INCLUDE(): TerminalNode;
369
+ stringLiteral(): StringLiteralContext;
370
+ lineEnd(): LineEndContext;
371
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
372
+ get ruleIndex(): number;
373
+ enterRule(listener: BattleScriptListener): void;
374
+ exitRule(listener: BattleScriptListener): void;
375
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
376
+ }
358
377
  export declare class ImportNativeContext extends ParserRuleContext {
359
378
  IMPORT(): TerminalNode;
360
379
  identifier(): IdentifierContext[];
@@ -372,10 +391,11 @@ export declare class ImportExternalContext extends ParserRuleContext {
372
391
  NAMESPACE(): TerminalNode | undefined;
373
392
  stringLiteral(): StringLiteralContext;
374
393
  lineEnd(): LineEndContext;
375
- identifier(): IdentifierContext[];
376
- identifier(i: number): IdentifierContext;
394
+ identifier(): IdentifierContext | undefined;
377
395
  FROM(): TerminalNode | undefined;
378
396
  BRACES_START(): TerminalNode | undefined;
397
+ importSpecifier(): ImportSpecifierContext[];
398
+ importSpecifier(i: number): ImportSpecifierContext;
379
399
  BRACES_END(): TerminalNode | undefined;
380
400
  COMMA(): TerminalNode[];
381
401
  COMMA(i: number): TerminalNode;
@@ -385,6 +405,16 @@ export declare class ImportExternalContext extends ParserRuleContext {
385
405
  exitRule(listener: BattleScriptListener): void;
386
406
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
387
407
  }
408
+ export declare class ImportSpecifierContext extends ParserRuleContext {
409
+ identifier(): IdentifierContext[];
410
+ identifier(i: number): IdentifierContext;
411
+ AS(): TerminalNode | undefined;
412
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
413
+ get ruleIndex(): number;
414
+ enterRule(listener: BattleScriptListener): void;
415
+ exitRule(listener: BattleScriptListener): void;
416
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
417
+ }
388
418
  export declare class ProgramDeclarationContext extends ParserRuleContext {
389
419
  PROGRAM(): TerminalNode;
390
420
  BRACES_START(): TerminalNode;
@@ -463,6 +493,8 @@ export declare class ConfigPropertyBodyContext extends ParserRuleContext {
463
493
  }
464
494
  export declare class RootBodyContext extends ParserRuleContext {
465
495
  importDeclaration(): ImportDeclarationContext | undefined;
496
+ includeStatement(): IncludeStatementContext | undefined;
497
+ exportStatement(): ExportStatementContext | undefined;
466
498
  interfaceDeclaration(): InterfaceDeclarationContext | undefined;
467
499
  exposeDeclaration(): ExposeDeclarationContext | undefined;
468
500
  programDeclaration(): ProgramDeclarationContext | undefined;
@@ -517,7 +549,6 @@ export declare class StatementContext extends ParserRuleContext {
517
549
  catchStatement(): CatchStatementContext | undefined;
518
550
  forStatement(): ForStatementContext | undefined;
519
551
  evaluateStatement(): EvaluateStatementContext | undefined;
520
- exportStatement(): ExportStatementContext | undefined;
521
552
  debuggerStatement(): DebuggerStatementContext | undefined;
522
553
  comment(): CommentContext | undefined;
523
554
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
@@ -527,20 +558,20 @@ export declare class StatementContext extends ParserRuleContext {
527
558
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
528
559
  }
529
560
  export declare class ExportStatementContext extends ParserRuleContext {
530
- exportNamespace(): ExportNamespaceContext | undefined;
531
- exportIdentifier(): ExportIdentifierContext | undefined;
561
+ exportNamed(): ExportNamedContext | undefined;
562
+ exportInline(): ExportInlineContext | undefined;
563
+ exportReexport(): ExportReexportContext | undefined;
532
564
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
533
565
  get ruleIndex(): number;
534
566
  enterRule(listener: BattleScriptListener): void;
535
567
  exitRule(listener: BattleScriptListener): void;
536
568
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
537
569
  }
538
- export declare class ExportNamespaceContext extends ParserRuleContext {
570
+ export declare class ExportNamedContext extends ParserRuleContext {
539
571
  EXPORT(): TerminalNode;
540
- NAMESPACE(): TerminalNode;
541
- identifier(): IdentifierContext[];
542
- identifier(i: number): IdentifierContext;
543
572
  BRACES_START(): TerminalNode;
573
+ exportSpecifier(): ExportSpecifierContext[];
574
+ exportSpecifier(i: number): ExportSpecifierContext;
544
575
  BRACES_END(): TerminalNode;
545
576
  lineEnd(): LineEndContext;
546
577
  COMMA(): TerminalNode[];
@@ -551,10 +582,41 @@ export declare class ExportNamespaceContext extends ParserRuleContext {
551
582
  exitRule(listener: BattleScriptListener): void;
552
583
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
553
584
  }
554
- export declare class ExportIdentifierContext extends ParserRuleContext {
585
+ export declare class ExportSpecifierContext extends ParserRuleContext {
586
+ identifier(): IdentifierContext[];
587
+ identifier(i: number): IdentifierContext;
588
+ AS(): TerminalNode | undefined;
589
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
590
+ get ruleIndex(): number;
591
+ enterRule(listener: BattleScriptListener): void;
592
+ exitRule(listener: BattleScriptListener): void;
593
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
594
+ }
595
+ export declare class ExportInlineContext extends ParserRuleContext {
555
596
  EXPORT(): TerminalNode;
556
- identifier(): IdentifierContext;
597
+ variableDeclaration(): VariableDeclarationContext | undefined;
598
+ functionDefinition(): FunctionDefinitionContext | undefined;
599
+ functionDeclaration(): FunctionDeclarationContext | undefined;
600
+ enumDeclaration(): EnumDeclarationContext | undefined;
601
+ interfaceDeclaration(): InterfaceDeclarationContext | undefined;
602
+ stateDeclaration(): StateDeclarationContext | undefined;
603
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
604
+ get ruleIndex(): number;
605
+ enterRule(listener: BattleScriptListener): void;
606
+ exitRule(listener: BattleScriptListener): void;
607
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
608
+ }
609
+ export declare class ExportReexportContext extends ParserRuleContext {
610
+ EXPORT(): TerminalNode;
611
+ BRACES_START(): TerminalNode;
612
+ exportSpecifier(): ExportSpecifierContext[];
613
+ exportSpecifier(i: number): ExportSpecifierContext;
614
+ BRACES_END(): TerminalNode;
615
+ FROM(): TerminalNode;
616
+ stringLiteral(): StringLiteralContext;
557
617
  lineEnd(): LineEndContext;
618
+ COMMA(): TerminalNode[];
619
+ COMMA(i: number): TerminalNode;
558
620
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
559
621
  get ruleIndex(): number;
560
622
  enterRule(listener: BattleScriptListener): void;
@@ -1272,7 +1334,7 @@ export declare class ProtocolPhaseContext extends ParserRuleContext {
1272
1334
  exitRule(listener: BattleScriptListener): void;
1273
1335
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1274
1336
  }
1275
- export declare class ParityStatementContext extends ParserRuleContext {
1337
+ export declare class ParityDeclarationContext extends ParserRuleContext {
1276
1338
  PARITY(): TerminalNode;
1277
1339
  BRACES_START(): TerminalNode;
1278
1340
  BRACES_END(): TerminalNode;
@@ -1311,9 +1373,10 @@ export declare class ProtocolBodyContext extends ParserRuleContext {
1311
1373
  forwardStatement(): ForwardStatementContext | undefined;
1312
1374
  offsetStatement(): OffsetStatementContext | undefined;
1313
1375
  rewindStatement(): RewindStatementContext | undefined;
1314
- parityStatement(): ParityStatementContext | undefined;
1376
+ parityDeclaration(): ParityDeclarationContext | undefined;
1315
1377
  stepDeclaration(): StepDeclarationContext | undefined;
1316
1378
  ruleStatement(): RuleStatementContext | undefined;
1379
+ endStatement(): EndStatementContext | undefined;
1317
1380
  comment(): CommentContext | undefined;
1318
1381
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
1319
1382
  get ruleIndex(): number;