mlogjs 0.2.0 → 0.2.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.
- package/LICENSE +21 -21
- package/README.md +68 -18
- package/build/Compiler.d.ts +18 -18
- package/build/Compiler.js +99 -119
- package/build/Compiler.js.map +1 -1
- package/build/Scope.d.ts +26 -26
- package/build/Scope.js +60 -60
- package/build/Scope.js.map +1 -1
- package/build/bin.d.ts +2 -2
- package/build/bin.js +60 -41
- package/build/bin.js.map +1 -1
- package/build/handlers/BlockStatement.d.ts +2 -2
- package/build/handlers/BlockStatement.js +13 -13
- package/build/handlers/CallExpression.d.ts +3 -3
- package/build/handlers/CallExpression.js +19 -19
- package/build/handlers/ForStatement.d.ts +2 -2
- package/build/handlers/ForStatement.js +31 -31
- package/build/handlers/Function.d.ts +4 -4
- package/build/handlers/Function.js +35 -35
- package/build/handlers/Identifier.d.ts +2 -2
- package/build/handlers/Identifier.js +7 -7
- package/build/handlers/IfStatement.d.ts +2 -2
- package/build/handlers/IfStatement.js +24 -24
- package/build/handlers/Literal.d.ts +2 -2
- package/build/handlers/Literal.js +17 -17
- package/build/handlers/Object.d.ts +4 -4
- package/build/handlers/Object.js +43 -43
- package/build/handlers/OperationExpressions.d.ts +7 -7
- package/build/handlers/OperationExpressions.js +32 -32
- package/build/handlers/Program.d.ts +2 -2
- package/build/handlers/Program.js +8 -8
- package/build/handlers/Program.js.map +1 -1
- package/build/handlers/Statements.d.ts +5 -5
- package/build/handlers/Statements.js +29 -29
- package/build/handlers/TemplateExpression.d.ts +2 -2
- package/build/handlers/TemplateExpression.js +17 -17
- package/build/handlers/VariableDeclaration.d.ts +3 -3
- package/build/handlers/VariableDeclaration.js +55 -55
- package/build/handlers/WhileStatement.d.ts +2 -2
- package/build/handlers/WhileStatement.js +22 -22
- package/build/handlers/index.d.ts +14 -14
- package/build/handlers/index.js +30 -30
- package/build/index.d.ts +1 -1
- package/build/index.js +7 -7
- package/build/initScope.d.ts +2 -0
- package/build/initScope.js +40 -0
- package/build/initScope.js.map +1 -0
- package/build/instructions/AddressResolver.d.ts +12 -12
- package/build/instructions/AddressResolver.js +30 -30
- package/build/instructions/ControlInstructions.d.ts +11 -11
- package/build/instructions/ControlInstructions.js +22 -22
- package/build/instructions/EndInstruction.d.ts +4 -4
- package/build/instructions/EndInstruction.js +10 -10
- package/build/instructions/InstructionBase.d.ts +10 -10
- package/build/instructions/InstructionBase.js +20 -20
- package/build/instructions/JumpInstruction.d.ts +15 -15
- package/build/instructions/JumpInstruction.js +21 -21
- package/build/instructions/OperationInstruction.d.ts +5 -5
- package/build/instructions/OperationInstruction.js +10 -10
- package/build/instructions/SetCounterInstruction.d.ts +5 -5
- package/build/instructions/SetCounterInstruction.js +10 -10
- package/build/instructions/SetInstruction.d.ts +5 -5
- package/build/instructions/SetInstruction.js +10 -10
- package/build/instructions/ZeroSpaceInstruction.d.ts +4 -4
- package/build/instructions/ZeroSpaceInstruction.js +10 -10
- package/build/instructions/index.d.ts +9 -9
- package/build/instructions/index.js +25 -25
- package/build/macros/Building.d.ts +11 -11
- package/build/macros/Building.js +80 -80
- package/build/macros/Function.d.ts +12 -12
- package/build/macros/Function.js +19 -19
- package/build/macros/Math.d.ts +5 -5
- package/build/macros/Math.js +56 -56
- package/build/macros/Math.js.map +1 -1
- package/build/macros/Memory.d.ts +5 -5
- package/build/macros/Memory.js +60 -60
- package/build/macros/Namespace.d.ts +21 -21
- package/build/macros/Namespace.js +97 -97
- package/build/macros/Other.d.ts +5 -5
- package/build/macros/Other.js +19 -19
- package/build/macros/RawValue.d.ts +5 -5
- package/build/macros/RawValue.js +15 -15
- package/build/macros/commands/{control.d.ts → Control.d.ts} +5 -5
- package/build/macros/commands/{control.js → Control.js} +24 -24
- package/build/macros/commands/{control.js.map → Control.js.map} +0 -0
- package/build/macros/commands/Draw.d.ts +5 -5
- package/build/macros/commands/Draw.js +38 -38
- package/build/macros/commands/DrawFlush.d.ts +5 -5
- package/build/macros/commands/DrawFlush.js +16 -16
- package/build/macros/commands/GetLink.d.ts +5 -5
- package/build/macros/commands/GetLink.js +20 -20
- package/build/macros/commands/Lookup.d.ts +5 -5
- package/build/macros/commands/Lookup.js +23 -23
- package/build/macros/commands/Print.d.ts +5 -5
- package/build/macros/commands/Print.js +13 -13
- package/build/macros/commands/PrintFlush.d.ts +5 -5
- package/build/macros/commands/PrintFlush.js +16 -16
- package/build/macros/commands/Radar.d.ts +7 -7
- package/build/macros/commands/Radar.js +60 -60
- package/build/macros/commands/Sensor.d.ts +5 -5
- package/build/macros/commands/Sensor.js +19 -19
- package/build/macros/commands/UnitBind.d.ts +5 -5
- package/build/macros/commands/UnitBind.js +16 -16
- package/build/macros/commands/UnitControl.d.ts +5 -5
- package/build/macros/commands/UnitControl.js +67 -67
- package/build/macros/commands/UnitLocate.d.ts +5 -5
- package/build/macros/commands/UnitLocate.js +54 -54
- package/build/macros/commands/UnitRadar.d.ts +5 -5
- package/build/macros/commands/UnitRadar.js +40 -40
- package/build/macros/commands/Wait.d.ts +5 -5
- package/build/macros/commands/Wait.js +17 -17
- package/build/macros/commands/index.d.ts +14 -14
- package/build/macros/commands/index.js +32 -32
- package/build/macros/index.d.ts +7 -7
- package/build/macros/index.js +39 -39
- package/build/operators.d.ts +25 -25
- package/build/operators.js +101 -101
- package/build/types.d.ts +49 -49
- package/build/types.js +27 -27
- package/build/utils.d.ts +3 -3
- package/build/utils.js +12 -12
- package/build/values/BaseValue.d.ts +5 -5
- package/build/values/BaseValue.js +111 -111
- package/build/values/FunctionValue.d.ts +34 -34
- package/build/values/FunctionValue.js +103 -103
- package/build/values/LiteralValue.d.ts +12 -12
- package/build/values/LiteralValue.js +87 -87
- package/build/values/LiteralValue.js.map +1 -1
- package/build/values/ObjectValue.d.ts +17 -17
- package/build/values/ObjectValue.js +49 -49
- package/build/values/StoreValue.d.ts +11 -11
- package/build/values/StoreValue.js +30 -30
- package/build/values/TempValue.d.ts +12 -12
- package/build/values/TempValue.js +66 -66
- package/build/values/TempValue.js.map +1 -1
- package/build/values/VoidValue.d.ts +11 -11
- package/build/values/VoidValue.js +30 -30
- package/build/values/index.d.ts +6 -6
- package/build/values/index.js +22 -22
- package/dist/mlogjs.es.js +6366 -0
- package/dist/mlogjs.umd.js +8 -0
- package/lib/commands.d.ts +326 -326
- package/lib/eslib/index.d.ts +3 -3
- package/lib/eslib/lib.d.ts +9 -9
- package/lib/eslib/lib.es2015.collection.d.ts +89 -89
- package/lib/eslib/lib.es2015.core.d.ts +16 -16
- package/lib/eslib/lib.es2015.d.ts +30 -30
- package/lib/eslib/lib.es2015.generator.d.ts +79 -79
- package/lib/eslib/lib.es2015.iterable.d.ts +70 -70
- package/lib/eslib/lib.es5.d.ts +295 -295
- package/lib/eslib/lib.es6.d.ts +18 -18
- package/lib/globals.d.ts +328 -328
- package/lib/helpers.d.ts +23 -23
- package/lib/index.d.ts +7 -7
- package/lib/kinds.d.ts +36 -36
- package/lib/memory.d.ts +17 -17
- package/lib/traits.d.ts +121 -121
- package/lib/util.d.ts +32 -32
- package/package.json +73 -48
- package/build/macros/Blocks.d.ts +0 -5
- package/build/macros/Blocks.js +0 -143
- package/build/macros/Blocks.js.map +0 -1
- package/build/macros/Draw.d.ts +0 -5
- package/build/macros/Draw.js +0 -39
- package/build/macros/Draw.js.map +0 -1
- package/build/macros/Items.d.ts +0 -5
- package/build/macros/Items.js +0 -20
- package/build/macros/Items.js.map +0 -1
- package/build/macros/Liquids.d.ts +0 -5
- package/build/macros/Liquids.js +0 -18
- package/build/macros/Liquids.js.map +0 -1
- package/build/macros/Symbol.d.ts +0 -0
- package/build/macros/Symbol.js +0 -1
- package/build/macros/Symbol.js.map +0 -1
- package/build/macros/SymbolNamespace.d.ts +0 -0
- package/build/macros/SymbolNamespace.js +0 -1
- package/build/macros/SymbolNamespace.js.map +0 -1
- package/build/macros/TypeFactory.d.ts +0 -8
- package/build/macros/TypeFactory.js +0 -22
- package/build/macros/TypeFactory.js.map +0 -1
- package/build/macros/Units.d.ts +0 -5
- package/build/macros/Units.js +0 -18
- package/build/macros/Units.js.map +0 -1
- package/build/macros/Vars.d.ts +0 -5
- package/build/macros/Vars.js +0 -18
- package/build/macros/Vars.js.map +0 -1
- package/build/macros/commands/Asm.d.ts +0 -5
- package/build/macros/commands/Asm.js +0 -21
- package/build/macros/commands/Asm.js.map +0 -1
- package/build/macros/commands/io.d.ts +0 -8
- package/build/macros/commands/io.js +0 -47
- package/build/macros/commands/io.js.map +0 -1
- package/build/macros/helpers/GetBuilding.d.ts +0 -5
- package/build/macros/helpers/GetBuilding.js +0 -16
- package/build/macros/helpers/GetBuilding.js.map +0 -1
- package/build/macros/helpers/GetVar.d.ts +0 -5
- package/build/macros/helpers/GetVar.js +0 -16
- package/build/macros/helpers/GetVar.js.map +0 -1
- package/build/macros/helpers/index.d.ts +0 -2
- package/build/macros/helpers/index.js +0 -15
- package/build/macros/helpers/index.js.map +0 -1
- package/dist/bundle.js +0 -1
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Wei
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,18 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
https://
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
<div markdown="1" align="center">
|
|
2
|
+
|
|
3
|
+
[][docs]
|
|
4
|
+
|
|
5
|
+
# **JavaScript [MLog](https://mindustrygame.github.io/wiki/logic/0-introduction/) Compiler**
|
|
6
|
+
|
|
7
|
+
[][ci]
|
|
8
|
+
[][npm]
|
|
9
|
+
[][docs]
|
|
10
|
+
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
|
|
15
|
+
- Optimzing compiler
|
|
16
|
+
- Easy to use
|
|
17
|
+
- Fully Typed API
|
|
18
|
+
- Macros
|
|
19
|
+
- All Instructions and Variables
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
#### In the terminal
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
npm i -g mlogjs
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
#### Creating `hello.js`
|
|
32
|
+
|
|
33
|
+
```js
|
|
34
|
+
const message1 = getBuilding("message1")
|
|
35
|
+
print("Hello world")
|
|
36
|
+
printFlush(message1)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
#### Compile
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
mlogjs hello.js hello.mlog
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Resources
|
|
46
|
+
|
|
47
|
+
- [Discord](https://discord.gg/SvgjCtZnR5)
|
|
48
|
+
- [Documentation][docs]
|
|
49
|
+
- [NPM package][npm]
|
|
50
|
+
- [GitHub Action CI][ci]
|
|
51
|
+
|
|
52
|
+
## Maintainers
|
|
53
|
+
|
|
54
|
+
Massive thanks to [@JeanJPNM](https://github.com/JeanJPNM) for adding new features!
|
|
55
|
+
|
|
56
|
+
## Contribute
|
|
57
|
+
|
|
58
|
+
Help and suggestions are welcomed!
|
|
59
|
+
|
|
60
|
+
## License
|
|
61
|
+
|
|
62
|
+
MIT
|
|
63
|
+
|
|
64
|
+
<!-- url -->
|
|
65
|
+
|
|
66
|
+
[npm]: https://www.npmjs.com/package/mlogjs
|
|
67
|
+
[ci]: https://github.com/weisrc/mlogjs/actions/workflows/ci.yml
|
|
68
|
+
[docs]: https://weisrc.github.io/mlogjs
|
package/build/Compiler.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { es, IScope, THandler, TValueInstructions } from "./types";
|
|
2
|
-
declare type THandlerMap = {
|
|
3
|
-
[k in es.Node["type"]]?: THandler;
|
|
4
|
-
};
|
|
5
|
-
export declare class Compiler {
|
|
6
|
-
protected stackName?: string;
|
|
7
|
-
protected usingStack: boolean;
|
|
8
|
-
protected handlers: THandlerMap;
|
|
9
|
-
constructor(stackName?: string);
|
|
10
|
-
compile(script: string): string;
|
|
11
|
-
protected resolve(valueInst: TValueInstructions): void;
|
|
12
|
-
protected serialize(resLines: TValueInstructions): string;
|
|
13
|
-
protected parse(script: string):
|
|
14
|
-
handle(scope: IScope, node: es.Node): TValueInstructions;
|
|
15
|
-
handleEval(scope: IScope, node: es.Node): TValueInstructions;
|
|
16
|
-
handleMany(scope: IScope, nodes: es.Node[], handler?: typeof Compiler.prototype.handle): TValueInstructions;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
1
|
+
import { es, IScope, THandler, TValueInstructions } from "./types";
|
|
2
|
+
declare type THandlerMap = {
|
|
3
|
+
[k in es.Node["type"]]?: THandler;
|
|
4
|
+
};
|
|
5
|
+
export declare class Compiler {
|
|
6
|
+
protected stackName?: string;
|
|
7
|
+
protected usingStack: boolean;
|
|
8
|
+
protected handlers: THandlerMap;
|
|
9
|
+
constructor(stackName?: string);
|
|
10
|
+
compile(script: string): [string, Error, es.Node[]];
|
|
11
|
+
protected resolve(valueInst: TValueInstructions): void;
|
|
12
|
+
protected serialize(resLines: TValueInstructions): string;
|
|
13
|
+
protected parse(script: string): es.Node;
|
|
14
|
+
handle(scope: IScope, node: es.Node): TValueInstructions;
|
|
15
|
+
handleEval(scope: IScope, node: es.Node): TValueInstructions;
|
|
16
|
+
handleMany(scope: IScope, nodes: es.Node[], handler?: typeof Compiler.prototype.handle): TValueInstructions;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
package/build/Compiler.js
CHANGED
|
@@ -1,120 +1,100 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Compiler = void 0;
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
catch (error) {
|
|
102
|
-
throw new Error(`${node.type} ${(0, utils_1.nodeName)(node)} > ${error.message}`);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
handleEval(scope, node) {
|
|
106
|
-
const [res, inst] = this.handle(scope, node);
|
|
107
|
-
const [evaluated, evaluatedLines] = res.eval(scope);
|
|
108
|
-
return [evaluated, [...inst, ...evaluatedLines]];
|
|
109
|
-
}
|
|
110
|
-
handleMany(scope, nodes, handler = this.handle.bind(this)) {
|
|
111
|
-
const lines = [];
|
|
112
|
-
for (const node of nodes) {
|
|
113
|
-
const [_, nodeLines] = handler(scope, node);
|
|
114
|
-
lines.push(...nodeLines);
|
|
115
|
-
}
|
|
116
|
-
return [null, lines];
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
exports.Compiler = Compiler;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.Compiler = void 0;
|
|
27
|
+
const acorn_1 = require("acorn");
|
|
28
|
+
const handlers = __importStar(require("./handlers"));
|
|
29
|
+
const initScope_1 = require("./initScope");
|
|
30
|
+
const instructions_1 = require("./instructions");
|
|
31
|
+
const Scope_1 = require("./Scope");
|
|
32
|
+
class Compiler {
|
|
33
|
+
constructor(stackName) {
|
|
34
|
+
this.handlers = handlers;
|
|
35
|
+
this.usingStack = !!stackName;
|
|
36
|
+
this.stackName = stackName;
|
|
37
|
+
}
|
|
38
|
+
compile(script) {
|
|
39
|
+
let output;
|
|
40
|
+
try {
|
|
41
|
+
const program = this.parse(script);
|
|
42
|
+
const scope = new Scope_1.Scope({});
|
|
43
|
+
(0, initScope_1.initScope)(scope);
|
|
44
|
+
const valueInst = this.handle(scope, program);
|
|
45
|
+
valueInst[1].push(new instructions_1.EndInstruction(), ...scope.inst);
|
|
46
|
+
this.resolve(valueInst);
|
|
47
|
+
output = this.serialize(valueInst) + "\n";
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
return [null, error, error?.nodeStack ?? []];
|
|
51
|
+
}
|
|
52
|
+
return [output, null, []];
|
|
53
|
+
}
|
|
54
|
+
resolve(valueInst) {
|
|
55
|
+
let i = 0;
|
|
56
|
+
for (const inst of valueInst[1]) {
|
|
57
|
+
inst.resolve(i);
|
|
58
|
+
if (!inst.hidden)
|
|
59
|
+
i++;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
serialize(resLines) {
|
|
63
|
+
const [_, inst] = resLines;
|
|
64
|
+
return inst.filter(l => !l.hidden).join("\n");
|
|
65
|
+
}
|
|
66
|
+
parse(script) {
|
|
67
|
+
return (0, acorn_1.parse)(script, {
|
|
68
|
+
locations: true,
|
|
69
|
+
ecmaVersion: "latest",
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
handle(scope, node) {
|
|
73
|
+
try {
|
|
74
|
+
const handler = this.handlers[node.type];
|
|
75
|
+
if (!handler)
|
|
76
|
+
throw Error("Missing handler for " + node.type);
|
|
77
|
+
return handler(this, scope, node, null);
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
error.nodeStack ??= [];
|
|
81
|
+
error.nodeStack.push(node);
|
|
82
|
+
throw error;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
handleEval(scope, node) {
|
|
86
|
+
const [res, inst] = this.handle(scope, node);
|
|
87
|
+
const [evaluated, evaluatedLines] = res.eval(scope);
|
|
88
|
+
return [evaluated, [...inst, ...evaluatedLines]];
|
|
89
|
+
}
|
|
90
|
+
handleMany(scope, nodes, handler = this.handle.bind(this)) {
|
|
91
|
+
const lines = [];
|
|
92
|
+
for (const node of nodes) {
|
|
93
|
+
const [_, nodeLines] = handler(scope, node);
|
|
94
|
+
lines.push(...nodeLines);
|
|
95
|
+
}
|
|
96
|
+
return [null, lines];
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.Compiler = Compiler;
|
|
120
100
|
//# sourceMappingURL=Compiler.js.map
|
package/build/Compiler.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Compiler.js","sourceRoot":"","sources":["../src/Compiler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Compiler.js","sourceRoot":"","sources":["../src/Compiler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAA8B;AAC9B,qDAAuC;AACvC,2CAAwC;AACxC,iDAAgD;AAChD,mCAAgC;AAKhC,MAAa,QAAQ;IAKnB,YAAY,SAAkB;QAFpB,aAAQ,GAAgB,QAAQ,CAAC;QAGzC,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,SAAS,CAAC;QAC9B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED,OAAO,CAAC,MAAc;QACpB,IAAI,MAAc,CAAC;QACnB,IAAI;YACF,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACnC,MAAM,KAAK,GAAG,IAAI,aAAK,CAAC,EAAE,CAAC,CAAC;YAE5B,IAAA,qBAAS,EAAC,KAAK,CAAC,CAAC;YAEjB,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,C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E,MAAM,KAAK,CAAC,sBAAsB,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;YAC9D,OAAO,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;SACzC;QAAC,OAAO,KAAK,EAAE;YACd,KAAK,CAAC,SAAS,KAAK,EAAE,CAAC;YACvB,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC3B,MAAM,KAAK,CAAC;SACb;IACH,CAAC;IAED,UAAU,CAAC,KAAa,EAAE,IAAa;QACrC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAC7C,MAAM,CAAC,SAAS,EAAE,cAAc,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACpD,OAAO,CAAC,SAAS,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,cAAc,CAAC,CAAC,CAAC;IACnD,CAAC;IAED,UAAU,CACR,KAAa,EACb,KAAgB,EAChB,UAA4C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;QAElE,MAAM,KAAK,GAAG,EAAE,CAAC;QACjB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;YACxB,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YAC5C,KAAK,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC;SAC1B;QACD,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACvB,CAAC;CACF;AA9ED,4BA8EC"}
|
package/build/Scope.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { AddressResolver } from "./instructions";
|
|
2
|
-
import { IFunctionValue, IInstruction, IScope, IValue } from "./types";
|
|
3
|
-
export declare class Scope implements IScope {
|
|
4
|
-
parent: IScope;
|
|
5
|
-
name: string;
|
|
6
|
-
data: {
|
|
7
|
-
[k: string]: IValue;
|
|
8
|
-
};
|
|
9
|
-
stacked: boolean;
|
|
10
|
-
ntemp: number;
|
|
11
|
-
inst: IInstruction[];
|
|
12
|
-
break: AddressResolver;
|
|
13
|
-
continue: AddressResolver;
|
|
14
|
-
function: IFunctionValue;
|
|
15
|
-
constructor(values: {
|
|
16
|
-
[k: string]: IValue;
|
|
17
|
-
}, parent?: IScope, stacked?: boolean, ntemp?: number, name?: string, inst?: any[]);
|
|
18
|
-
copy(): IScope;
|
|
19
|
-
createScope(): IScope;
|
|
20
|
-
createFunction(name: string, stacked?: boolean): IScope;
|
|
21
|
-
has(name: string): boolean;
|
|
22
|
-
get(name: string): IValue;
|
|
23
|
-
set(name: string, value: IValue): IValue;
|
|
24
|
-
hardSet(name: string, value: IValue): IValue;
|
|
25
|
-
make(name: string, storeName: string): IValue;
|
|
26
|
-
}
|
|
1
|
+
import { AddressResolver } from "./instructions";
|
|
2
|
+
import { IFunctionValue, IInstruction, IScope, IValue } from "./types";
|
|
3
|
+
export declare class Scope implements IScope {
|
|
4
|
+
parent: IScope;
|
|
5
|
+
name: string;
|
|
6
|
+
data: {
|
|
7
|
+
[k: string]: IValue;
|
|
8
|
+
};
|
|
9
|
+
stacked: boolean;
|
|
10
|
+
ntemp: number;
|
|
11
|
+
inst: IInstruction[];
|
|
12
|
+
break: AddressResolver;
|
|
13
|
+
continue: AddressResolver;
|
|
14
|
+
function: IFunctionValue;
|
|
15
|
+
constructor(values: {
|
|
16
|
+
[k: string]: IValue;
|
|
17
|
+
}, parent?: IScope, stacked?: boolean, ntemp?: number, name?: string, inst?: any[]);
|
|
18
|
+
copy(): IScope;
|
|
19
|
+
createScope(): IScope;
|
|
20
|
+
createFunction(name: string, stacked?: boolean): IScope;
|
|
21
|
+
has(name: string): boolean;
|
|
22
|
+
get(name: string): IValue;
|
|
23
|
+
set(name: string, value: IValue): IValue;
|
|
24
|
+
hardSet(name: string, value: IValue): IValue;
|
|
25
|
+
make(name: string, storeName: string): IValue;
|
|
26
|
+
}
|
package/build/Scope.js
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Scope = void 0;
|
|
4
|
-
const values_1 = require("./values");
|
|
5
|
-
class Scope {
|
|
6
|
-
constructor(values, parent = null, stacked = false, ntemp = 0, name = "", inst = []) {
|
|
7
|
-
this.stacked = false;
|
|
8
|
-
this.ntemp = 0;
|
|
9
|
-
this.data = values;
|
|
10
|
-
this.parent = parent;
|
|
11
|
-
this.stacked = stacked;
|
|
12
|
-
this.ntemp = ntemp;
|
|
13
|
-
this.name = name;
|
|
14
|
-
this.inst = inst;
|
|
15
|
-
}
|
|
16
|
-
copy() {
|
|
17
|
-
const scope = new Scope(
|
|
18
|
-
scope.break = this.break;
|
|
19
|
-
scope.continue = this.continue;
|
|
20
|
-
scope.function = this.function;
|
|
21
|
-
return scope;
|
|
22
|
-
}
|
|
23
|
-
createScope() {
|
|
24
|
-
const scope = this.copy();
|
|
25
|
-
scope.data = {};
|
|
26
|
-
scope.parent = this;
|
|
27
|
-
return scope;
|
|
28
|
-
}
|
|
29
|
-
createFunction(name, stacked) {
|
|
30
|
-
return new Scope({}, this, stacked
|
|
31
|
-
}
|
|
32
|
-
has(name) {
|
|
33
|
-
if (name in this.data)
|
|
34
|
-
return true;
|
|
35
|
-
if (this.parent)
|
|
36
|
-
return this.parent.has(name);
|
|
37
|
-
return false;
|
|
38
|
-
}
|
|
39
|
-
get(name) {
|
|
40
|
-
const value = this.data[name];
|
|
41
|
-
if (value)
|
|
42
|
-
return value;
|
|
43
|
-
if (this.parent)
|
|
44
|
-
return this.parent.get(name);
|
|
45
|
-
throw Error(`${name} is not declared.`);
|
|
46
|
-
}
|
|
47
|
-
set(name, value) {
|
|
48
|
-
if (name in this.data)
|
|
49
|
-
throw Error(`${name} is already declared.`);
|
|
50
|
-
return this.hardSet(name, value);
|
|
51
|
-
}
|
|
52
|
-
hardSet(name, value) {
|
|
53
|
-
this.data[name] = value;
|
|
54
|
-
return value;
|
|
55
|
-
}
|
|
56
|
-
make(name, storeName) {
|
|
57
|
-
return this.set(name, this.stacked ? null : new values_1.StoreValue(this, storeName));
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
exports.Scope = Scope;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Scope = void 0;
|
|
4
|
+
const values_1 = require("./values");
|
|
5
|
+
class Scope {
|
|
6
|
+
constructor(values, parent = null, stacked = false, ntemp = 0, name = "", inst = []) {
|
|
7
|
+
this.stacked = false;
|
|
8
|
+
this.ntemp = 0;
|
|
9
|
+
this.data = values;
|
|
10
|
+
this.parent = parent;
|
|
11
|
+
this.stacked = stacked;
|
|
12
|
+
this.ntemp = ntemp;
|
|
13
|
+
this.name = name;
|
|
14
|
+
this.inst = inst;
|
|
15
|
+
}
|
|
16
|
+
copy() {
|
|
17
|
+
const scope = new Scope({ ...this.data }, this.parent, this.stacked, this.ntemp, this.name, this.inst);
|
|
18
|
+
scope.break = this.break;
|
|
19
|
+
scope.continue = this.continue;
|
|
20
|
+
scope.function = this.function;
|
|
21
|
+
return scope;
|
|
22
|
+
}
|
|
23
|
+
createScope() {
|
|
24
|
+
const scope = this.copy();
|
|
25
|
+
scope.data = {};
|
|
26
|
+
scope.parent = this;
|
|
27
|
+
return scope;
|
|
28
|
+
}
|
|
29
|
+
createFunction(name, stacked) {
|
|
30
|
+
return new Scope({}, this, stacked ?? this.stacked, 0, name, this.inst);
|
|
31
|
+
}
|
|
32
|
+
has(name) {
|
|
33
|
+
if (name in this.data)
|
|
34
|
+
return true;
|
|
35
|
+
if (this.parent)
|
|
36
|
+
return this.parent.has(name);
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
get(name) {
|
|
40
|
+
const value = this.data[name];
|
|
41
|
+
if (value)
|
|
42
|
+
return value;
|
|
43
|
+
if (this.parent)
|
|
44
|
+
return this.parent.get(name);
|
|
45
|
+
throw Error(`${name} is not declared.`);
|
|
46
|
+
}
|
|
47
|
+
set(name, value) {
|
|
48
|
+
if (name in this.data)
|
|
49
|
+
throw Error(`${name} is already declared.`);
|
|
50
|
+
return this.hardSet(name, value);
|
|
51
|
+
}
|
|
52
|
+
hardSet(name, value) {
|
|
53
|
+
this.data[name] = value;
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
make(name, storeName) {
|
|
57
|
+
return this.set(name, this.stacked ? null : new values_1.StoreValue(this, storeName));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.Scope = Scope;
|
|
61
61
|
//# sourceMappingURL=Scope.js.map
|
package/build/Scope.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Scope.js","sourceRoot":"","sources":["../src/Scope.ts"],"names":[],"mappings":";;;AAAA,qCAAsC;AAItC,MAAa,KAAK;IAUhB,YACE,MAA+B,EAC/B,SAAiB,IAAI,EACrB,OAAO,GAAG,KAAK,EACf,KAAK,GAAG,CAAC,EACT,IAAI,GAAG,EAAE,EACT,IAAI,GAAG,EAAE;QAZX,YAAO,GAAY,KAAK,CAAC;QACzB,UAAK,GAAW,CAAC,CAAC;QAahB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IACD,IAAI;QACF,MAAM,KAAK,GAAG,IAAI,KAAK,
|
|
1
|
+
{"version":3,"file":"Scope.js","sourceRoot":"","sources":["../src/Scope.ts"],"names":[],"mappings":";;;AAAA,qCAAsC;AAItC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