@irrelon/battlescript 3.2.4 → 4.0.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 (140) hide show
  1. package/bin/functionality.ts +4 -1
  2. package/bin/index.js +5220 -2129
  3. package/bin/index.js.map +1 -1
  4. package/bin/index.ts +12 -1
  5. package/dist/bin/functionality.cjs +43236 -0
  6. package/dist/bin/functionality.cjs.map +1 -0
  7. package/dist/bin/functionality.d.ts.map +1 -1
  8. package/dist/bin/functionality.js +43226 -0
  9. package/dist/bin/functionality.js.map +1 -0
  10. package/dist/bin/index.d.ts +2 -1
  11. package/dist/bin/index.d.ts.map +1 -1
  12. package/dist/exports/index.d.ts +0 -1
  13. package/dist/exports/index.d.ts.map +1 -1
  14. package/dist/exports/typescript/enums/EnumNodeKind.d.ts +50 -39
  15. package/dist/exports/typescript/enums/EnumNodeKind.d.ts.map +1 -1
  16. package/dist/exports/typescript/enums/EnumNodeProp.d.ts +54 -41
  17. package/dist/exports/typescript/enums/EnumNodeProp.d.ts.map +1 -1
  18. package/dist/exports/typescript/helpers/miniAstLayout.d.ts.map +1 -1
  19. package/dist/index.cjs +7581 -4159
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.mjs +5779 -2395
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/scripts/exportGen/enums/generateEnums.d.ts.map +1 -1
  24. package/dist/services/fullAst/BattleScriptFromAST.d.ts +12 -1
  25. package/dist/services/fullAst/BattleScriptFromAST.d.ts.map +1 -1
  26. package/dist/services/fullAst/BattleScriptToAST.d.ts +16 -2
  27. package/dist/services/fullAst/BattleScriptToAST.d.ts.map +1 -1
  28. package/dist/services/grammar/ts/language/BattleScriptLexer.d.ts +102 -88
  29. package/dist/services/grammar/ts/language/BattleScriptLexer.d.ts.map +1 -1
  30. package/dist/services/grammar/ts/language/BattleScriptListener.d.ts +175 -21
  31. package/dist/services/grammar/ts/language/BattleScriptListener.d.ts.map +1 -1
  32. package/dist/services/grammar/ts/language/BattleScriptParser.d.ts +439 -201
  33. package/dist/services/grammar/ts/language/BattleScriptParser.d.ts.map +1 -1
  34. package/dist/services/grammar/ts/language/BattleScriptVisitor.d.ts +111 -13
  35. package/dist/services/grammar/ts/language/BattleScriptVisitor.d.ts.map +1 -1
  36. package/dist/services/index.d.ts +2 -0
  37. package/dist/services/index.d.ts.map +1 -1
  38. package/dist/services/miniAst/BattleScriptToMiniAST.d.ts +8 -0
  39. package/dist/services/miniAst/BattleScriptToMiniAST.d.ts.map +1 -1
  40. package/dist/services/miniAst/binaryReader.d.ts.map +1 -1
  41. package/dist/services/miniAst/binaryTypeToByteSize.d.ts +1 -1
  42. package/dist/services/miniAst/binaryWriter.d.ts.map +1 -1
  43. package/dist/services/miniAst/index.d.ts +0 -1
  44. package/dist/services/miniAst/index.d.ts.map +1 -1
  45. package/dist/services/miniAst/miniAstLayout.d.ts.map +1 -1
  46. package/dist/services/moduleResolver.d.ts +151 -0
  47. package/dist/services/moduleResolver.d.ts.map +1 -0
  48. package/dist/services/treeShaker/DependencyAnalyzer.d.ts +38 -0
  49. package/dist/services/treeShaker/DependencyAnalyzer.d.ts.map +1 -0
  50. package/dist/services/treeShaker/EntryPointCollector.d.ts +17 -0
  51. package/dist/services/treeShaker/EntryPointCollector.d.ts.map +1 -0
  52. package/dist/services/treeShaker/TreeShaker.d.ts +17 -0
  53. package/dist/services/treeShaker/TreeShaker.d.ts.map +1 -0
  54. package/dist/services/treeShaker/index.d.ts +6 -0
  55. package/dist/services/treeShaker/index.d.ts.map +1 -0
  56. package/dist/services/treeShaker/treeShake.d.ts +12 -0
  57. package/dist/services/treeShaker/treeShake.d.ts.map +1 -0
  58. package/dist/services/treeShaker/types.d.ts +50 -0
  59. package/dist/services/treeShaker/types.d.ts.map +1 -0
  60. package/dist/tests/ast/export.test.d.ts +2 -0
  61. package/dist/tests/ast/export.test.d.ts.map +1 -0
  62. package/dist/tests/ast/import.test.d.ts +2 -0
  63. package/dist/tests/ast/import.test.d.ts.map +1 -0
  64. package/dist/tests/ast/moduleResolver.test.d.ts +2 -0
  65. package/dist/tests/ast/moduleResolver.test.d.ts.map +1 -0
  66. package/dist/tests/ast/tree-shaking.test.d.ts +2 -0
  67. package/dist/tests/ast/tree-shaking.test.d.ts.map +1 -0
  68. package/dist/tsconfig.types.tsbuildinfo +1 -1
  69. package/dist/types/BattleScriptTransformerOptions.d.ts +1 -0
  70. package/dist/types/BattleScriptTransformerOptions.d.ts.map +1 -1
  71. package/dist/types/MiniAstJson.d.ts +18 -1
  72. package/dist/types/MiniAstJson.d.ts.map +1 -1
  73. package/dist/types/TokenMetaData.d.ts +2 -0
  74. package/dist/types/TokenMetaData.d.ts.map +1 -1
  75. package/dist/types/ast/nodes/AstNode.d.ts +2 -3
  76. package/dist/types/ast/nodes/AstNode.d.ts.map +1 -1
  77. package/dist/types/ast/nodes/AstNodeBase.d.ts +2 -0
  78. package/dist/types/ast/nodes/AstNodeBase.d.ts.map +1 -1
  79. package/dist/types/ast/nodes/ConstantDeclarationNode.d.ts +2 -1
  80. package/dist/types/ast/nodes/ConstantDeclarationNode.d.ts.map +1 -1
  81. package/dist/types/ast/nodes/DefineStatementNode.d.ts.map +1 -1
  82. package/dist/types/ast/nodes/EndStatementNode.d.ts +1 -0
  83. package/dist/types/ast/nodes/EndStatementNode.d.ts.map +1 -1
  84. package/dist/types/ast/nodes/EnumDeclarationNode.d.ts +2 -1
  85. package/dist/types/ast/nodes/EnumDeclarationNode.d.ts.map +1 -1
  86. package/dist/types/ast/nodes/ExportNamedDeclarationNode.d.ts +32 -0
  87. package/dist/types/ast/nodes/ExportNamedDeclarationNode.d.ts.map +1 -0
  88. package/dist/types/ast/nodes/ExportSpecifierNode.d.ts +27 -0
  89. package/dist/types/ast/nodes/ExportSpecifierNode.d.ts.map +1 -0
  90. package/dist/types/ast/nodes/ForwardStatementNode.d.ts +11 -0
  91. package/dist/types/ast/nodes/ForwardStatementNode.d.ts.map +1 -0
  92. package/dist/types/ast/nodes/FunctionDeclarationNode.d.ts +2 -1
  93. package/dist/types/ast/nodes/FunctionDeclarationNode.d.ts.map +1 -1
  94. package/dist/types/ast/nodes/FunctionDefinitionNode.d.ts +2 -1
  95. package/dist/types/ast/nodes/FunctionDefinitionNode.d.ts.map +1 -1
  96. package/dist/types/ast/nodes/ImportDeclarationNode.d.ts +4 -2
  97. package/dist/types/ast/nodes/ImportDeclarationNode.d.ts.map +1 -1
  98. package/dist/types/ast/nodes/ImportSpecifierNode.d.ts +27 -0
  99. package/dist/types/ast/nodes/ImportSpecifierNode.d.ts.map +1 -0
  100. package/dist/types/ast/nodes/IncludeStatementNode.d.ts +13 -0
  101. package/dist/types/ast/nodes/IncludeStatementNode.d.ts.map +1 -0
  102. package/dist/types/ast/nodes/InterfaceNode.d.ts +2 -1
  103. package/dist/types/ast/nodes/InterfaceNode.d.ts.map +1 -1
  104. package/dist/types/ast/nodes/OffsetStatementNode.d.ts +11 -0
  105. package/dist/types/ast/nodes/OffsetStatementNode.d.ts.map +1 -0
  106. package/dist/types/ast/nodes/ParityDeclarationNode.d.ts +12 -0
  107. package/dist/types/ast/nodes/ParityDeclarationNode.d.ts.map +1 -0
  108. package/dist/types/ast/nodes/ProtocolOpStatementNode.d.ts +13 -0
  109. package/dist/types/ast/nodes/ProtocolOpStatementNode.d.ts.map +1 -0
  110. package/dist/types/ast/nodes/ProtocolReadTypeNode.d.ts +14 -0
  111. package/dist/types/ast/nodes/ProtocolReadTypeNode.d.ts.map +1 -0
  112. package/dist/types/ast/nodes/RequireStatementNode.d.ts +1 -0
  113. package/dist/types/ast/nodes/RequireStatementNode.d.ts.map +1 -1
  114. package/dist/types/ast/nodes/RewindStatementNode.d.ts +11 -0
  115. package/dist/types/ast/nodes/RewindStatementNode.d.ts.map +1 -0
  116. package/dist/types/ast/nodes/RootNode.d.ts +1 -0
  117. package/dist/types/ast/nodes/RootNode.d.ts.map +1 -1
  118. package/dist/types/ast/nodes/RuleStatementNode.d.ts +19 -0
  119. package/dist/types/ast/nodes/RuleStatementNode.d.ts.map +1 -0
  120. package/dist/types/ast/nodes/StateDeclarationNode.d.ts +2 -1
  121. package/dist/types/ast/nodes/StateDeclarationNode.d.ts.map +1 -1
  122. package/dist/types/ast/nodes/StepDeclarationNode.d.ts +2 -2
  123. package/dist/types/ast/nodes/StepDeclarationNode.d.ts.map +1 -1
  124. package/dist/types/ast/nodes/VariableDeclarationNode.d.ts +2 -1
  125. package/dist/types/ast/nodes/VariableDeclarationNode.d.ts.map +1 -1
  126. package/dist/types/ast/nodes/index.d.ts +11 -0
  127. package/dist/types/ast/nodes/index.d.ts.map +1 -1
  128. package/dist/types/ast/unions/index.d.ts +10 -8
  129. package/dist/types/ast/unions/index.d.ts.map +1 -1
  130. package/dist/types/index.d.ts +1 -0
  131. package/dist/types/index.d.ts.map +1 -1
  132. package/package.json +77 -72
  133. package/dist/exports/typescript/enums/EnumOpCode.d.ts +0 -28
  134. package/dist/exports/typescript/enums/EnumOpCode.d.ts.map +0 -1
  135. package/dist/scripts/exportGen/enums/opCodes.d.ts +0 -2
  136. package/dist/scripts/exportGen/enums/opCodes.d.ts.map +0 -1
  137. package/dist/services/miniAst/miniAstInterpreter.d.ts +0 -17
  138. package/dist/services/miniAst/miniAstInterpreter.d.ts.map +0 -1
  139. package/dist/types/ast/nodes/EventDeclarationNode.d.ts +0 -15
  140. package/dist/types/ast/nodes/EventDeclarationNode.d.ts.map +0 -1
@@ -15,182 +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 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;
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;
106
120
  static readonly RULE_root = 0;
107
121
  static readonly RULE_importDeclaration = 1;
108
- static readonly RULE_importNative = 2;
109
- static readonly RULE_importExternal = 3;
110
- static readonly RULE_programDeclaration = 4;
111
- static readonly RULE_programProperty = 5;
112
- static readonly RULE_exposeDeclaration = 6;
113
- static readonly RULE_groupDeclaration = 7;
114
- static readonly RULE_configProperty = 8;
115
- static readonly RULE_configPropertyBody = 9;
116
- static readonly RULE_rootBody = 10;
117
- static readonly RULE_interfaceDeclaration = 11;
118
- static readonly RULE_interfaceProperty = 12;
119
- static readonly RULE_statement = 13;
120
- static readonly RULE_exportStatement = 14;
121
- static readonly RULE_exportNamespace = 15;
122
- static readonly RULE_exportIdentifier = 16;
123
- static readonly RULE_expressionStatement = 17;
124
- static readonly RULE_namespacedIdentifier = 18;
125
- static readonly RULE_expression = 19;
126
- static readonly RULE_primaryExpression = 20;
127
- static readonly RULE_stateDeclaration = 21;
128
- static readonly RULE_stateBody = 22;
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;
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;
194
222
  static readonly ruleNames: string[];
195
223
  private static readonly _LITERAL_NAMES;
196
224
  private static readonly _SYMBOLIC_NAMES;
@@ -203,8 +231,10 @@ export declare class BattleScriptParser extends Parser {
203
231
  constructor(input: TokenStream);
204
232
  root(): RootContext;
205
233
  importDeclaration(): ImportDeclarationContext;
234
+ includeStatement(): IncludeStatementContext;
206
235
  importNative(): ImportNativeContext;
207
236
  importExternal(): ImportExternalContext;
237
+ importSpecifier(): ImportSpecifierContext;
208
238
  programDeclaration(): ProgramDeclarationContext;
209
239
  programProperty(): ProgramPropertyContext;
210
240
  exposeDeclaration(): ExposeDeclarationContext;
@@ -216,8 +246,10 @@ export declare class BattleScriptParser extends Parser {
216
246
  interfaceProperty(): InterfacePropertyContext;
217
247
  statement(): StatementContext;
218
248
  exportStatement(): ExportStatementContext;
219
- exportNamespace(): ExportNamespaceContext;
220
- exportIdentifier(): ExportIdentifierContext;
249
+ exportNamed(): ExportNamedContext;
250
+ exportSpecifier(): ExportSpecifierContext;
251
+ exportInline(): ExportInlineContext;
252
+ exportReexport(): ExportReexportContext;
221
253
  expressionStatement(): ExpressionStatementContext;
222
254
  namespacedIdentifier(): NamespacedIdentifierContext;
223
255
  expression(): ExpressionContext;
@@ -261,11 +293,20 @@ export declare class BattleScriptParser extends Parser {
261
293
  evaluateStatement(): EvaluateStatementContext;
262
294
  callArguments(): CallArgumentsContext;
263
295
  protocolDeclaration(): ProtocolDeclarationContext;
264
- protocolBody(): ProtocolBodyContext;
265
296
  protocolComparator(): ProtocolComparatorContext;
266
297
  defineStatement(): DefineStatementContext;
267
298
  requireStatement(): RequireStatementContext;
299
+ terminateFlag(): TerminateFlagContext;
300
+ protocolOpStatement(): ProtocolOpStatementContext;
301
+ booleanOp(): BooleanOpContext;
302
+ forwardStatement(): ForwardStatementContext;
303
+ offsetStatement(): OffsetStatementContext;
304
+ rewindStatement(): RewindStatementContext;
268
305
  stepDeclaration(): StepDeclarationContext;
306
+ protocolPhase(): ProtocolPhaseContext;
307
+ parityDeclaration(): ParityDeclarationContext;
308
+ ruleStatement(): RuleStatementContext;
309
+ protocolBody(): ProtocolBodyContext;
269
310
  stepBody(): StepBodyContext;
270
311
  endStatement(): EndStatementContext;
271
312
  enumDeclaration(): EnumDeclarationContext;
@@ -283,6 +324,7 @@ export declare class BattleScriptParser extends Parser {
283
324
  dataType(_p: number): DataTypeContext;
284
325
  type(): TypeContext;
285
326
  protocolType(): ProtocolTypeContext;
327
+ protocolReadType(): ProtocolReadTypeContext;
286
328
  arrayExpressionInternal(): ArrayExpressionInternalContext;
287
329
  objectExpressionInternal(): ObjectExpressionInternalContext;
288
330
  objectProperty(): ObjectPropertyContext;
@@ -322,6 +364,16 @@ export declare class ImportDeclarationContext extends ParserRuleContext {
322
364
  exitRule(listener: BattleScriptListener): void;
323
365
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
324
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
+ }
325
377
  export declare class ImportNativeContext extends ParserRuleContext {
326
378
  IMPORT(): TerminalNode;
327
379
  identifier(): IdentifierContext[];
@@ -339,10 +391,11 @@ export declare class ImportExternalContext extends ParserRuleContext {
339
391
  NAMESPACE(): TerminalNode | undefined;
340
392
  stringLiteral(): StringLiteralContext;
341
393
  lineEnd(): LineEndContext;
342
- identifier(): IdentifierContext[];
343
- identifier(i: number): IdentifierContext;
394
+ identifier(): IdentifierContext | undefined;
344
395
  FROM(): TerminalNode | undefined;
345
396
  BRACES_START(): TerminalNode | undefined;
397
+ importSpecifier(): ImportSpecifierContext[];
398
+ importSpecifier(i: number): ImportSpecifierContext;
346
399
  BRACES_END(): TerminalNode | undefined;
347
400
  COMMA(): TerminalNode[];
348
401
  COMMA(i: number): TerminalNode;
@@ -352,6 +405,16 @@ export declare class ImportExternalContext extends ParserRuleContext {
352
405
  exitRule(listener: BattleScriptListener): void;
353
406
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
354
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
+ }
355
418
  export declare class ProgramDeclarationContext extends ParserRuleContext {
356
419
  PROGRAM(): TerminalNode;
357
420
  BRACES_START(): TerminalNode;
@@ -430,6 +493,8 @@ export declare class ConfigPropertyBodyContext extends ParserRuleContext {
430
493
  }
431
494
  export declare class RootBodyContext extends ParserRuleContext {
432
495
  importDeclaration(): ImportDeclarationContext | undefined;
496
+ includeStatement(): IncludeStatementContext | undefined;
497
+ exportStatement(): ExportStatementContext | undefined;
433
498
  interfaceDeclaration(): InterfaceDeclarationContext | undefined;
434
499
  exposeDeclaration(): ExposeDeclarationContext | undefined;
435
500
  programDeclaration(): ProgramDeclarationContext | undefined;
@@ -484,7 +549,6 @@ export declare class StatementContext extends ParserRuleContext {
484
549
  catchStatement(): CatchStatementContext | undefined;
485
550
  forStatement(): ForStatementContext | undefined;
486
551
  evaluateStatement(): EvaluateStatementContext | undefined;
487
- exportStatement(): ExportStatementContext | undefined;
488
552
  debuggerStatement(): DebuggerStatementContext | undefined;
489
553
  comment(): CommentContext | undefined;
490
554
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
@@ -494,20 +558,20 @@ export declare class StatementContext extends ParserRuleContext {
494
558
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
495
559
  }
496
560
  export declare class ExportStatementContext extends ParserRuleContext {
497
- exportNamespace(): ExportNamespaceContext | undefined;
498
- exportIdentifier(): ExportIdentifierContext | undefined;
561
+ exportNamed(): ExportNamedContext | undefined;
562
+ exportInline(): ExportInlineContext | undefined;
563
+ exportReexport(): ExportReexportContext | undefined;
499
564
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
500
565
  get ruleIndex(): number;
501
566
  enterRule(listener: BattleScriptListener): void;
502
567
  exitRule(listener: BattleScriptListener): void;
503
568
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
504
569
  }
505
- export declare class ExportNamespaceContext extends ParserRuleContext {
570
+ export declare class ExportNamedContext extends ParserRuleContext {
506
571
  EXPORT(): TerminalNode;
507
- NAMESPACE(): TerminalNode;
508
- identifier(): IdentifierContext[];
509
- identifier(i: number): IdentifierContext;
510
572
  BRACES_START(): TerminalNode;
573
+ exportSpecifier(): ExportSpecifierContext[];
574
+ exportSpecifier(i: number): ExportSpecifierContext;
511
575
  BRACES_END(): TerminalNode;
512
576
  lineEnd(): LineEndContext;
513
577
  COMMA(): TerminalNode[];
@@ -518,10 +582,41 @@ export declare class ExportNamespaceContext extends ParserRuleContext {
518
582
  exitRule(listener: BattleScriptListener): void;
519
583
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
520
584
  }
521
- 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 {
522
596
  EXPORT(): TerminalNode;
523
- 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;
524
617
  lineEnd(): LineEndContext;
618
+ COMMA(): TerminalNode[];
619
+ COMMA(i: number): TerminalNode;
525
620
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
526
621
  get ruleIndex(): number;
527
622
  enterRule(listener: BattleScriptListener): void;
@@ -1125,18 +1220,6 @@ export declare class ProtocolDeclarationContext extends ParserRuleContext {
1125
1220
  exitRule(listener: BattleScriptListener): void;
1126
1221
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1127
1222
  }
1128
- export declare class ProtocolBodyContext extends ParserRuleContext {
1129
- enumDeclaration(): EnumDeclarationContext | undefined;
1130
- defineStatement(): DefineStatementContext | undefined;
1131
- requireStatement(): RequireStatementContext | undefined;
1132
- stepDeclaration(): StepDeclarationContext | undefined;
1133
- comment(): CommentContext | undefined;
1134
- constructor(parent: ParserRuleContext | undefined, invokingState: number);
1135
- get ruleIndex(): number;
1136
- enterRule(listener: BattleScriptListener): void;
1137
- exitRule(listener: BattleScriptListener): void;
1138
- accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1139
- }
1140
1223
  export declare class ProtocolComparatorContext extends ParserRuleContext {
1141
1224
  EQUALS(): TerminalNode | undefined;
1142
1225
  NOT_EQUALS(): TerminalNode | undefined;
@@ -1164,6 +1247,65 @@ export declare class RequireStatementContext extends ParserRuleContext {
1164
1247
  protocolComparator(): ProtocolComparatorContext;
1165
1248
  expression(): ExpressionContext;
1166
1249
  lineEnd(): LineEndContext;
1250
+ terminateFlag(): TerminateFlagContext | undefined;
1251
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1252
+ get ruleIndex(): number;
1253
+ enterRule(listener: BattleScriptListener): void;
1254
+ exitRule(listener: BattleScriptListener): void;
1255
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1256
+ }
1257
+ export declare class TerminateFlagContext extends ParserRuleContext {
1258
+ TERMINATE(): TerminalNode;
1259
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1260
+ get ruleIndex(): number;
1261
+ enterRule(listener: BattleScriptListener): void;
1262
+ exitRule(listener: BattleScriptListener): void;
1263
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1264
+ }
1265
+ export declare class ProtocolOpStatementContext extends ParserRuleContext {
1266
+ booleanOp(): BooleanOpContext;
1267
+ protocolReadType(): ProtocolReadTypeContext;
1268
+ stringLiteral(): StringLiteralContext;
1269
+ lineEnd(): LineEndContext;
1270
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1271
+ get ruleIndex(): number;
1272
+ enterRule(listener: BattleScriptListener): void;
1273
+ exitRule(listener: BattleScriptListener): void;
1274
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1275
+ }
1276
+ export declare class BooleanOpContext extends ParserRuleContext {
1277
+ XOR(): TerminalNode | undefined;
1278
+ XNOR(): TerminalNode | undefined;
1279
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1280
+ get ruleIndex(): number;
1281
+ enterRule(listener: BattleScriptListener): void;
1282
+ exitRule(listener: BattleScriptListener): void;
1283
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1284
+ }
1285
+ export declare class ForwardStatementContext extends ParserRuleContext {
1286
+ FORWARD(): TerminalNode;
1287
+ numberLiteral(): NumberLiteralContext;
1288
+ lineEnd(): LineEndContext;
1289
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1290
+ get ruleIndex(): number;
1291
+ enterRule(listener: BattleScriptListener): void;
1292
+ exitRule(listener: BattleScriptListener): void;
1293
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1294
+ }
1295
+ export declare class OffsetStatementContext extends ParserRuleContext {
1296
+ OFFSET(): TerminalNode;
1297
+ numberLiteral(): NumberLiteralContext;
1298
+ lineEnd(): LineEndContext;
1299
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1300
+ get ruleIndex(): number;
1301
+ enterRule(listener: BattleScriptListener): void;
1302
+ exitRule(listener: BattleScriptListener): void;
1303
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1304
+ }
1305
+ export declare class RewindStatementContext extends ParserRuleContext {
1306
+ REWIND(): TerminalNode;
1307
+ numberLiteral(): NumberLiteralContext;
1308
+ lineEnd(): LineEndContext;
1167
1309
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
1168
1310
  get ruleIndex(): number;
1169
1311
  enterRule(listener: BattleScriptListener): void;
@@ -1174,6 +1316,7 @@ export declare class StepDeclarationContext extends ParserRuleContext {
1174
1316
  STEP(): TerminalNode;
1175
1317
  BRACES_START(): TerminalNode;
1176
1318
  BRACES_END(): TerminalNode;
1319
+ protocolPhase(): ProtocolPhaseContext | undefined;
1177
1320
  stepBody(): StepBodyContext[];
1178
1321
  stepBody(i: number): StepBodyContext;
1179
1322
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
@@ -1182,10 +1325,75 @@ export declare class StepDeclarationContext extends ParserRuleContext {
1182
1325
  exitRule(listener: BattleScriptListener): void;
1183
1326
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1184
1327
  }
1328
+ export declare class ProtocolPhaseContext extends ParserRuleContext {
1329
+ DECODE(): TerminalNode | undefined;
1330
+ ENCODE(): TerminalNode | undefined;
1331
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1332
+ get ruleIndex(): number;
1333
+ enterRule(listener: BattleScriptListener): void;
1334
+ exitRule(listener: BattleScriptListener): void;
1335
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1336
+ }
1337
+ export declare class ParityDeclarationContext extends ParserRuleContext {
1338
+ PARITY(): TerminalNode;
1339
+ BRACES_START(): TerminalNode;
1340
+ BRACES_END(): TerminalNode;
1341
+ protocolPhase(): ProtocolPhaseContext | undefined;
1342
+ stepBody(): StepBodyContext[];
1343
+ stepBody(i: number): StepBodyContext;
1344
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1345
+ get ruleIndex(): number;
1346
+ enterRule(listener: BattleScriptListener): void;
1347
+ exitRule(listener: BattleScriptListener): void;
1348
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1349
+ }
1350
+ export declare class RuleStatementContext extends ParserRuleContext {
1351
+ RULE(): TerminalNode;
1352
+ protocolType(): ProtocolTypeContext;
1353
+ stringLiteral(): StringLiteralContext[];
1354
+ stringLiteral(i: number): StringLiteralContext;
1355
+ ASSIGN(): TerminalNode;
1356
+ protocolComparator(): ProtocolComparatorContext;
1357
+ numberLiteral(): NumberLiteralContext[];
1358
+ numberLiteral(i: number): NumberLiteralContext;
1359
+ QUESTION_MARK(): TerminalNode;
1360
+ COLON(): TerminalNode;
1361
+ lineEnd(): LineEndContext;
1362
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1363
+ get ruleIndex(): number;
1364
+ enterRule(listener: BattleScriptListener): void;
1365
+ exitRule(listener: BattleScriptListener): void;
1366
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1367
+ }
1368
+ export declare class ProtocolBodyContext extends ParserRuleContext {
1369
+ enumDeclaration(): EnumDeclarationContext | undefined;
1370
+ defineStatement(): DefineStatementContext | undefined;
1371
+ requireStatement(): RequireStatementContext | undefined;
1372
+ protocolOpStatement(): ProtocolOpStatementContext | undefined;
1373
+ forwardStatement(): ForwardStatementContext | undefined;
1374
+ offsetStatement(): OffsetStatementContext | undefined;
1375
+ rewindStatement(): RewindStatementContext | undefined;
1376
+ parityDeclaration(): ParityDeclarationContext | undefined;
1377
+ stepDeclaration(): StepDeclarationContext | undefined;
1378
+ ruleStatement(): RuleStatementContext | undefined;
1379
+ endStatement(): EndStatementContext | undefined;
1380
+ comment(): CommentContext | undefined;
1381
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1382
+ get ruleIndex(): number;
1383
+ enterRule(listener: BattleScriptListener): void;
1384
+ exitRule(listener: BattleScriptListener): void;
1385
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1386
+ }
1185
1387
  export declare class StepBodyContext extends ParserRuleContext {
1186
1388
  defineStatement(): DefineStatementContext | undefined;
1187
1389
  requireStatement(): RequireStatementContext | undefined;
1390
+ protocolOpStatement(): ProtocolOpStatementContext | undefined;
1391
+ forwardStatement(): ForwardStatementContext | undefined;
1392
+ offsetStatement(): OffsetStatementContext | undefined;
1393
+ rewindStatement(): RewindStatementContext | undefined;
1394
+ ruleStatement(): RuleStatementContext | undefined;
1188
1395
  endStatement(): EndStatementContext | undefined;
1396
+ statement(): StatementContext | undefined;
1189
1397
  comment(): CommentContext | undefined;
1190
1398
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
1191
1399
  get ruleIndex(): number;
@@ -1195,6 +1403,7 @@ export declare class StepBodyContext extends ParserRuleContext {
1195
1403
  }
1196
1404
  export declare class EndStatementContext extends ParserRuleContext {
1197
1405
  END(): TerminalNode;
1406
+ booleanLiteral(): BooleanLiteralContext;
1198
1407
  lineEnd(): LineEndContext;
1199
1408
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
1200
1409
  get ruleIndex(): number;
@@ -1351,6 +1560,18 @@ export declare class ProtocolTypeContext extends ParserRuleContext {
1351
1560
  exitRule(listener: BattleScriptListener): void;
1352
1561
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1353
1562
  }
1563
+ export declare class ProtocolReadTypeContext extends ParserRuleContext {
1564
+ BITS(): TerminalNode | undefined;
1565
+ LT(): TerminalNode;
1566
+ numberLiteral(): NumberLiteralContext;
1567
+ GT(): TerminalNode;
1568
+ BYTES(): TerminalNode | undefined;
1569
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1570
+ get ruleIndex(): number;
1571
+ enterRule(listener: BattleScriptListener): void;
1572
+ exitRule(listener: BattleScriptListener): void;
1573
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1574
+ }
1354
1575
  export declare class ArrayExpressionInternalContext extends ParserRuleContext {
1355
1576
  BRACKETS_START(): TerminalNode;
1356
1577
  BRACKETS_END(): TerminalNode;
@@ -1429,7 +1650,24 @@ export declare class UndefinedLiteralContext extends ParserRuleContext {
1429
1650
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1430
1651
  }
1431
1652
  export declare class IdentifierContext extends ParserRuleContext {
1432
- IDENTIFIER(): TerminalNode;
1653
+ IDENTIFIER(): TerminalNode | undefined;
1654
+ PROTOCOL(): TerminalNode | undefined;
1655
+ DEFINE(): TerminalNode | undefined;
1656
+ REQUIRE(): TerminalNode | undefined;
1657
+ TERMINATE(): TerminalNode | undefined;
1658
+ STEP(): TerminalNode | undefined;
1659
+ DECODE(): TerminalNode | undefined;
1660
+ ENCODE(): TerminalNode | undefined;
1661
+ END(): TerminalNode | undefined;
1662
+ FORWARD(): TerminalNode | undefined;
1663
+ REWIND(): TerminalNode | undefined;
1664
+ OFFSET(): TerminalNode | undefined;
1665
+ XOR(): TerminalNode | undefined;
1666
+ XNOR(): TerminalNode | undefined;
1667
+ BITS(): TerminalNode | undefined;
1668
+ BYTES(): TerminalNode | undefined;
1669
+ RULE(): TerminalNode | undefined;
1670
+ PARITY(): TerminalNode | undefined;
1433
1671
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
1434
1672
  get ruleIndex(): number;
1435
1673
  enterRule(listener: BattleScriptListener): void;