@irrelon/battlescript 3.2.6 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/bin/functionality.ts +16 -3
  2. package/bin/index.js +3767 -2232
  3. package/bin/index.js.map +1 -1
  4. package/dist/bin/functionality.cjs +43245 -0
  5. package/dist/bin/functionality.cjs.map +1 -0
  6. package/dist/bin/functionality.d.ts +5 -0
  7. package/dist/bin/functionality.d.ts.map +1 -1
  8. package/dist/bin/functionality.js +3769 -2234
  9. package/dist/bin/functionality.js.map +1 -1
  10. package/dist/exports/index.d.ts +0 -1
  11. package/dist/exports/index.d.ts.map +1 -1
  12. package/dist/exports/typescript/enums/EnumNodeKind.d.ts +50 -46
  13. package/dist/exports/typescript/enums/EnumNodeKind.d.ts.map +1 -1
  14. package/dist/exports/typescript/enums/EnumNodeProp.d.ts +54 -46
  15. package/dist/exports/typescript/enums/EnumNodeProp.d.ts.map +1 -1
  16. package/dist/exports/typescript/helpers/miniAstLayout.d.ts.map +1 -1
  17. package/dist/index.cjs +4280 -2448
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.mjs +4237 -2422
  20. package/dist/index.mjs.map +1 -1
  21. package/dist/scripts/exportGen/enums/generateEnums.d.ts.map +1 -1
  22. package/dist/services/fullAst/BattleScriptFromAST.d.ts +6 -2
  23. package/dist/services/fullAst/BattleScriptFromAST.d.ts.map +1 -1
  24. package/dist/services/fullAst/BattleScriptToAST.d.ts +10 -3
  25. package/dist/services/fullAst/BattleScriptToAST.d.ts.map +1 -1
  26. package/dist/services/grammar/ts/language/BattleScriptLexer.d.ts +102 -101
  27. package/dist/services/grammar/ts/language/BattleScriptLexer.d.ts.map +1 -1
  28. package/dist/services/grammar/ts/language/BattleScriptListener.d.ts +59 -15
  29. package/dist/services/grammar/ts/language/BattleScriptListener.d.ts.map +1 -1
  30. package/dist/services/grammar/ts/language/BattleScriptParser.d.ts +276 -213
  31. package/dist/services/grammar/ts/language/BattleScriptParser.d.ts.map +1 -1
  32. package/dist/services/grammar/ts/language/BattleScriptVisitor.d.ts +37 -9
  33. package/dist/services/grammar/ts/language/BattleScriptVisitor.d.ts.map +1 -1
  34. package/dist/services/index.d.ts +2 -0
  35. package/dist/services/index.d.ts.map +1 -1
  36. package/dist/services/miniAst/BattleScriptToMiniAST.d.ts +8 -0
  37. package/dist/services/miniAst/BattleScriptToMiniAST.d.ts.map +1 -1
  38. package/dist/services/miniAst/binaryReader.d.ts.map +1 -1
  39. package/dist/services/miniAst/binaryWriter.d.ts.map +1 -1
  40. package/dist/services/miniAst/index.d.ts +0 -1
  41. package/dist/services/miniAst/index.d.ts.map +1 -1
  42. package/dist/services/miniAst/miniAstLayout.d.ts.map +1 -1
  43. package/dist/services/moduleResolver.d.ts +151 -0
  44. package/dist/services/moduleResolver.d.ts.map +1 -0
  45. package/dist/services/treeShaker/DependencyAnalyzer.d.ts +38 -0
  46. package/dist/services/treeShaker/DependencyAnalyzer.d.ts.map +1 -0
  47. package/dist/services/treeShaker/EntryPointCollector.d.ts +17 -0
  48. package/dist/services/treeShaker/EntryPointCollector.d.ts.map +1 -0
  49. package/dist/services/treeShaker/TreeShaker.d.ts +17 -0
  50. package/dist/services/treeShaker/TreeShaker.d.ts.map +1 -0
  51. package/dist/services/treeShaker/index.d.ts +6 -0
  52. package/dist/services/treeShaker/index.d.ts.map +1 -0
  53. package/dist/services/treeShaker/treeShake.d.ts +12 -0
  54. package/dist/services/treeShaker/treeShake.d.ts.map +1 -0
  55. package/dist/services/treeShaker/types.d.ts +50 -0
  56. package/dist/services/treeShaker/types.d.ts.map +1 -0
  57. package/dist/tests/ast/export.test.d.ts +2 -0
  58. package/dist/tests/ast/export.test.d.ts.map +1 -0
  59. package/dist/tests/ast/import.test.d.ts +2 -0
  60. package/dist/tests/ast/import.test.d.ts.map +1 -0
  61. package/dist/tests/ast/moduleResolver.test.d.ts +2 -0
  62. package/dist/tests/ast/moduleResolver.test.d.ts.map +1 -0
  63. package/dist/tests/ast/tree-shaking.test.d.ts +2 -0
  64. package/dist/tests/ast/tree-shaking.test.d.ts.map +1 -0
  65. package/dist/tsconfig.types.tsbuildinfo +1 -1
  66. package/dist/types/BattleScriptTransformerOptions.d.ts +1 -0
  67. package/dist/types/BattleScriptTransformerOptions.d.ts.map +1 -1
  68. package/dist/types/MiniAstJson.d.ts +18 -1
  69. package/dist/types/MiniAstJson.d.ts.map +1 -1
  70. package/dist/types/TokenMetaData.d.ts +2 -0
  71. package/dist/types/TokenMetaData.d.ts.map +1 -1
  72. package/dist/types/ast/nodes/AstNode.d.ts +2 -2
  73. package/dist/types/ast/nodes/AstNode.d.ts.map +1 -1
  74. package/dist/types/ast/nodes/AstNodeBase.d.ts +2 -0
  75. package/dist/types/ast/nodes/AstNodeBase.d.ts.map +1 -1
  76. package/dist/types/ast/nodes/ConstantDeclarationNode.d.ts +2 -1
  77. package/dist/types/ast/nodes/ConstantDeclarationNode.d.ts.map +1 -1
  78. package/dist/types/ast/nodes/EndStatementNode.d.ts +1 -0
  79. package/dist/types/ast/nodes/EndStatementNode.d.ts.map +1 -1
  80. package/dist/types/ast/nodes/EnumDeclarationNode.d.ts +2 -1
  81. package/dist/types/ast/nodes/EnumDeclarationNode.d.ts.map +1 -1
  82. package/dist/types/ast/nodes/ExportNamedDeclarationNode.d.ts +32 -0
  83. package/dist/types/ast/nodes/ExportNamedDeclarationNode.d.ts.map +1 -0
  84. package/dist/types/ast/nodes/ExportSpecifierNode.d.ts +27 -0
  85. package/dist/types/ast/nodes/ExportSpecifierNode.d.ts.map +1 -0
  86. package/dist/types/ast/nodes/FunctionDeclarationNode.d.ts +2 -1
  87. package/dist/types/ast/nodes/FunctionDeclarationNode.d.ts.map +1 -1
  88. package/dist/types/ast/nodes/FunctionDefinitionNode.d.ts +2 -1
  89. package/dist/types/ast/nodes/FunctionDefinitionNode.d.ts.map +1 -1
  90. package/dist/types/ast/nodes/ImportDeclarationNode.d.ts +4 -2
  91. package/dist/types/ast/nodes/ImportDeclarationNode.d.ts.map +1 -1
  92. package/dist/types/ast/nodes/ImportSpecifierNode.d.ts +27 -0
  93. package/dist/types/ast/nodes/ImportSpecifierNode.d.ts.map +1 -0
  94. package/dist/types/ast/nodes/IncludeStatementNode.d.ts +13 -0
  95. package/dist/types/ast/nodes/IncludeStatementNode.d.ts.map +1 -0
  96. package/dist/types/ast/nodes/InterfaceNode.d.ts +2 -1
  97. package/dist/types/ast/nodes/InterfaceNode.d.ts.map +1 -1
  98. package/dist/types/ast/nodes/OffsetStatementNode.d.ts.map +1 -1
  99. package/dist/types/ast/nodes/ParityDeclarationNode.d.ts +12 -0
  100. package/dist/types/ast/nodes/ParityDeclarationNode.d.ts.map +1 -0
  101. package/dist/types/ast/nodes/ProtocolOpStatementNode.d.ts +1 -1
  102. package/dist/types/ast/nodes/ProtocolOpStatementNode.d.ts.map +1 -1
  103. package/dist/types/ast/nodes/ProtocolReadTypeNode.d.ts +1 -1
  104. package/dist/types/ast/nodes/ProtocolReadTypeNode.d.ts.map +1 -1
  105. package/dist/types/ast/nodes/RootNode.d.ts +1 -0
  106. package/dist/types/ast/nodes/RootNode.d.ts.map +1 -1
  107. package/dist/types/ast/nodes/RuleStatementNode.d.ts +4 -4
  108. package/dist/types/ast/nodes/RuleStatementNode.d.ts.map +1 -1
  109. package/dist/types/ast/nodes/StateDeclarationNode.d.ts +2 -1
  110. package/dist/types/ast/nodes/StateDeclarationNode.d.ts.map +1 -1
  111. package/dist/types/ast/nodes/VariableDeclarationNode.d.ts +2 -1
  112. package/dist/types/ast/nodes/VariableDeclarationNode.d.ts.map +1 -1
  113. package/dist/types/ast/nodes/index.d.ts +5 -1
  114. package/dist/types/ast/nodes/index.d.ts.map +1 -1
  115. package/package.json +77 -72
  116. package/dist/exports/typescript/enums/EnumOpCode.d.ts +0 -28
  117. package/dist/exports/typescript/enums/EnumOpCode.d.ts.map +0 -1
  118. package/dist/scripts/exportGen/enums/opCodes.d.ts +0 -2
  119. package/dist/scripts/exportGen/enums/opCodes.d.ts.map +0 -1
  120. package/dist/services/miniAst/miniAstInterpreter.d.ts +0 -17
  121. package/dist/services/miniAst/miniAstInterpreter.d.ts.map +0 -1
  122. package/dist/types/ast/nodes/EventDeclarationNode.d.ts +0 -15
  123. package/dist/types/ast/nodes/EventDeclarationNode.d.ts.map +0 -1
  124. package/dist/types/ast/nodes/ParityStatementNode.d.ts +0 -12
  125. package/dist/types/ast/nodes/ParityStatementNode.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,74 +1,79 @@
1
1
  {
2
- "name": "@irrelon/battlescript",
3
- "version": "3.2.6",
4
- "binaryVersion": 7,
5
- "description": "BattleScript Lexer, Parser and Compiler",
6
- "bin": {
7
- "battlescript": "bin/index.js"
8
- },
9
- "type": "module",
10
- "main": "dist/index.cjs",
11
- "module": "dist/index.mjs",
12
- "types": "dist/index.d.ts",
13
- "exports": {
14
- ".": {
15
- "types": "./dist/index.d.ts",
16
- "import": "./dist/index.mjs",
17
- "require": "./dist/index.cjs"
18
- }
19
- },
20
- "scripts": {
21
- "compile-grammar-ts": "antlr4ts -visitor ./language/BattleScript.g4 -o ./services/grammar/ts",
22
- "build:exports": "npx tsx $(pwd)/scripts/exportGen/index.ts",
23
- "build:js": "rollup -c",
24
- "build:types": "tsc -p tsconfig.types.json",
25
- "build:native-libraries": "tsx ./scripts/compileNativeLibraries.ts",
26
- "build": "npm run compile-grammar-ts && npm run build:native-libraries && npm run build:exports && npm run build:js && npm run build:types && yalc push && echo \"Don't forget to update the exports and helpers generated by the build! The interpreter will need them!\"",
27
- "test": "NODE_ENV=test jest --coverage",
28
- "test-watch": "NODE_ENV=test jest --watch",
29
- "compile-ast-test-ts": "tsx ./bin/index.ts toAst ./examples/test.bst ./examples/test.json",
30
- "decompile-ast-test-ts": "tsx ./bin/index.js fromAst ./examples/test.json ./examples/test.fromAst.bst",
31
- "compile-binary-test-ts": "tsx ./bin/index.js toBinary ./examples/test.bst ./examples/test.bin",
32
- "decompile-binary-test-ts": "tsx ./bin/index.ts fromBinary ./examples/test.bin ./examples/test.fromBinary.json",
33
- "compile-mini-ast-test-ts": "tsx ./bin/index.ts toMiniAst ./examples/test.bst ./examples/test.miniAst.json",
34
- "decompile-mini-ast-test-ts": "tsx ./bin/index.ts fromMiniAst ./examples/test.miniAst.json ./examples/test.fromMiniAst.bst",
35
- "decompile-ast-simple-ts": "tsx ./bin/index.ts fromAst ./examples/simple.json ./examples/simple.decompiled.bst",
36
- "format": "prettier --write \"**/*.bst\"",
37
- "format:check": "prettier --check \"**/*.bst\"",
38
- "build:plugin": "cd prettier-plugin-battlescript && npm run build",
39
- "create-node": "tsx ./scripts/createAstNode.ts",
40
- "regenerate-test-binaries": "tsx ./scripts/regenerateTestBinaries.ts"
41
- },
42
- "files": [
43
- "dist",
44
- "bin"
45
- ],
46
- "author": "Irrelon Software Limited",
47
- "license": "ISC",
48
- "dependencies": {
49
- "antlr4ts": "^0.5.0-alpha.4"
50
- },
51
- "devDependencies": {
52
- "@irrelon/path": "^7.0.2",
53
- "@rollup/plugin-alias": "^6.0.0",
54
- "@rollup/plugin-commonjs": "^28.0.3",
55
- "@rollup/plugin-json": "^6.1.0",
56
- "@rollup/plugin-node-resolve": "^16.0.1",
57
- "@types/express": "^4.17.21",
58
- "@types/jest": "^29.5.14",
59
- "@types/node": "^22.13.11",
60
- "@typescript-eslint/eslint-plugin": "^8.19.0",
61
- "@typescript-eslint/parser": "^8.19.0",
62
- "antlr4ts-cli": "^0.5.0-alpha.4",
63
- "eslint": "^9.17.0",
64
- "jest": "^29.7.0",
65
- "rollup": "^4.30.0",
66
- "rollup-plugin-dts": "^6.1.1",
67
- "rollup-plugin-typescript2": "^0.36.0",
68
- "rollup-plugin-visualizer": "^5.14.0",
69
- "ts-jest": "^29.3.0",
70
- "ts-morph": "^25.0.1",
71
- "tsx": "^4.19.3",
72
- "typescript": "^5.8.2"
73
- }
2
+ "name": "@irrelon/battlescript",
3
+ "version": "4.0.1",
4
+ "binaryVersion": 9,
5
+ "description": "BattleScript Lexer, Parser and Compiler",
6
+ "bin": {
7
+ "battlescript": "bin/index.js"
8
+ },
9
+ "type": "module",
10
+ "main": "dist/index.cjs",
11
+ "module": "dist/index.mjs",
12
+ "types": "dist/index.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "import": "./dist/index.mjs",
17
+ "require": "./dist/index.cjs"
18
+ },
19
+ "./node": {
20
+ "types": "./dist/bin/functionality.d.ts",
21
+ "import": "./dist/bin/functionality.js",
22
+ "require": "./dist/bin/functionality.cjs"
23
+ }
24
+ },
25
+ "scripts": {
26
+ "compile-grammar-ts": "antlr4ts -visitor ./language/BattleScript.g4 -o ./services/grammar/ts",
27
+ "build:exports": "npx tsx $(pwd)/scripts/exportGen/index.ts",
28
+ "build:js": "rollup -c",
29
+ "build:types": "tsc -p tsconfig.types.json",
30
+ "build:native-libraries": "tsx ./scripts/compileNativeLibraries.ts",
31
+ "build": "npm run compile-grammar-ts && npm run build:native-libraries && npm run build:exports && npm run build:js && npm run build:types && yalc push && echo \"Don't forget to update the exports and helpers generated by the build! The interpreter will need them!\"",
32
+ "test": "NODE_ENV=test jest --coverage",
33
+ "test-watch": "NODE_ENV=test jest --watch",
34
+ "compile-ast-test-ts": "tsx ./bin/index.ts toAst ./examples/test.bst ./examples/test.json",
35
+ "decompile-ast-test-ts": "tsx ./bin/index.js fromAst ./examples/test.json ./examples/test.fromAst.bst",
36
+ "compile-binary-test-ts": "tsx ./bin/index.js toBinary ./examples/test.bst ./examples/test.bin",
37
+ "decompile-binary-test-ts": "tsx ./bin/index.ts fromBinary ./examples/test.bin ./examples/test.fromBinary.json",
38
+ "compile-mini-ast-test-ts": "tsx ./bin/index.ts toMiniAst ./examples/test.bst ./examples/test.miniAst.json",
39
+ "decompile-mini-ast-test-ts": "tsx ./bin/index.ts fromMiniAst ./examples/test.miniAst.json ./examples/test.fromMiniAst.bst",
40
+ "decompile-ast-simple-ts": "tsx ./bin/index.ts fromAst ./examples/simple.json ./examples/simple.decompiled.bst",
41
+ "format": "prettier --write \"**/*.bst\"",
42
+ "format:check": "prettier --check \"**/*.bst\"",
43
+ "build:plugin": "cd prettier-plugin-battlescript && npm run build",
44
+ "create-node": "tsx ./scripts/createAstNode.ts",
45
+ "regenerate-test-binaries": "tsx ./scripts/regenerateTestBinaries.ts"
46
+ },
47
+ "files": [
48
+ "dist",
49
+ "bin"
50
+ ],
51
+ "author": "Irrelon Software Limited",
52
+ "license": "ISC",
53
+ "dependencies": {
54
+ "antlr4ts": "^0.5.0-alpha.4"
55
+ },
56
+ "devDependencies": {
57
+ "@irrelon/path": "^7.0.2",
58
+ "@rollup/plugin-alias": "^6.0.0",
59
+ "@rollup/plugin-commonjs": "^28.0.3",
60
+ "@rollup/plugin-json": "^6.1.0",
61
+ "@rollup/plugin-node-resolve": "^16.0.1",
62
+ "@types/express": "^4.17.21",
63
+ "@types/jest": "^29.5.14",
64
+ "@types/node": "^22.13.11",
65
+ "@typescript-eslint/eslint-plugin": "^8.19.0",
66
+ "@typescript-eslint/parser": "^8.19.0",
67
+ "antlr4ts-cli": "^0.5.0-alpha.4",
68
+ "eslint": "^9.17.0",
69
+ "jest": "^29.7.0",
70
+ "rollup": "^4.30.0",
71
+ "rollup-plugin-dts": "^6.1.1",
72
+ "rollup-plugin-typescript2": "^0.36.0",
73
+ "rollup-plugin-visualizer": "^5.14.0",
74
+ "ts-jest": "^29.3.0",
75
+ "ts-morph": "^25.0.1",
76
+ "tsx": "^4.19.3",
77
+ "typescript": "^5.8.2"
78
+ }
74
79
  }
@@ -1,28 +0,0 @@
1
- export declare enum EnumOpCode {
2
- OPCODE_UNKNOWN = 0,
3
- OPCODE_PUSH_LITERAL = 1,
4
- OPCODE_GET_VAR = 2,
5
- OPCODE_SET_VAR = 3,
6
- OPCODE_GET_PROPERTY = 4,
7
- OPCODE_SET_PROPERTY = 5,
8
- OPCODE_CALL_FUNCTION = 6,
9
- OPCODE_CREATE_OBJECT = 7,
10
- OPCODE_CREATE_ARRAY = 8,
11
- OPCODE_EQ = 9,
12
- OPCODE_NEQ = 10,
13
- OPCODE_GT = 11,
14
- OPCODE_GTE = 12,
15
- OPCODE_LT = 13,
16
- OPCODE_LTE = 14,
17
- OPCODE_AND = 15,
18
- OPCODE_OR = 16,
19
- OPCODE_NOT = 17,
20
- OPCODE_ADD = 18,
21
- OPCODE_SUB = 19,
22
- OPCODE_MUL = 20,
23
- OPCODE_DIV = 21,
24
- OPCODE_MOD = 22
25
- }
26
- export declare function EnumOpCodeToString(opCode: EnumOpCode): string;
27
- export declare function EnumOpCodeFromString(opCode: string): EnumOpCode;
28
- //# sourceMappingURL=EnumOpCode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EnumOpCode.d.ts","sourceRoot":"","sources":["../../../../exports/typescript/enums/EnumOpCode.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACrB,cAAc,IAAA;IACd,mBAAmB,IAAA;IACnB,cAAc,IAAA;IACd,cAAc,IAAA;IACd,mBAAmB,IAAA;IACnB,mBAAmB,IAAA;IACnB,oBAAoB,IAAA;IACpB,oBAAoB,IAAA;IACpB,mBAAmB,IAAA;IACnB,SAAS,IAAA;IACT,UAAU,KAAA;IACV,SAAS,KAAA;IACT,UAAU,KAAA;IACV,SAAS,KAAA;IACT,UAAU,KAAA;IACV,UAAU,KAAA;IACV,SAAS,KAAA;IACT,UAAU,KAAA;IACV,UAAU,KAAA;IACV,UAAU,KAAA;IACV,UAAU,KAAA;IACV,UAAU,KAAA;IACV,UAAU,KAAA;CACV;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CA0B7D;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CA0B/D"}
@@ -1,2 +0,0 @@
1
- export declare const opCodes: Set<string>;
2
- //# sourceMappingURL=opCodes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"opCodes.d.ts","sourceRoot":"","sources":["../../../../scripts/exportGen/enums/opCodes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,aAwBlB,CAAC"}
@@ -1,17 +0,0 @@
1
- type StackValue = number | string | boolean | object | null | undefined;
2
- type StringTable = string[];
3
- export declare class BattleScriptMiniAstInterpreter {
4
- private ip;
5
- private stack;
6
- private variables;
7
- private stringTable;
8
- private metaData;
9
- setStringTable(table: StringTable): void;
10
- setMetaData(metaData: number[]): void;
11
- run(bytecode: number[]): void;
12
- getVariables(): Record<string, StackValue>;
13
- getStack(): StackValue[];
14
- private readInt32;
15
- }
16
- export {};
17
- //# sourceMappingURL=miniAstInterpreter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"miniAstInterpreter.d.ts","sourceRoot":"","sources":["../../../services/miniAst/miniAstInterpreter.ts"],"names":[],"mappings":"AAEA,KAAK,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AACxE,KAAK,WAAW,GAAG,MAAM,EAAE,CAAC;AAE5B,qBAAa,8BAA8B;IAC1C,OAAO,CAAC,EAAE,CAAK;IACf,OAAO,CAAC,KAAK,CAAoB;IACjC,OAAO,CAAC,SAAS,CAAkC;IACnD,OAAO,CAAC,WAAW,CAAmB;IACtC,OAAO,CAAC,QAAQ,CAAgB;IAEhC,cAAc,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAIxC,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI;IAIrC,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI;IAyE7B,YAAY,IAAI,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;IAI1C,QAAQ,IAAI,UAAU,EAAE;IAIxB,OAAO,CAAC,SAAS;CAQjB"}
@@ -1,15 +0,0 @@
1
- import type { AstNodeBase, AstNodeLayout, BlockStatementNode, ExpressionUnion, IdentifierNode, LiteralUnion, MemberExpressionNode } from "@/types";
2
- import type { BattleScriptToAST } from "@/services";
3
- import type { StateModuleEventDeclarationContext } from "@/services/grammar/ts/language/BattleScriptParser";
4
- import type { BattleScriptFromAST } from "@/services/fullAst/BattleScriptFromAST";
5
- import type { VisitOptions } from "@/types/VisitOptions";
6
- export interface EventDeclarationNode extends AstNodeBase {
7
- kind: "EVENT_DECLARATION";
8
- event: ExpressionUnion;
9
- arguments: (IdentifierNode | MemberExpressionNode | LiteralUnion)[];
10
- body: BlockStatementNode;
11
- }
12
- export declare const EventDeclarationNodeLayout: AstNodeLayout<EventDeclarationNode>[];
13
- export declare const eventDeclarationToAstNode: (instance: BattleScriptToAST, ctx: StateModuleEventDeclarationContext) => EventDeclarationNode;
14
- export declare const eventDeclarationFromAstNode: (instance: BattleScriptFromAST, node: EventDeclarationNode, options?: VisitOptions) => string;
15
- //# sourceMappingURL=EventDeclarationNode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EventDeclarationNode.d.ts","sourceRoot":"","sources":["../../../../types/ast/nodes/EventDeclarationNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,YAAY,EACZ,oBAAoB,EACpB,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EAAC,kCAAkC,EAAC,MAAM,mDAAmD,CAAC;AAC1G,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,wCAAwC,CAAC;AAChF,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAGvD,MAAM,WAAW,oBAAqB,SAAQ,WAAW;IACxD,IAAI,EAAE,mBAAmB,CAAC;IAC1B,KAAK,EAAE,eAAe,CAAC;IACvB,SAAS,EAAE,CAAC,cAAc,GAAG,oBAAoB,GAAG,YAAY,CAAC,EAAE,CAAC;IACpE,IAAI,EAAE,kBAAkB,CAAC;CACzB;AAED,eAAO,MAAM,0BAA0B,EAAE,aAAa,CAAC,oBAAoB,CAAC,EAY1E,CAAC;AAEH,eAAO,MAAM,yBAAyB,GAAI,UAAU,iBAAiB,EAAE,KAAK,kCAAkC,KAAG,oBAUhH,CAAA;AAED,eAAO,MAAM,2BAA2B,GAAI,UAAU,mBAAmB,EAAE,MAAM,oBAAoB,EAAE,UAAS,YAAiB,WAahI,CAAA"}
@@ -1,12 +0,0 @@
1
- import type { AstNodeBase, AstNodeLayout, StepBodyUnion, VisitOptions } from "@/types";
2
- import type { BattleScriptFromAST, BattleScriptToAST } from "@/services";
3
- import type { ParityStatementContext } from "@/services/grammar/ts/language/BattleScriptParser";
4
- export interface ParityStatementNode extends AstNodeBase {
5
- kind: "PARITY_STATEMENT";
6
- mode: string;
7
- body: StepBodyUnion[];
8
- }
9
- export declare const ParityStatementNodeLayout: AstNodeLayout<ParityStatementNode>[];
10
- export declare const parityStatementToAstNode: (instance: BattleScriptToAST, ctx: ParityStatementContext) => ParityStatementNode;
11
- export declare const parityStatementFromAstNode: (instance: BattleScriptFromAST, node: ParityStatementNode, options?: VisitOptions) => string;
12
- //# sourceMappingURL=ParityStatementNode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ParityStatementNode.d.ts","sourceRoot":"","sources":["../../../../types/ast/nodes/ParityStatementNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAC,mBAAmB,EAAE,iBAAiB,EAAC,MAAM,YAAY,CAAC;AAEvE,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,mDAAmD,CAAC;AAE9F,MAAM,WAAW,mBAAoB,SAAQ,WAAW;IACvD,IAAI,EAAE,kBAAkB,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,aAAa,EAAE,CAAC;CACtB;AAED,eAAO,MAAM,yBAAyB,EAAE,aAAa,CAAC,mBAAmB,CAAC,EASxE,CAAC;AAEH,eAAO,MAAM,wBAAwB,GAAI,UAAU,iBAAiB,EAAE,KAAK,sBAAsB,KAAG,mBAkBnG,CAAA;AAED,eAAO,MAAM,0BAA0B,GAAI,UAAU,mBAAmB,EAAE,MAAM,mBAAmB,EAAE,UAAS,YAAiB,WAe9H,CAAA"}