@irrelon/battlescript 3.2.2 → 3.2.4

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 (88) hide show
  1. package/bin/index.js +2570 -1896
  2. package/bin/index.js.map +1 -1
  3. package/dist/exports/typescript/enums/EnumNodeKind.d.ts +55 -51
  4. package/dist/exports/typescript/enums/EnumNodeKind.d.ts.map +1 -1
  5. package/dist/exports/typescript/enums/EnumNodeProp.d.ts +6 -6
  6. package/dist/exports/typescript/enums/EnumNodeProp.d.ts.map +1 -1
  7. package/dist/exports/typescript/helpers/miniAstLayout.d.ts.map +1 -1
  8. package/dist/index.cjs +2596 -1908
  9. package/dist/index.cjs.map +1 -1
  10. package/dist/index.mjs +2580 -1906
  11. package/dist/index.mjs.map +1 -1
  12. package/dist/scripts/exportGen/helpers/generateHelpers.d.ts.map +1 -1
  13. package/dist/scripts/regenerateTestBinaries.d.ts +2 -0
  14. package/dist/scripts/regenerateTestBinaries.d.ts.map +1 -0
  15. package/dist/services/fullAst/BattleScriptFromAST.d.ts +7 -2
  16. package/dist/services/fullAst/BattleScriptFromAST.d.ts.map +1 -1
  17. package/dist/services/fullAst/BattleScriptToAST.d.ts +9 -3
  18. package/dist/services/fullAst/BattleScriptToAST.d.ts.map +1 -1
  19. package/dist/services/grammar/ts/language/BattleScriptLexer.d.ts +94 -97
  20. package/dist/services/grammar/ts/language/BattleScriptLexer.d.ts.map +1 -1
  21. package/dist/services/grammar/ts/language/BattleScriptListener.d.ts +60 -16
  22. package/dist/services/grammar/ts/language/BattleScriptListener.d.ts.map +1 -1
  23. package/dist/services/grammar/ts/language/BattleScriptParser.d.ts +238 -182
  24. package/dist/services/grammar/ts/language/BattleScriptParser.d.ts.map +1 -1
  25. package/dist/services/grammar/ts/language/BattleScriptVisitor.d.ts +38 -10
  26. package/dist/services/grammar/ts/language/BattleScriptVisitor.d.ts.map +1 -1
  27. package/dist/services/index.d.ts +4 -0
  28. package/dist/services/index.d.ts.map +1 -1
  29. package/dist/services/miniAst/BattleScriptToMiniAST.d.ts.map +1 -1
  30. package/dist/services/miniAst/binaryTypeToByteSize.d.ts +1 -1
  31. package/dist/services/miniAst/miniAstLayout.d.ts.map +1 -1
  32. package/dist/tsconfig.types.tsbuildinfo +1 -0
  33. package/dist/types/ast/nodes/AstNode.d.ts +3 -2
  34. package/dist/types/ast/nodes/AstNode.d.ts.map +1 -1
  35. package/dist/types/ast/nodes/DebuggerStatementNode.d.ts +12 -0
  36. package/dist/types/ast/nodes/DebuggerStatementNode.d.ts.map +1 -0
  37. package/dist/types/ast/nodes/EndStatementNode.d.ts +12 -0
  38. package/dist/types/ast/nodes/EndStatementNode.d.ts.map +1 -0
  39. package/dist/types/ast/nodes/EnumAssignmentNode.d.ts +14 -0
  40. package/dist/types/ast/nodes/EnumAssignmentNode.d.ts.map +1 -0
  41. package/dist/types/ast/nodes/EvaluateCaseNode.d.ts.map +1 -1
  42. package/dist/types/ast/nodes/EvaluateFallbackNode.d.ts.map +1 -1
  43. package/dist/types/ast/nodes/EvaluateStatementNode.d.ts.map +1 -1
  44. package/dist/types/ast/nodes/EventDeclarationNode.d.ts +4 -4
  45. package/dist/types/ast/nodes/EventDeclarationNode.d.ts.map +1 -1
  46. package/dist/types/ast/nodes/ProtocolTypeNode.d.ts +1 -0
  47. package/dist/types/ast/nodes/ProtocolTypeNode.d.ts.map +1 -1
  48. package/dist/types/ast/nodes/StateDeclarationNode.d.ts +2 -2
  49. package/dist/types/ast/nodes/StateDeclarationNode.d.ts.map +1 -1
  50. package/dist/types/ast/nodes/StateModuleDeclarationNode.d.ts +14 -0
  51. package/dist/types/ast/nodes/StateModuleDeclarationNode.d.ts.map +1 -0
  52. package/dist/types/ast/nodes/StateModuleEventDeclarationNode.d.ts +15 -0
  53. package/dist/types/ast/nodes/StateModuleEventDeclarationNode.d.ts.map +1 -0
  54. package/dist/types/ast/nodes/index.d.ts +5 -1
  55. package/dist/types/ast/nodes/index.d.ts.map +1 -1
  56. package/dist/types/ast/unions/BlockStatementUnion.d.ts +2 -2
  57. package/dist/types/ast/unions/BlockStatementUnion.d.ts.map +1 -1
  58. package/package.json +3 -2
  59. package/dist/services/byteCode/byteCodeInterpreter.d.ts +0 -17
  60. package/dist/services/byteCode/byteCodeInterpreter.d.ts.map +0 -1
  61. package/dist/services/byteCode/disassembler.d.ts +0 -3
  62. package/dist/services/byteCode/disassembler.d.ts.map +0 -1
  63. package/dist/services/byteCode/index.d.ts +0 -3
  64. package/dist/services/byteCode/index.d.ts.map +0 -1
  65. package/dist/tests/bytecode/fixtures/ASSIGNMENT_EXPRESSION/basic1-out.d.ts +0 -20
  66. package/dist/tests/bytecode/fixtures/ASSIGNMENT_EXPRESSION/basic1-out.d.ts.map +0 -1
  67. package/dist/tests/bytecode/fixtures/ASSIGNMENT_EXPRESSION/binary-expression1-out.d.ts +0 -20
  68. package/dist/tests/bytecode/fixtures/ASSIGNMENT_EXPRESSION/binary-expression1-out.d.ts.map +0 -1
  69. package/dist/tests/bytecode/fixtures/ASSIGNMENT_EXPRESSION/member-expression1-out.d.ts +0 -20
  70. package/dist/tests/bytecode/fixtures/ASSIGNMENT_EXPRESSION/member-expression1-out.d.ts.map +0 -1
  71. package/dist/tests/bytecode/fixtures/ASSIGNMENT_EXPRESSION/member-expression2-out.d.ts +0 -20
  72. package/dist/tests/bytecode/fixtures/ASSIGNMENT_EXPRESSION/member-expression2-out.d.ts.map +0 -1
  73. package/dist/tests/bytecode/fixtures/IDENTIFIER/basic1-out.d.ts +0 -21
  74. package/dist/tests/bytecode/fixtures/IDENTIFIER/basic1-out.d.ts.map +0 -1
  75. package/dist/tests/bytecode/fixtures/LITERAL/basic1-int-out.d.ts +0 -21
  76. package/dist/tests/bytecode/fixtures/LITERAL/basic1-int-out.d.ts.map +0 -1
  77. package/dist/tests/bytecode/fixtures/MEMBER_EXPRESSION/basic1-out.d.ts +0 -20
  78. package/dist/tests/bytecode/fixtures/MEMBER_EXPRESSION/basic1-out.d.ts.map +0 -1
  79. package/dist/tests/bytecode/interpreter.test.d.ts +0 -2
  80. package/dist/tests/bytecode/interpreter.test.d.ts.map +0 -1
  81. package/dist/tests/bytecode/utils.d.ts +0 -21
  82. package/dist/tests/bytecode/utils.d.ts.map +0 -1
  83. package/dist/types/ast/nodes/TransportStatementNode.d.ts +0 -13
  84. package/dist/types/ast/nodes/TransportStatementNode.d.ts.map +0 -1
  85. package/dist/types/byteCode/ByteCodeInstruction.d.ts +0 -8
  86. package/dist/types/byteCode/ByteCodeInstruction.d.ts.map +0 -1
  87. package/dist/types/byteCode/ByteCodeJson.d.ts +0 -6
  88. package/dist/types/byteCode/ByteCodeJson.d.ts.map +0 -1
@@ -9,103 +9,100 @@ import { Vocabulary } from "antlr4ts/Vocabulary";
9
9
  import { BattleScriptListener } from "./BattleScriptListener";
10
10
  import { BattleScriptVisitor } from "./BattleScriptVisitor";
11
11
  export declare class BattleScriptParser extends Parser {
12
- static readonly EXTERNAL = 1;
13
- static readonly NATIVE = 2;
14
- static readonly PURE = 3;
15
- static readonly DECLARE = 4;
16
- static readonly IMPORT = 5;
17
- static readonly EXPORT = 6;
18
- static readonly USE = 7;
19
- static readonly FROM = 8;
20
- static readonly NAMESPACE = 9;
21
- static readonly PROGRAM = 10;
22
- static readonly EXPOSE = 11;
23
- static readonly GROUP = 12;
24
- static readonly DEFAULT = 13;
25
- static readonly SWITCH = 14;
26
- static readonly FUNCTION = 15;
27
- static readonly INTERFACE = 16;
28
- static readonly EXTENDS = 17;
29
- static readonly STATE = 18;
30
- static readonly EVENT = 19;
31
- static readonly IF = 20;
32
- static readonly ELSE = 21;
33
- static readonly RETURN = 22;
34
- static readonly EVERY = 23;
35
- static readonly LIMIT = 24;
36
- static readonly AFTER = 25;
37
- static readonly CANCEL = 26;
38
- static readonly FOR = 27;
39
- static readonly EVALUATE = 28;
40
- static readonly CASE = 29;
41
- static readonly BREAK = 30;
42
- static readonly CONTINUE = 31;
43
- static readonly FALLBACK = 32;
44
- static readonly CATCH = 33;
45
- static readonly AS = 34;
46
- static readonly PROTOCOL = 35;
47
- static readonly DEFINE = 36;
48
- static readonly REQUIRE = 37;
49
- static readonly STEP = 38;
50
- static readonly ENUM = 39;
51
- static readonly CONST = 40;
52
- static readonly TYPE_OBJECT = 41;
53
- static readonly TYPE_ARRAY = 42;
54
- static readonly TYPE_STRING = 43;
55
- static readonly TYPE_INT = 44;
56
- static readonly TYPE_UINT = 45;
57
- static readonly TYPE_FLOAT = 46;
58
- static readonly TYPE_DOUBLE = 47;
59
- static readonly TYPE_BOOLEAN = 48;
60
- static readonly TYPE_NULL = 49;
61
- static readonly TYPE_VOID = 50;
62
- static readonly TYPE_UNDEFINED = 51;
63
- static readonly TYPE_ANY = 52;
64
- static readonly PROTOCOL_TYPE_U1 = 53;
65
- static readonly PROTOCOL_TYPE_U2 = 54;
66
- static readonly PROTOCOL_TYPE_U4 = 55;
67
- static readonly PROTOCOL_TYPE_I1 = 56;
68
- static readonly PROTOCOL_TYPE_I2 = 57;
69
- static readonly PROTOCOL_TYPE_I4 = 58;
70
- static readonly NUMBER = 59;
71
- static readonly BOOLEAN = 60;
72
- static readonly STRING = 61;
73
- static readonly COMMENT = 62;
74
- static readonly IDENTIFIER = 63;
75
- static readonly ARROW_OPERATOR = 64;
76
- static readonly INCREMENT = 65;
77
- static readonly DECREMENT = 66;
78
- static readonly PLUS = 67;
79
- static readonly MINUS = 68;
80
- static readonly DIVIDE = 69;
81
- static readonly MULTIPLY = 70;
82
- static readonly REMAINDER = 71;
83
- static readonly ASSIGN = 72;
84
- static readonly PLUS_ASSIGN = 73;
85
- static readonly MINUS_ASSIGN = 74;
86
- static readonly AND = 75;
87
- static readonly OR = 76;
88
- static readonly NOT = 77;
89
- static readonly EQUALS = 78;
90
- static readonly NOT_EQUALS = 79;
91
- static readonly GT = 80;
92
- static readonly LT = 81;
93
- static readonly GTE = 82;
94
- static readonly LTE = 83;
95
- static readonly REST = 84;
96
- static readonly PERIOD = 85;
97
- static readonly COMMA = 86;
98
- static readonly WILDCARD = 87;
99
- static readonly PARENS_START = 88;
100
- static readonly PARENS_END = 89;
101
- static readonly BRACES_START = 90;
102
- static readonly BRACES_END = 91;
103
- static readonly BRACKETS_START = 92;
104
- static readonly BRACKETS_END = 93;
105
- static readonly DOUBLE_COLON = 94;
106
- static readonly SEMI_COLON = 95;
107
- static readonly COLON = 96;
108
- static readonly WS = 97;
12
+ static readonly DEBUGGER = 1;
13
+ static readonly EXTERNAL = 2;
14
+ static readonly NATIVE = 3;
15
+ static readonly PURE = 4;
16
+ static readonly DECLARE = 5;
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 PROTOCOL = 37;
49
+ static readonly DEFINE = 38;
50
+ static readonly REQUIRE = 39;
51
+ static readonly STEP = 40;
52
+ static readonly ENUM = 41;
53
+ static readonly ANY = 42;
54
+ static readonly END = 43;
55
+ static readonly CONST = 44;
56
+ static readonly TYPE_OBJECT = 45;
57
+ static readonly TYPE_ARRAY = 46;
58
+ static readonly TYPE_STRING = 47;
59
+ static readonly TYPE_INT = 48;
60
+ static readonly TYPE_UINT = 49;
61
+ static readonly TYPE_FLOAT = 50;
62
+ static readonly TYPE_DOUBLE = 51;
63
+ static readonly TYPE_BOOLEAN = 52;
64
+ static readonly TYPE_NULL = 53;
65
+ static readonly TYPE_VOID = 54;
66
+ static readonly TYPE_UNDEFINED = 55;
67
+ static readonly NUMBER = 56;
68
+ static readonly BOOLEAN = 57;
69
+ static readonly STRING = 58;
70
+ static readonly COMMENT = 59;
71
+ static readonly ARROW_OPERATOR = 60;
72
+ static readonly INCREMENT = 61;
73
+ static readonly DECREMENT = 62;
74
+ static readonly PLUS = 63;
75
+ static readonly MINUS = 64;
76
+ static readonly DIVIDE = 65;
77
+ static readonly MULTIPLY = 66;
78
+ static readonly REMAINDER = 67;
79
+ static readonly ASSIGN = 68;
80
+ static readonly PLUS_ASSIGN = 69;
81
+ static readonly MINUS_ASSIGN = 70;
82
+ static readonly AND = 71;
83
+ static readonly OR = 72;
84
+ static readonly NOT = 73;
85
+ static readonly EQUALS = 74;
86
+ static readonly NOT_EQUALS = 75;
87
+ static readonly GT = 76;
88
+ static readonly LT = 77;
89
+ static readonly GTE = 78;
90
+ static readonly LTE = 79;
91
+ static readonly REST = 80;
92
+ static readonly PERIOD = 81;
93
+ static readonly COMMA = 82;
94
+ static readonly WILDCARD = 83;
95
+ static readonly PARENS_START = 84;
96
+ static readonly PARENS_END = 85;
97
+ static readonly BRACES_START = 86;
98
+ static readonly BRACES_END = 87;
99
+ static readonly BRACKETS_START = 88;
100
+ static readonly BRACKETS_END = 89;
101
+ static readonly DOUBLE_COLON = 90;
102
+ static readonly SEMI_COLON = 91;
103
+ static readonly COLON = 92;
104
+ static readonly IDENTIFIER = 93;
105
+ static readonly WS = 94;
109
106
  static readonly RULE_root = 0;
110
107
  static readonly RULE_importDeclaration = 1;
111
108
  static readonly RULE_importNative = 2;
@@ -129,67 +126,71 @@ export declare class BattleScriptParser extends Parser {
129
126
  static readonly RULE_primaryExpression = 20;
130
127
  static readonly RULE_stateDeclaration = 21;
131
128
  static readonly RULE_stateBody = 22;
132
- static readonly RULE_eventDeclaration = 23;
133
- static readonly RULE_afterDeclaration = 24;
134
- static readonly RULE_everyDeclaration = 25;
135
- static readonly RULE_limitClause = 26;
136
- static readonly RULE_cancelStatement = 27;
137
- static readonly RULE_breakStatement = 28;
138
- static readonly RULE_continueStatement = 29;
139
- static readonly RULE_functionNameIdentifier = 30;
140
- static readonly RULE_functionDeclaration = 31;
141
- static readonly RULE_functionDefinition = 32;
142
- static readonly RULE_functionParameters = 33;
143
- static readonly RULE_functionParameter = 34;
144
- static readonly RULE_assignmentPattern = 35;
145
- static readonly RULE_restElement = 36;
146
- static readonly RULE_ifStatement = 37;
147
- static readonly RULE_elseStatement = 38;
148
- static readonly RULE_elseIfStatement = 39;
149
- static readonly RULE_variableDeclaration = 40;
150
- static readonly RULE_variableDeclarator = 41;
151
- static readonly RULE_variableDeclaratorWithInit = 42;
152
- static readonly RULE_catchStatement = 43;
153
- static readonly RULE_catchAsStatement = 44;
154
- static readonly RULE_comment = 45;
155
- static readonly RULE_returnStatement = 46;
156
- static readonly RULE_forStatement = 47;
157
- static readonly RULE_evaluateCase = 48;
158
- static readonly RULE_evaluateCaseTest = 49;
159
- static readonly RULE_wildcard = 50;
160
- static readonly RULE_evaluateFallback = 51;
161
- static readonly RULE_evaluateBranch = 52;
162
- static readonly RULE_evaluateArguments = 53;
163
- static readonly RULE_evaluateStatement = 54;
164
- static readonly RULE_callArguments = 55;
165
- static readonly RULE_protocolDeclaration = 56;
166
- static readonly RULE_protocolBody = 57;
167
- static readonly RULE_protocolComparator = 58;
168
- static readonly RULE_defineStatement = 59;
169
- static readonly RULE_requireStatement = 60;
170
- static readonly RULE_stepDeclaration = 61;
171
- static readonly RULE_stepBody = 62;
172
- static readonly RULE_enumDeclaration = 63;
173
- static readonly RULE_enumBody = 64;
174
- static readonly RULE_token = 65;
175
- static readonly RULE_blockStatement = 66;
176
- static readonly RULE_literal = 67;
177
- static readonly RULE_valueInternal = 68;
178
- static readonly RULE_lineEnd = 69;
179
- static readonly RULE_customType = 70;
180
- static readonly RULE_dataType = 71;
181
- static readonly RULE_type = 72;
182
- static readonly RULE_protocolType = 73;
183
- static readonly RULE_arrayExpressionInternal = 74;
184
- static readonly RULE_objectExpressionInternal = 75;
185
- static readonly RULE_objectProperty = 76;
186
- static readonly RULE_stringLiteral = 77;
187
- static readonly RULE_numberLiteral = 78;
188
- static readonly RULE_booleanLiteral = 79;
189
- static readonly RULE_nullLiteral = 80;
190
- static readonly RULE_undefinedLiteral = 81;
191
- static readonly RULE_expandedIdentifier = 82;
192
- static readonly RULE_identifier = 83;
129
+ static readonly RULE_stateModuleDeclaration = 23;
130
+ static readonly RULE_stateModuleBody = 24;
131
+ static readonly RULE_stateModuleEventDeclaration = 25;
132
+ static readonly RULE_afterDeclaration = 26;
133
+ static readonly RULE_everyDeclaration = 27;
134
+ static readonly RULE_limitClause = 28;
135
+ static readonly RULE_cancelStatement = 29;
136
+ static readonly RULE_breakStatement = 30;
137
+ static readonly RULE_continueStatement = 31;
138
+ static readonly RULE_functionNameIdentifier = 32;
139
+ static readonly RULE_functionDeclaration = 33;
140
+ static readonly RULE_functionDefinition = 34;
141
+ static readonly RULE_functionParameters = 35;
142
+ static readonly RULE_functionParameter = 36;
143
+ static readonly RULE_assignmentPattern = 37;
144
+ static readonly RULE_restElement = 38;
145
+ static readonly RULE_ifStatement = 39;
146
+ static readonly RULE_elseStatement = 40;
147
+ static readonly RULE_elseIfStatement = 41;
148
+ static readonly RULE_variableDeclaration = 42;
149
+ static readonly RULE_variableDeclarator = 43;
150
+ static readonly RULE_variableDeclaratorWithInit = 44;
151
+ static readonly RULE_catchStatement = 45;
152
+ static readonly RULE_catchAsStatement = 46;
153
+ static readonly RULE_comment = 47;
154
+ static readonly RULE_returnStatement = 48;
155
+ static readonly RULE_forStatement = 49;
156
+ static readonly RULE_evaluateCase = 50;
157
+ static readonly RULE_evaluateCaseTest = 51;
158
+ static readonly RULE_wildcard = 52;
159
+ static readonly RULE_evaluateFallback = 53;
160
+ static readonly RULE_evaluateBranch = 54;
161
+ static readonly RULE_evaluateArguments = 55;
162
+ static readonly RULE_evaluateStatement = 56;
163
+ static readonly RULE_callArguments = 57;
164
+ static readonly RULE_protocolDeclaration = 58;
165
+ static readonly RULE_protocolBody = 59;
166
+ static readonly RULE_protocolComparator = 60;
167
+ static readonly RULE_defineStatement = 61;
168
+ static readonly RULE_requireStatement = 62;
169
+ static readonly RULE_stepDeclaration = 63;
170
+ static readonly RULE_stepBody = 64;
171
+ static readonly RULE_endStatement = 65;
172
+ static readonly RULE_enumDeclaration = 66;
173
+ static readonly RULE_enumBody = 67;
174
+ static readonly RULE_enumAssignment = 68;
175
+ static readonly RULE_token = 69;
176
+ static readonly RULE_debuggerStatement = 70;
177
+ static readonly RULE_blockStatement = 71;
178
+ static readonly RULE_literal = 72;
179
+ static readonly RULE_valueInternal = 73;
180
+ static readonly RULE_lineEnd = 74;
181
+ static readonly RULE_customType = 75;
182
+ static readonly RULE_dataType = 76;
183
+ static readonly RULE_type = 77;
184
+ static readonly RULE_protocolType = 78;
185
+ static readonly RULE_arrayExpressionInternal = 79;
186
+ static readonly RULE_objectExpressionInternal = 80;
187
+ static readonly RULE_objectProperty = 81;
188
+ static readonly RULE_stringLiteral = 82;
189
+ static readonly RULE_numberLiteral = 83;
190
+ static readonly RULE_booleanLiteral = 84;
191
+ static readonly RULE_nullLiteral = 85;
192
+ static readonly RULE_undefinedLiteral = 86;
193
+ static readonly RULE_identifier = 87;
193
194
  static readonly ruleNames: string[];
194
195
  private static readonly _LITERAL_NAMES;
195
196
  private static readonly _SYMBOLIC_NAMES;
@@ -224,7 +225,9 @@ export declare class BattleScriptParser extends Parser {
224
225
  primaryExpression(): PrimaryExpressionContext;
225
226
  stateDeclaration(): StateDeclarationContext;
226
227
  stateBody(): StateBodyContext;
227
- eventDeclaration(): EventDeclarationContext;
228
+ stateModuleDeclaration(): StateModuleDeclarationContext;
229
+ stateModuleBody(): StateModuleBodyContext;
230
+ stateModuleEventDeclaration(): StateModuleEventDeclarationContext;
228
231
  afterDeclaration(): AfterDeclarationContext;
229
232
  everyDeclaration(): EveryDeclarationContext;
230
233
  limitClause(): LimitClauseContext;
@@ -264,9 +267,12 @@ export declare class BattleScriptParser extends Parser {
264
267
  requireStatement(): RequireStatementContext;
265
268
  stepDeclaration(): StepDeclarationContext;
266
269
  stepBody(): StepBodyContext;
270
+ endStatement(): EndStatementContext;
267
271
  enumDeclaration(): EnumDeclarationContext;
268
272
  enumBody(): EnumBodyContext;
273
+ enumAssignment(): EnumAssignmentContext;
269
274
  token(): TokenContext;
275
+ debuggerStatement(): DebuggerStatementContext;
270
276
  blockStatement(): BlockStatementContext;
271
277
  literal(): LiteralContext;
272
278
  valueInternal(): ValueInternalContext;
@@ -285,7 +291,6 @@ export declare class BattleScriptParser extends Parser {
285
291
  booleanLiteral(): BooleanLiteralContext;
286
292
  nullLiteral(): NullLiteralContext;
287
293
  undefinedLiteral(): UndefinedLiteralContext;
288
- expandedIdentifier(): ExpandedIdentifierContext;
289
294
  identifier(): IdentifierContext;
290
295
  sempred(_localctx: RuleContext, ruleIndex: number, predIndex: number): boolean;
291
296
  private expression_sempred;
@@ -480,6 +485,7 @@ export declare class StatementContext extends ParserRuleContext {
480
485
  forStatement(): ForStatementContext | undefined;
481
486
  evaluateStatement(): EvaluateStatementContext | undefined;
482
487
  exportStatement(): ExportStatementContext | undefined;
488
+ debuggerStatement(): DebuggerStatementContext | undefined;
483
489
  comment(): CommentContext | undefined;
484
490
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
485
491
  get ruleIndex(): number;
@@ -690,9 +696,10 @@ export declare class PrimaryExpressionContext extends ParserRuleContext {
690
696
  }
691
697
  export declare class StateDeclarationContext extends ParserRuleContext {
692
698
  STATE(): TerminalNode;
693
- valueInternal(): ValueInternalContext;
694
699
  BRACES_START(): TerminalNode;
695
700
  BRACES_END(): TerminalNode;
701
+ expression(): ExpressionContext | undefined;
702
+ wildcard(): WildcardContext | undefined;
696
703
  stateBody(): StateBodyContext[];
697
704
  stateBody(i: number): StateBodyContext;
698
705
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
@@ -703,19 +710,43 @@ export declare class StateDeclarationContext extends ParserRuleContext {
703
710
  }
704
711
  export declare class StateBodyContext extends ParserRuleContext {
705
712
  statement(): StatementContext | undefined;
706
- eventDeclaration(): EventDeclarationContext | undefined;
713
+ stateModuleDeclaration(): StateModuleDeclarationContext | undefined;
707
714
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
708
715
  get ruleIndex(): number;
709
716
  enterRule(listener: BattleScriptListener): void;
710
717
  exitRule(listener: BattleScriptListener): void;
711
718
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
712
719
  }
713
- export declare class EventDeclarationContext extends ParserRuleContext {
720
+ export declare class StateModuleDeclarationContext extends ParserRuleContext {
721
+ MODULE(): TerminalNode;
722
+ BRACES_START(): TerminalNode;
723
+ BRACES_END(): TerminalNode;
724
+ expression(): ExpressionContext | undefined;
725
+ wildcard(): WildcardContext | undefined;
726
+ stateModuleBody(): StateModuleBodyContext[];
727
+ stateModuleBody(i: number): StateModuleBodyContext;
728
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
729
+ get ruleIndex(): number;
730
+ enterRule(listener: BattleScriptListener): void;
731
+ exitRule(listener: BattleScriptListener): void;
732
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
733
+ }
734
+ export declare class StateModuleBodyContext extends ParserRuleContext {
735
+ statement(): StatementContext | undefined;
736
+ stateModuleEventDeclaration(): StateModuleEventDeclarationContext | undefined;
737
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
738
+ get ruleIndex(): number;
739
+ enterRule(listener: BattleScriptListener): void;
740
+ exitRule(listener: BattleScriptListener): void;
741
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
742
+ }
743
+ export declare class StateModuleEventDeclarationContext extends ParserRuleContext {
714
744
  EVENT(): TerminalNode;
715
- valueInternal(): ValueInternalContext;
716
745
  functionParameters(): FunctionParametersContext;
717
746
  ARROW_OPERATOR(): TerminalNode;
718
747
  blockStatement(): BlockStatementContext;
748
+ expression(): ExpressionContext | undefined;
749
+ wildcard(): WildcardContext | undefined;
719
750
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
720
751
  get ruleIndex(): number;
721
752
  enterRule(listener: BattleScriptListener): void;
@@ -991,6 +1022,7 @@ export declare class EvaluateCaseContext extends ParserRuleContext {
991
1022
  PARENS_END(): TerminalNode;
992
1023
  ARROW_OPERATOR(): TerminalNode;
993
1024
  blockStatement(): BlockStatementContext;
1025
+ lineEnd(): LineEndContext;
994
1026
  evaluateCaseTest(): EvaluateCaseTestContext[];
995
1027
  evaluateCaseTest(i: number): EvaluateCaseTestContext;
996
1028
  COMMA(): TerminalNode[];
@@ -1021,6 +1053,7 @@ export declare class WildcardContext extends ParserRuleContext {
1021
1053
  export declare class EvaluateFallbackContext extends ParserRuleContext {
1022
1054
  FALLBACK(): TerminalNode;
1023
1055
  blockStatement(): BlockStatementContext;
1056
+ lineEnd(): LineEndContext;
1024
1057
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
1025
1058
  get ruleIndex(): number;
1026
1059
  enterRule(listener: BattleScriptListener): void;
@@ -1030,6 +1063,7 @@ export declare class EvaluateFallbackContext extends ParserRuleContext {
1030
1063
  export declare class EvaluateBranchContext extends ParserRuleContext {
1031
1064
  evaluateCase(): EvaluateCaseContext | undefined;
1032
1065
  evaluateFallback(): EvaluateFallbackContext | undefined;
1066
+ comment(): CommentContext | undefined;
1033
1067
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
1034
1068
  get ruleIndex(): number;
1035
1069
  enterRule(listener: BattleScriptListener): void;
@@ -1053,6 +1087,7 @@ export declare class EvaluateStatementContext extends ParserRuleContext {
1053
1087
  EVALUATE(): TerminalNode;
1054
1088
  BRACES_START(): TerminalNode;
1055
1089
  BRACES_END(): TerminalNode;
1090
+ lineEnd(): LineEndContext;
1056
1091
  evaluateArguments(): EvaluateArgumentsContext | undefined;
1057
1092
  evaluateBranch(): EvaluateBranchContext[];
1058
1093
  evaluateBranch(i: number): EvaluateBranchContext;
@@ -1150,6 +1185,7 @@ export declare class StepDeclarationContext extends ParserRuleContext {
1150
1185
  export declare class StepBodyContext extends ParserRuleContext {
1151
1186
  defineStatement(): DefineStatementContext | undefined;
1152
1187
  requireStatement(): RequireStatementContext | undefined;
1188
+ endStatement(): EndStatementContext | undefined;
1153
1189
  comment(): CommentContext | undefined;
1154
1190
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
1155
1191
  get ruleIndex(): number;
@@ -1157,6 +1193,15 @@ export declare class StepBodyContext extends ParserRuleContext {
1157
1193
  exitRule(listener: BattleScriptListener): void;
1158
1194
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1159
1195
  }
1196
+ export declare class EndStatementContext extends ParserRuleContext {
1197
+ END(): TerminalNode;
1198
+ lineEnd(): LineEndContext;
1199
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1200
+ get ruleIndex(): number;
1201
+ enterRule(listener: BattleScriptListener): void;
1202
+ exitRule(listener: BattleScriptListener): void;
1203
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1204
+ }
1160
1205
  export declare class EnumDeclarationContext extends ParserRuleContext {
1161
1206
  ENUM(): TerminalNode;
1162
1207
  identifier(): IdentifierContext;
@@ -1174,6 +1219,7 @@ export declare class EnumBodyContext extends ParserRuleContext {
1174
1219
  identifier(): IdentifierContext | undefined;
1175
1220
  SEMI_COLON(): TerminalNode | undefined;
1176
1221
  COMMA(): TerminalNode | undefined;
1222
+ enumAssignment(): EnumAssignmentContext | undefined;
1177
1223
  comment(): CommentContext | undefined;
1178
1224
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
1179
1225
  get ruleIndex(): number;
@@ -1181,6 +1227,18 @@ export declare class EnumBodyContext extends ParserRuleContext {
1181
1227
  exitRule(listener: BattleScriptListener): void;
1182
1228
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1183
1229
  }
1230
+ export declare class EnumAssignmentContext extends ParserRuleContext {
1231
+ identifier(): IdentifierContext;
1232
+ ASSIGN(): TerminalNode;
1233
+ literal(): LiteralContext;
1234
+ SEMI_COLON(): TerminalNode | undefined;
1235
+ COMMA(): TerminalNode | undefined;
1236
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1237
+ get ruleIndex(): number;
1238
+ enterRule(listener: BattleScriptListener): void;
1239
+ exitRule(listener: BattleScriptListener): void;
1240
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1241
+ }
1184
1242
  export declare class TokenContext extends ParserRuleContext {
1185
1243
  identifier(): IdentifierContext | undefined;
1186
1244
  primaryExpression(): PrimaryExpressionContext | undefined;
@@ -1190,6 +1248,15 @@ export declare class TokenContext extends ParserRuleContext {
1190
1248
  exitRule(listener: BattleScriptListener): void;
1191
1249
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1192
1250
  }
1251
+ export declare class DebuggerStatementContext extends ParserRuleContext {
1252
+ DEBUGGER(): TerminalNode;
1253
+ lineEnd(): LineEndContext;
1254
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1255
+ get ruleIndex(): number;
1256
+ enterRule(listener: BattleScriptListener): void;
1257
+ exitRule(listener: BattleScriptListener): void;
1258
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1259
+ }
1193
1260
  export declare class BlockStatementContext extends ParserRuleContext {
1194
1261
  BRACES_START(): TerminalNode;
1195
1262
  BRACES_END(): TerminalNode;
@@ -1214,8 +1281,7 @@ export declare class LiteralContext extends ParserRuleContext {
1214
1281
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1215
1282
  }
1216
1283
  export declare class ValueInternalContext extends ParserRuleContext {
1217
- literal(): LiteralContext | undefined;
1218
- token(): TokenContext | undefined;
1284
+ primaryExpression(): PrimaryExpressionContext;
1219
1285
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
1220
1286
  get ruleIndex(): number;
1221
1287
  enterRule(listener: BattleScriptListener): void;
@@ -1253,7 +1319,7 @@ export declare class DataTypeContext extends ParserRuleContext {
1253
1319
  TYPE_NULL(): TerminalNode | undefined;
1254
1320
  TYPE_UNDEFINED(): TerminalNode | undefined;
1255
1321
  TYPE_VOID(): TerminalNode | undefined;
1256
- TYPE_ANY(): TerminalNode | undefined;
1322
+ ANY(): TerminalNode | undefined;
1257
1323
  dataType(): DataTypeContext | undefined;
1258
1324
  BRACKETS_START(): TerminalNode | undefined;
1259
1325
  BRACKETS_END(): TerminalNode | undefined;
@@ -1273,12 +1339,11 @@ export declare class TypeContext extends ParserRuleContext {
1273
1339
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1274
1340
  }
1275
1341
  export declare class ProtocolTypeContext extends ParserRuleContext {
1276
- PROTOCOL_TYPE_U1(): TerminalNode | undefined;
1277
- PROTOCOL_TYPE_U2(): TerminalNode | undefined;
1278
- PROTOCOL_TYPE_U4(): TerminalNode | undefined;
1279
- PROTOCOL_TYPE_I1(): TerminalNode | undefined;
1280
- PROTOCOL_TYPE_I2(): TerminalNode | undefined;
1281
- PROTOCOL_TYPE_I4(): TerminalNode | undefined;
1342
+ TYPE_UINT(): TerminalNode | undefined;
1343
+ LT(): TerminalNode | undefined;
1344
+ numberLiteral(): NumberLiteralContext | undefined;
1345
+ GT(): TerminalNode | undefined;
1346
+ TYPE_INT(): TerminalNode | undefined;
1282
1347
  TYPE_STRING(): TerminalNode | undefined;
1283
1348
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
1284
1349
  get ruleIndex(): number;
@@ -1363,15 +1428,6 @@ export declare class UndefinedLiteralContext extends ParserRuleContext {
1363
1428
  exitRule(listener: BattleScriptListener): void;
1364
1429
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1365
1430
  }
1366
- export declare class ExpandedIdentifierContext extends ParserRuleContext {
1367
- IDENTIFIER(): TerminalNode | undefined;
1368
- STATE(): TerminalNode | undefined;
1369
- constructor(parent: ParserRuleContext | undefined, invokingState: number);
1370
- get ruleIndex(): number;
1371
- enterRule(listener: BattleScriptListener): void;
1372
- exitRule(listener: BattleScriptListener): void;
1373
- accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1374
- }
1375
1431
  export declare class IdentifierContext extends ParserRuleContext {
1376
1432
  IDENTIFIER(): TerminalNode;
1377
1433
  constructor(parent: ParserRuleContext | undefined, invokingState: number);