@irrelon/battlescript 3.2.4 → 3.2.6

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 (60) hide show
  1. package/bin/index.js +4004 -2448
  2. package/bin/index.js.map +1 -1
  3. package/bin/index.ts +12 -1
  4. package/dist/bin/functionality.js +41691 -0
  5. package/dist/bin/functionality.js.map +1 -0
  6. package/dist/bin/index.d.ts +2 -1
  7. package/dist/bin/index.d.ts.map +1 -1
  8. package/dist/exports/typescript/enums/EnumNodeKind.d.ts +8 -1
  9. package/dist/exports/typescript/enums/EnumNodeKind.d.ts.map +1 -1
  10. package/dist/exports/typescript/enums/EnumNodeProp.d.ts +6 -1
  11. package/dist/exports/typescript/enums/EnumNodeProp.d.ts.map +1 -1
  12. package/dist/exports/typescript/helpers/miniAstLayout.d.ts.map +1 -1
  13. package/dist/index.cjs +4037 -2447
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.mjs +4017 -2448
  16. package/dist/index.mjs.map +1 -1
  17. package/dist/services/fullAst/BattleScriptFromAST.d.ts +8 -1
  18. package/dist/services/fullAst/BattleScriptFromAST.d.ts.map +1 -1
  19. package/dist/services/fullAst/BattleScriptToAST.d.ts +9 -2
  20. package/dist/services/fullAst/BattleScriptToAST.d.ts.map +1 -1
  21. package/dist/services/grammar/ts/language/BattleScriptLexer.d.ts +71 -58
  22. package/dist/services/grammar/ts/language/BattleScriptLexer.d.ts.map +1 -1
  23. package/dist/services/grammar/ts/language/BattleScriptListener.d.ts +121 -11
  24. package/dist/services/grammar/ts/language/BattleScriptListener.d.ts.map +1 -1
  25. package/dist/services/grammar/ts/language/BattleScriptParser.d.ts +276 -101
  26. package/dist/services/grammar/ts/language/BattleScriptParser.d.ts.map +1 -1
  27. package/dist/services/grammar/ts/language/BattleScriptVisitor.d.ts +77 -7
  28. package/dist/services/grammar/ts/language/BattleScriptVisitor.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 -1
  33. package/dist/types/ast/nodes/AstNode.d.ts +2 -3
  34. package/dist/types/ast/nodes/AstNode.d.ts.map +1 -1
  35. package/dist/types/ast/nodes/DefineStatementNode.d.ts.map +1 -1
  36. package/dist/types/ast/nodes/ForwardStatementNode.d.ts +11 -0
  37. package/dist/types/ast/nodes/ForwardStatementNode.d.ts.map +1 -0
  38. package/dist/types/ast/nodes/OffsetStatementNode.d.ts +11 -0
  39. package/dist/types/ast/nodes/OffsetStatementNode.d.ts.map +1 -0
  40. package/dist/types/ast/nodes/ParityStatementNode.d.ts +12 -0
  41. package/dist/types/ast/nodes/ParityStatementNode.d.ts.map +1 -0
  42. package/dist/types/ast/nodes/ProtocolOpStatementNode.d.ts +13 -0
  43. package/dist/types/ast/nodes/ProtocolOpStatementNode.d.ts.map +1 -0
  44. package/dist/types/ast/nodes/ProtocolReadTypeNode.d.ts +14 -0
  45. package/dist/types/ast/nodes/ProtocolReadTypeNode.d.ts.map +1 -0
  46. package/dist/types/ast/nodes/RequireStatementNode.d.ts +1 -0
  47. package/dist/types/ast/nodes/RequireStatementNode.d.ts.map +1 -1
  48. package/dist/types/ast/nodes/RewindStatementNode.d.ts +11 -0
  49. package/dist/types/ast/nodes/RewindStatementNode.d.ts.map +1 -0
  50. package/dist/types/ast/nodes/RuleStatementNode.d.ts +19 -0
  51. package/dist/types/ast/nodes/RuleStatementNode.d.ts.map +1 -0
  52. package/dist/types/ast/nodes/StepDeclarationNode.d.ts +2 -2
  53. package/dist/types/ast/nodes/StepDeclarationNode.d.ts.map +1 -1
  54. package/dist/types/ast/nodes/index.d.ts +7 -0
  55. package/dist/types/ast/nodes/index.d.ts.map +1 -1
  56. package/dist/types/ast/unions/index.d.ts +10 -8
  57. package/dist/types/ast/unions/index.d.ts.map +1 -1
  58. package/dist/types/index.d.ts +1 -0
  59. package/dist/types/index.d.ts.map +1 -1
  60. package/package.json +1 -1
@@ -45,64 +45,77 @@ export declare class BattleScriptParser extends Parser {
45
45
  static readonly FALLBACK = 34;
46
46
  static readonly CATCH = 35;
47
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;
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;
106
119
  static readonly RULE_root = 0;
107
120
  static readonly RULE_importDeclaration = 1;
108
121
  static readonly RULE_importNative = 2;
@@ -162,35 +175,45 @@ export declare class BattleScriptParser extends Parser {
162
175
  static readonly RULE_evaluateStatement = 56;
163
176
  static readonly RULE_callArguments = 57;
164
177
  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;
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;
194
217
  static readonly ruleNames: string[];
195
218
  private static readonly _LITERAL_NAMES;
196
219
  private static readonly _SYMBOLIC_NAMES;
@@ -261,11 +284,20 @@ export declare class BattleScriptParser extends Parser {
261
284
  evaluateStatement(): EvaluateStatementContext;
262
285
  callArguments(): CallArgumentsContext;
263
286
  protocolDeclaration(): ProtocolDeclarationContext;
264
- protocolBody(): ProtocolBodyContext;
265
287
  protocolComparator(): ProtocolComparatorContext;
266
288
  defineStatement(): DefineStatementContext;
267
289
  requireStatement(): RequireStatementContext;
290
+ terminateFlag(): TerminateFlagContext;
291
+ protocolOpStatement(): ProtocolOpStatementContext;
292
+ booleanOp(): BooleanOpContext;
293
+ forwardStatement(): ForwardStatementContext;
294
+ offsetStatement(): OffsetStatementContext;
295
+ rewindStatement(): RewindStatementContext;
268
296
  stepDeclaration(): StepDeclarationContext;
297
+ protocolPhase(): ProtocolPhaseContext;
298
+ parityStatement(): ParityStatementContext;
299
+ ruleStatement(): RuleStatementContext;
300
+ protocolBody(): ProtocolBodyContext;
269
301
  stepBody(): StepBodyContext;
270
302
  endStatement(): EndStatementContext;
271
303
  enumDeclaration(): EnumDeclarationContext;
@@ -283,6 +315,7 @@ export declare class BattleScriptParser extends Parser {
283
315
  dataType(_p: number): DataTypeContext;
284
316
  type(): TypeContext;
285
317
  protocolType(): ProtocolTypeContext;
318
+ protocolReadType(): ProtocolReadTypeContext;
286
319
  arrayExpressionInternal(): ArrayExpressionInternalContext;
287
320
  objectExpressionInternal(): ObjectExpressionInternalContext;
288
321
  objectProperty(): ObjectPropertyContext;
@@ -1125,18 +1158,6 @@ export declare class ProtocolDeclarationContext extends ParserRuleContext {
1125
1158
  exitRule(listener: BattleScriptListener): void;
1126
1159
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1127
1160
  }
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
1161
  export declare class ProtocolComparatorContext extends ParserRuleContext {
1141
1162
  EQUALS(): TerminalNode | undefined;
1142
1163
  NOT_EQUALS(): TerminalNode | undefined;
@@ -1164,6 +1185,65 @@ export declare class RequireStatementContext extends ParserRuleContext {
1164
1185
  protocolComparator(): ProtocolComparatorContext;
1165
1186
  expression(): ExpressionContext;
1166
1187
  lineEnd(): LineEndContext;
1188
+ terminateFlag(): TerminateFlagContext | undefined;
1189
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1190
+ get ruleIndex(): number;
1191
+ enterRule(listener: BattleScriptListener): void;
1192
+ exitRule(listener: BattleScriptListener): void;
1193
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1194
+ }
1195
+ export declare class TerminateFlagContext extends ParserRuleContext {
1196
+ TERMINATE(): TerminalNode;
1197
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1198
+ get ruleIndex(): number;
1199
+ enterRule(listener: BattleScriptListener): void;
1200
+ exitRule(listener: BattleScriptListener): void;
1201
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1202
+ }
1203
+ export declare class ProtocolOpStatementContext extends ParserRuleContext {
1204
+ booleanOp(): BooleanOpContext;
1205
+ protocolReadType(): ProtocolReadTypeContext;
1206
+ stringLiteral(): StringLiteralContext;
1207
+ lineEnd(): LineEndContext;
1208
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1209
+ get ruleIndex(): number;
1210
+ enterRule(listener: BattleScriptListener): void;
1211
+ exitRule(listener: BattleScriptListener): void;
1212
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1213
+ }
1214
+ export declare class BooleanOpContext extends ParserRuleContext {
1215
+ XOR(): TerminalNode | undefined;
1216
+ XNOR(): TerminalNode | undefined;
1217
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1218
+ get ruleIndex(): number;
1219
+ enterRule(listener: BattleScriptListener): void;
1220
+ exitRule(listener: BattleScriptListener): void;
1221
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1222
+ }
1223
+ export declare class ForwardStatementContext extends ParserRuleContext {
1224
+ FORWARD(): TerminalNode;
1225
+ numberLiteral(): NumberLiteralContext;
1226
+ lineEnd(): LineEndContext;
1227
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1228
+ get ruleIndex(): number;
1229
+ enterRule(listener: BattleScriptListener): void;
1230
+ exitRule(listener: BattleScriptListener): void;
1231
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1232
+ }
1233
+ export declare class OffsetStatementContext extends ParserRuleContext {
1234
+ OFFSET(): TerminalNode;
1235
+ numberLiteral(): NumberLiteralContext;
1236
+ lineEnd(): LineEndContext;
1237
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1238
+ get ruleIndex(): number;
1239
+ enterRule(listener: BattleScriptListener): void;
1240
+ exitRule(listener: BattleScriptListener): void;
1241
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1242
+ }
1243
+ export declare class RewindStatementContext extends ParserRuleContext {
1244
+ REWIND(): TerminalNode;
1245
+ numberLiteral(): NumberLiteralContext;
1246
+ lineEnd(): LineEndContext;
1167
1247
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
1168
1248
  get ruleIndex(): number;
1169
1249
  enterRule(listener: BattleScriptListener): void;
@@ -1174,6 +1254,7 @@ export declare class StepDeclarationContext extends ParserRuleContext {
1174
1254
  STEP(): TerminalNode;
1175
1255
  BRACES_START(): TerminalNode;
1176
1256
  BRACES_END(): TerminalNode;
1257
+ protocolPhase(): ProtocolPhaseContext | undefined;
1177
1258
  stepBody(): StepBodyContext[];
1178
1259
  stepBody(i: number): StepBodyContext;
1179
1260
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
@@ -1182,10 +1263,74 @@ export declare class StepDeclarationContext extends ParserRuleContext {
1182
1263
  exitRule(listener: BattleScriptListener): void;
1183
1264
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1184
1265
  }
1266
+ export declare class ProtocolPhaseContext extends ParserRuleContext {
1267
+ DECODE(): TerminalNode | undefined;
1268
+ ENCODE(): TerminalNode | undefined;
1269
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1270
+ get ruleIndex(): number;
1271
+ enterRule(listener: BattleScriptListener): void;
1272
+ exitRule(listener: BattleScriptListener): void;
1273
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1274
+ }
1275
+ export declare class ParityStatementContext extends ParserRuleContext {
1276
+ PARITY(): TerminalNode;
1277
+ BRACES_START(): TerminalNode;
1278
+ BRACES_END(): TerminalNode;
1279
+ protocolPhase(): ProtocolPhaseContext | undefined;
1280
+ stepBody(): StepBodyContext[];
1281
+ stepBody(i: number): StepBodyContext;
1282
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1283
+ get ruleIndex(): number;
1284
+ enterRule(listener: BattleScriptListener): void;
1285
+ exitRule(listener: BattleScriptListener): void;
1286
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1287
+ }
1288
+ export declare class RuleStatementContext extends ParserRuleContext {
1289
+ RULE(): TerminalNode;
1290
+ protocolType(): ProtocolTypeContext;
1291
+ stringLiteral(): StringLiteralContext[];
1292
+ stringLiteral(i: number): StringLiteralContext;
1293
+ ASSIGN(): TerminalNode;
1294
+ protocolComparator(): ProtocolComparatorContext;
1295
+ numberLiteral(): NumberLiteralContext[];
1296
+ numberLiteral(i: number): NumberLiteralContext;
1297
+ QUESTION_MARK(): TerminalNode;
1298
+ COLON(): TerminalNode;
1299
+ lineEnd(): LineEndContext;
1300
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1301
+ get ruleIndex(): number;
1302
+ enterRule(listener: BattleScriptListener): void;
1303
+ exitRule(listener: BattleScriptListener): void;
1304
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1305
+ }
1306
+ export declare class ProtocolBodyContext extends ParserRuleContext {
1307
+ enumDeclaration(): EnumDeclarationContext | undefined;
1308
+ defineStatement(): DefineStatementContext | undefined;
1309
+ requireStatement(): RequireStatementContext | undefined;
1310
+ protocolOpStatement(): ProtocolOpStatementContext | undefined;
1311
+ forwardStatement(): ForwardStatementContext | undefined;
1312
+ offsetStatement(): OffsetStatementContext | undefined;
1313
+ rewindStatement(): RewindStatementContext | undefined;
1314
+ parityStatement(): ParityStatementContext | undefined;
1315
+ stepDeclaration(): StepDeclarationContext | undefined;
1316
+ ruleStatement(): RuleStatementContext | undefined;
1317
+ comment(): CommentContext | undefined;
1318
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1319
+ get ruleIndex(): number;
1320
+ enterRule(listener: BattleScriptListener): void;
1321
+ exitRule(listener: BattleScriptListener): void;
1322
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1323
+ }
1185
1324
  export declare class StepBodyContext extends ParserRuleContext {
1186
1325
  defineStatement(): DefineStatementContext | undefined;
1187
1326
  requireStatement(): RequireStatementContext | undefined;
1327
+ protocolOpStatement(): ProtocolOpStatementContext | undefined;
1328
+ forwardStatement(): ForwardStatementContext | undefined;
1329
+ offsetStatement(): OffsetStatementContext | undefined;
1330
+ rewindStatement(): RewindStatementContext | undefined;
1331
+ ruleStatement(): RuleStatementContext | undefined;
1188
1332
  endStatement(): EndStatementContext | undefined;
1333
+ statement(): StatementContext | undefined;
1189
1334
  comment(): CommentContext | undefined;
1190
1335
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
1191
1336
  get ruleIndex(): number;
@@ -1195,6 +1340,7 @@ export declare class StepBodyContext extends ParserRuleContext {
1195
1340
  }
1196
1341
  export declare class EndStatementContext extends ParserRuleContext {
1197
1342
  END(): TerminalNode;
1343
+ booleanLiteral(): BooleanLiteralContext;
1198
1344
  lineEnd(): LineEndContext;
1199
1345
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
1200
1346
  get ruleIndex(): number;
@@ -1351,6 +1497,18 @@ export declare class ProtocolTypeContext extends ParserRuleContext {
1351
1497
  exitRule(listener: BattleScriptListener): void;
1352
1498
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1353
1499
  }
1500
+ export declare class ProtocolReadTypeContext extends ParserRuleContext {
1501
+ BITS(): TerminalNode | undefined;
1502
+ LT(): TerminalNode;
1503
+ numberLiteral(): NumberLiteralContext;
1504
+ GT(): TerminalNode;
1505
+ BYTES(): TerminalNode | undefined;
1506
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1507
+ get ruleIndex(): number;
1508
+ enterRule(listener: BattleScriptListener): void;
1509
+ exitRule(listener: BattleScriptListener): void;
1510
+ accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1511
+ }
1354
1512
  export declare class ArrayExpressionInternalContext extends ParserRuleContext {
1355
1513
  BRACKETS_START(): TerminalNode;
1356
1514
  BRACKETS_END(): TerminalNode;
@@ -1429,7 +1587,24 @@ export declare class UndefinedLiteralContext extends ParserRuleContext {
1429
1587
  accept<Result>(visitor: BattleScriptVisitor<Result>): Result;
1430
1588
  }
1431
1589
  export declare class IdentifierContext extends ParserRuleContext {
1432
- IDENTIFIER(): TerminalNode;
1590
+ IDENTIFIER(): TerminalNode | undefined;
1591
+ PROTOCOL(): TerminalNode | undefined;
1592
+ DEFINE(): TerminalNode | undefined;
1593
+ REQUIRE(): TerminalNode | undefined;
1594
+ TERMINATE(): TerminalNode | undefined;
1595
+ STEP(): TerminalNode | undefined;
1596
+ DECODE(): TerminalNode | undefined;
1597
+ ENCODE(): TerminalNode | undefined;
1598
+ END(): TerminalNode | undefined;
1599
+ FORWARD(): TerminalNode | undefined;
1600
+ REWIND(): TerminalNode | undefined;
1601
+ OFFSET(): TerminalNode | undefined;
1602
+ XOR(): TerminalNode | undefined;
1603
+ XNOR(): TerminalNode | undefined;
1604
+ BITS(): TerminalNode | undefined;
1605
+ BYTES(): TerminalNode | undefined;
1606
+ RULE(): TerminalNode | undefined;
1607
+ PARITY(): TerminalNode | undefined;
1433
1608
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
1434
1609
  get ruleIndex(): number;
1435
1610
  enterRule(listener: BattleScriptListener): void;