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/build/bin.js
CHANGED
|
@@ -1,42 +1,61 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
-
};
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
const fs_1 = require("fs");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
.positional("
|
|
18
|
-
describe: "path of the
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const fs_1 = require("fs");
|
|
8
|
+
const helpers_1 = require("yargs/helpers");
|
|
9
|
+
const _1 = require(".");
|
|
10
|
+
const cli_highlight_1 = require("cli-highlight");
|
|
11
|
+
const yargs_1 = __importDefault(require("yargs"));
|
|
12
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
13
|
+
const path_1 = require("path");
|
|
14
|
+
(0, yargs_1.default)((0, helpers_1.hideBin)(process.argv))
|
|
15
|
+
.command("$0 [path] [out]", "compiles your Javascript file to MLog", yargs => {
|
|
16
|
+
return yargs
|
|
17
|
+
.positional("path", {
|
|
18
|
+
describe: "path of the file to compile",
|
|
19
|
+
})
|
|
20
|
+
.positional("out", {
|
|
21
|
+
describe: "path of the output file",
|
|
22
|
+
});
|
|
23
|
+
}, argv => {
|
|
24
|
+
const path = argv.path;
|
|
25
|
+
const out = argv.out;
|
|
26
|
+
if (!path)
|
|
27
|
+
return console.log("missing required path argument");
|
|
28
|
+
if (!out)
|
|
29
|
+
return console.log("missing output path");
|
|
30
|
+
if (!(0, fs_1.existsSync)(path))
|
|
31
|
+
return console.log(`file at ${path} does not exist`);
|
|
32
|
+
const code = (0, fs_1.readFileSync)(path, "utf8");
|
|
33
|
+
const [output, error, [node]] = (0, _1.compile)(code);
|
|
34
|
+
if (error) {
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
let start = error?.loc;
|
|
37
|
+
let end = start;
|
|
38
|
+
if (node) {
|
|
39
|
+
start = node.loc.start;
|
|
40
|
+
end = node.loc.end;
|
|
41
|
+
}
|
|
42
|
+
const lines = code.split("\n");
|
|
43
|
+
console.log(chalk_1.default.cyanBright([(0, path_1.resolve)(path), start.line, start.column].join(":")));
|
|
44
|
+
for (let i = Math.max(start.line - 3, 0); i < Math.min(end.line + 2, lines.length); i++) {
|
|
45
|
+
const n = i + 1;
|
|
46
|
+
const head = chalk_1.default.gray((n + " | ").padStart(6, " "));
|
|
47
|
+
console.log(head + (0, cli_highlight_1.highlight)(lines[i], { language: "js" }));
|
|
48
|
+
if (n === start.line) {
|
|
49
|
+
console.log(chalk_1.default.red(" ".repeat(6 + start.column) + "^ " + error.message));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
(0, fs_1.writeFileSync)(out, output);
|
|
55
|
+
console.log(`Success: Compiled ${path}. Your compiled code is at ${out}.`);
|
|
56
|
+
})
|
|
57
|
+
.help()
|
|
58
|
+
.scriptName("mlogjs")
|
|
59
|
+
.demandCommand()
|
|
60
|
+
.parse();
|
|
42
61
|
//# sourceMappingURL=bin.js.map
|
package/build/bin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";;;;;;AACA,2BAA6D;AAC7D,wBAA4B;AAC5B,kDAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { THandler } from "../types";
|
|
2
|
-
export declare const BlockStatement: THandler;
|
|
1
|
+
import { THandler } from "../types";
|
|
2
|
+
export declare const BlockStatement: THandler;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BlockStatement = void 0;
|
|
4
|
-
const BlockStatement = (c, scope, node) => {
|
|
5
|
-
const [value, insts] = c.handleMany(scope.createScope(), node.body);
|
|
6
|
-
// const cleanInst = []
|
|
7
|
-
// for (const inst of insts) {
|
|
8
|
-
// if (inst instanceof BreakInstruction || inst instanceof ContinueInstruction || inst instanceof ReturnInstruction || inst instanceof SetCounterInstruction) break
|
|
9
|
-
// cleanInst.push(inst)
|
|
10
|
-
// }
|
|
11
|
-
return [value, insts];
|
|
12
|
-
};
|
|
13
|
-
exports.BlockStatement = BlockStatement;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BlockStatement = void 0;
|
|
4
|
+
const BlockStatement = (c, scope, node) => {
|
|
5
|
+
const [value, insts] = c.handleMany(scope.createScope(), node.body);
|
|
6
|
+
// const cleanInst = []
|
|
7
|
+
// for (const inst of insts) {
|
|
8
|
+
// if (inst instanceof BreakInstruction || inst instanceof ContinueInstruction || inst instanceof ReturnInstruction || inst instanceof SetCounterInstruction) break
|
|
9
|
+
// cleanInst.push(inst)
|
|
10
|
+
// }
|
|
11
|
+
return [value, insts];
|
|
12
|
+
};
|
|
13
|
+
exports.BlockStatement = BlockStatement;
|
|
14
14
|
//# sourceMappingURL=BlockStatement.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { THandler } from "../types";
|
|
2
|
-
export declare const CallExpression: THandler;
|
|
3
|
-
export declare const NewExpression: THandler;
|
|
1
|
+
import { THandler } from "../types";
|
|
2
|
+
export declare const CallExpression: THandler;
|
|
3
|
+
export declare const NewExpression: THandler;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NewExpression = exports.CallExpression = void 0;
|
|
4
|
-
const CallExpression = (c, scope, node) => {
|
|
5
|
-
const inst = [];
|
|
6
|
-
const args = node.arguments.map(node => {
|
|
7
|
-
// TODO: this might be why t0 did not increment
|
|
8
|
-
const [v, i] = c.handleEval(scope, node);
|
|
9
|
-
inst.push(...i);
|
|
10
|
-
return v;
|
|
11
|
-
});
|
|
12
|
-
const [callee, calleeInst] = c.handleEval(scope, node.callee);
|
|
13
|
-
inst.push(...calleeInst);
|
|
14
|
-
const [callValue, callInst] = callee.call(scope, args);
|
|
15
|
-
inst.push(...callInst);
|
|
16
|
-
return [callValue, inst];
|
|
17
|
-
};
|
|
18
|
-
exports.CallExpression = CallExpression;
|
|
19
|
-
exports.NewExpression = exports.CallExpression;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NewExpression = exports.CallExpression = void 0;
|
|
4
|
+
const CallExpression = (c, scope, node) => {
|
|
5
|
+
const inst = [];
|
|
6
|
+
const args = node.arguments.map(node => {
|
|
7
|
+
// TODO: this might be why t0 did not increment
|
|
8
|
+
const [v, i] = c.handleEval(scope, node);
|
|
9
|
+
inst.push(...i);
|
|
10
|
+
return v;
|
|
11
|
+
});
|
|
12
|
+
const [callee, calleeInst] = c.handleEval(scope, node.callee);
|
|
13
|
+
inst.push(...calleeInst);
|
|
14
|
+
const [callValue, callInst] = callee.call(scope, args);
|
|
15
|
+
inst.push(...callInst);
|
|
16
|
+
return [callValue, inst];
|
|
17
|
+
};
|
|
18
|
+
exports.CallExpression = CallExpression;
|
|
19
|
+
exports.NewExpression = exports.CallExpression;
|
|
20
20
|
//# sourceMappingURL=CallExpression.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { THandler } from "../types";
|
|
2
|
-
export declare const ForStatement: THandler;
|
|
1
|
+
import { THandler } from "../types";
|
|
2
|
+
export declare const ForStatement: THandler;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ForStatement = void 0;
|
|
4
|
-
const instructions_1 = require("../instructions");
|
|
5
|
-
const values_1 = require("../values");
|
|
6
|
-
const ForStatement = (c, scope, node) => {
|
|
7
|
-
scope = scope.createScope();
|
|
8
|
-
const initInst = node.init ? c.handle(scope, node.init)[1] : [];
|
|
9
|
-
const [test, testLines] = node.test
|
|
10
|
-
? c.handleEval(scope, node.test)
|
|
11
|
-
: [new values_1.LiteralValue(scope, 1), []];
|
|
12
|
-
const updateLines = node.update ? c.handle(scope, node.update)[1] : [];
|
|
13
|
-
const startLoopAddr = new values_1.LiteralValue(scope, null);
|
|
14
|
-
const endLoopAddr = new values_1.LiteralValue(scope, null);
|
|
15
|
-
const startLoopLine = new instructions_1.AddressResolver(startLoopAddr).bindContinue(scope);
|
|
16
|
-
const endLoopLine = new instructions_1.AddressResolver(endLoopAddr).bindBreak(scope);
|
|
17
|
-
return [
|
|
18
|
-
null,
|
|
19
|
-
[
|
|
20
|
-
...initInst,
|
|
21
|
-
startLoopLine,
|
|
22
|
-
...testLines,
|
|
23
|
-
new instructions_1.JumpInstruction(endLoopAddr, instructions_1.EJumpKind.Equal, test, new values_1.LiteralValue(scope, 0)),
|
|
24
|
-
...c.handle(scope, node.body)[1],
|
|
25
|
-
...updateLines,
|
|
26
|
-
new instructions_1.JumpInstruction(startLoopAddr, instructions_1.EJumpKind.Always),
|
|
27
|
-
endLoopLine,
|
|
28
|
-
],
|
|
29
|
-
];
|
|
30
|
-
};
|
|
31
|
-
exports.ForStatement = ForStatement;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ForStatement = void 0;
|
|
4
|
+
const instructions_1 = require("../instructions");
|
|
5
|
+
const values_1 = require("../values");
|
|
6
|
+
const ForStatement = (c, scope, node) => {
|
|
7
|
+
scope = scope.createScope();
|
|
8
|
+
const initInst = node.init ? c.handle(scope, node.init)[1] : [];
|
|
9
|
+
const [test, testLines] = node.test
|
|
10
|
+
? c.handleEval(scope, node.test)
|
|
11
|
+
: [new values_1.LiteralValue(scope, 1), []];
|
|
12
|
+
const updateLines = node.update ? c.handle(scope, node.update)[1] : [];
|
|
13
|
+
const startLoopAddr = new values_1.LiteralValue(scope, null);
|
|
14
|
+
const endLoopAddr = new values_1.LiteralValue(scope, null);
|
|
15
|
+
const startLoopLine = new instructions_1.AddressResolver(startLoopAddr).bindContinue(scope);
|
|
16
|
+
const endLoopLine = new instructions_1.AddressResolver(endLoopAddr).bindBreak(scope);
|
|
17
|
+
return [
|
|
18
|
+
null,
|
|
19
|
+
[
|
|
20
|
+
...initInst,
|
|
21
|
+
startLoopLine,
|
|
22
|
+
...testLines,
|
|
23
|
+
new instructions_1.JumpInstruction(endLoopAddr, instructions_1.EJumpKind.Equal, test, new values_1.LiteralValue(scope, 0)),
|
|
24
|
+
...c.handle(scope, node.body)[1],
|
|
25
|
+
...updateLines,
|
|
26
|
+
new instructions_1.JumpInstruction(startLoopAddr, instructions_1.EJumpKind.Always),
|
|
27
|
+
endLoopLine,
|
|
28
|
+
],
|
|
29
|
+
];
|
|
30
|
+
};
|
|
31
|
+
exports.ForStatement = ForStatement;
|
|
32
32
|
//# sourceMappingURL=ForStatement.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { THandler } from "../types";
|
|
2
|
-
export declare const ArrowFunctionExpression: THandler;
|
|
3
|
-
export declare const FunctionDeclaration: THandler;
|
|
4
|
-
export declare const FunctionExpression: THandler;
|
|
1
|
+
import { THandler } from "../types";
|
|
2
|
+
export declare const ArrowFunctionExpression: THandler;
|
|
3
|
+
export declare const FunctionDeclaration: THandler;
|
|
4
|
+
export declare const FunctionExpression: THandler;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FunctionExpression = exports.FunctionDeclaration = exports.ArrowFunctionExpression = void 0;
|
|
4
|
-
const utils_1 = require("../utils");
|
|
5
|
-
const FunctionValue_1 = require("../values/FunctionValue");
|
|
6
|
-
const ArrowFunctionExpression = (c, scope, node) => {
|
|
7
|
-
const name = (0, utils_1.nodeName)(node);
|
|
8
|
-
scope = scope.createFunction(name);
|
|
9
|
-
let { params, body } = node;
|
|
10
|
-
if (node.expression) {
|
|
11
|
-
body = {
|
|
12
|
-
type: "BlockStatement",
|
|
13
|
-
body: [{ type: "ReturnStatement", argument: body }],
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
const paramNames = [];
|
|
17
|
-
const paramStores = [];
|
|
18
|
-
for (const id of params) {
|
|
19
|
-
paramNames.push(id.name);
|
|
20
|
-
paramStores.push(scope.make(id.name, (0, utils_1.nodeName)(id)));
|
|
21
|
-
}
|
|
22
|
-
return [
|
|
23
|
-
new FunctionValue_1.FunctionValue(scope, name, paramNames, paramStores, body, c),
|
|
24
|
-
[],
|
|
25
|
-
];
|
|
26
|
-
};
|
|
27
|
-
exports.ArrowFunctionExpression = ArrowFunctionExpression;
|
|
28
|
-
const FunctionDeclaration = (c, scope, node) => {
|
|
29
|
-
return [
|
|
30
|
-
scope.set(node.id.name, (0, exports.ArrowFunctionExpression)(c, scope, node, null)[0]),
|
|
31
|
-
[],
|
|
32
|
-
];
|
|
33
|
-
};
|
|
34
|
-
exports.FunctionDeclaration = FunctionDeclaration;
|
|
35
|
-
exports.FunctionExpression = exports.ArrowFunctionExpression;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FunctionExpression = exports.FunctionDeclaration = exports.ArrowFunctionExpression = void 0;
|
|
4
|
+
const utils_1 = require("../utils");
|
|
5
|
+
const FunctionValue_1 = require("../values/FunctionValue");
|
|
6
|
+
const ArrowFunctionExpression = (c, scope, node) => {
|
|
7
|
+
const name = (0, utils_1.nodeName)(node);
|
|
8
|
+
scope = scope.createFunction(name);
|
|
9
|
+
let { params, body } = node;
|
|
10
|
+
if (node.expression) {
|
|
11
|
+
body = {
|
|
12
|
+
type: "BlockStatement",
|
|
13
|
+
body: [{ type: "ReturnStatement", argument: body }],
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
const paramNames = [];
|
|
17
|
+
const paramStores = [];
|
|
18
|
+
for (const id of params) {
|
|
19
|
+
paramNames.push(id.name);
|
|
20
|
+
paramStores.push(scope.make(id.name, (0, utils_1.nodeName)(id)));
|
|
21
|
+
}
|
|
22
|
+
return [
|
|
23
|
+
new FunctionValue_1.FunctionValue(scope, name, paramNames, paramStores, body, c),
|
|
24
|
+
[],
|
|
25
|
+
];
|
|
26
|
+
};
|
|
27
|
+
exports.ArrowFunctionExpression = ArrowFunctionExpression;
|
|
28
|
+
const FunctionDeclaration = (c, scope, node) => {
|
|
29
|
+
return [
|
|
30
|
+
scope.set(node.id.name, (0, exports.ArrowFunctionExpression)(c, scope, node, null)[0]),
|
|
31
|
+
[],
|
|
32
|
+
];
|
|
33
|
+
};
|
|
34
|
+
exports.FunctionDeclaration = FunctionDeclaration;
|
|
35
|
+
exports.FunctionExpression = exports.ArrowFunctionExpression;
|
|
36
36
|
//# sourceMappingURL=Function.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { THandler } from "../types";
|
|
2
|
-
export declare const Identifier: THandler;
|
|
1
|
+
import { THandler } from "../types";
|
|
2
|
+
export declare const Identifier: THandler;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Identifier = void 0;
|
|
4
|
-
const Identifier = (c, scope, node) => {
|
|
5
|
-
return [scope.get(node.name), []];
|
|
6
|
-
};
|
|
7
|
-
exports.Identifier = Identifier;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Identifier = void 0;
|
|
4
|
+
const Identifier = (c, scope, node) => {
|
|
5
|
+
return [scope.get(node.name), []];
|
|
6
|
+
};
|
|
7
|
+
exports.Identifier = Identifier;
|
|
8
8
|
//# sourceMappingURL=Identifier.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { THandler } from "../types";
|
|
2
|
-
export declare const IfStatement: THandler;
|
|
1
|
+
import { THandler } from "../types";
|
|
2
|
+
export declare const IfStatement: THandler;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IfStatement = void 0;
|
|
4
|
-
const instructions_1 = require("../instructions");
|
|
5
|
-
const instructions_2 = require("../instructions");
|
|
6
|
-
const values_1 = require("../values");
|
|
7
|
-
const IfStatement = (c, scope, node) => {
|
|
8
|
-
const inst = [];
|
|
9
|
-
const [test, testInst] = c.handleEval(scope, node.test);
|
|
10
|
-
if (test instanceof values_1.LiteralValue) {
|
|
11
|
-
if (test.data)
|
|
12
|
-
inst.push(...c.handle(scope, node.consequent)[1]);
|
|
13
|
-
else if (node.alternate)
|
|
14
|
-
inst.push(...c.handle(scope, node.alternate)[1]);
|
|
15
|
-
return [null, inst];
|
|
16
|
-
}
|
|
17
|
-
const endIfAddr = new values_1.LiteralValue(scope, null);
|
|
18
|
-
inst.push(...testInst, new instructions_1.JumpInstruction(endIfAddr, instructions_2.EJumpKind.Equal, test, new values_1.LiteralValue(scope, 0)), ...c.handle(scope, node.consequent)[1], new instructions_1.AddressResolver(endIfAddr));
|
|
19
|
-
const endElseAddr = new values_1.LiteralValue(scope, null);
|
|
20
|
-
if (node.alternate)
|
|
21
|
-
inst.push(new instructions_1.JumpInstruction(endElseAddr, instructions_2.EJumpKind.Always), new instructions_1.AddressResolver(endIfAddr), ...c.handle(scope, node.alternate)[1], new instructions_1.AddressResolver(endElseAddr));
|
|
22
|
-
return [null, inst];
|
|
23
|
-
};
|
|
24
|
-
exports.IfStatement = IfStatement;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IfStatement = void 0;
|
|
4
|
+
const instructions_1 = require("../instructions");
|
|
5
|
+
const instructions_2 = require("../instructions");
|
|
6
|
+
const values_1 = require("../values");
|
|
7
|
+
const IfStatement = (c, scope, node) => {
|
|
8
|
+
const inst = [];
|
|
9
|
+
const [test, testInst] = c.handleEval(scope, node.test);
|
|
10
|
+
if (test instanceof values_1.LiteralValue) {
|
|
11
|
+
if (test.data)
|
|
12
|
+
inst.push(...c.handle(scope, node.consequent)[1]);
|
|
13
|
+
else if (node.alternate)
|
|
14
|
+
inst.push(...c.handle(scope, node.alternate)[1]);
|
|
15
|
+
return [null, inst];
|
|
16
|
+
}
|
|
17
|
+
const endIfAddr = new values_1.LiteralValue(scope, null);
|
|
18
|
+
inst.push(...testInst, new instructions_1.JumpInstruction(endIfAddr, instructions_2.EJumpKind.Equal, test, new values_1.LiteralValue(scope, 0)), ...c.handle(scope, node.consequent)[1], new instructions_1.AddressResolver(endIfAddr));
|
|
19
|
+
const endElseAddr = new values_1.LiteralValue(scope, null);
|
|
20
|
+
if (node.alternate)
|
|
21
|
+
inst.push(new instructions_1.JumpInstruction(endElseAddr, instructions_2.EJumpKind.Always), new instructions_1.AddressResolver(endIfAddr), ...c.handle(scope, node.alternate)[1], new instructions_1.AddressResolver(endElseAddr));
|
|
22
|
+
return [null, inst];
|
|
23
|
+
};
|
|
24
|
+
exports.IfStatement = IfStatement;
|
|
25
25
|
//# sourceMappingURL=IfStatement.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { THandler } from "../types";
|
|
2
|
-
export declare const Literal: THandler;
|
|
1
|
+
import { THandler } from "../types";
|
|
2
|
+
export declare const Literal: THandler;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Literal = void 0;
|
|
4
|
-
const values_1 = require("../values");
|
|
5
|
-
const Literal = (c, scope, node) => {
|
|
6
|
-
const { value } = node;
|
|
7
|
-
if (value === null ||
|
|
8
|
-
typeof value === "string" ||
|
|
9
|
-
typeof value === "number") {
|
|
10
|
-
return [new values_1.LiteralValue(scope, value), []];
|
|
11
|
-
}
|
|
12
|
-
if (typeof value === "boolean") {
|
|
13
|
-
return [new values_1.LiteralValue(scope, +value), []];
|
|
14
|
-
}
|
|
15
|
-
throw Error("Cannot create literal " + typeof value);
|
|
16
|
-
};
|
|
17
|
-
exports.Literal = Literal;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Literal = void 0;
|
|
4
|
+
const values_1 = require("../values");
|
|
5
|
+
const Literal = (c, scope, node) => {
|
|
6
|
+
const { value } = node;
|
|
7
|
+
if (value === null ||
|
|
8
|
+
typeof value === "string" ||
|
|
9
|
+
typeof value === "number") {
|
|
10
|
+
return [new values_1.LiteralValue(scope, value), []];
|
|
11
|
+
}
|
|
12
|
+
if (typeof value === "boolean") {
|
|
13
|
+
return [new values_1.LiteralValue(scope, +value), []];
|
|
14
|
+
}
|
|
15
|
+
throw Error("Cannot create literal " + typeof value);
|
|
16
|
+
};
|
|
17
|
+
exports.Literal = Literal;
|
|
18
18
|
//# sourceMappingURL=Literal.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { THandler } from "../types";
|
|
2
|
-
export declare const ObjectExpression: THandler;
|
|
3
|
-
export declare const ArrayExpression: THandler;
|
|
4
|
-
export declare const MemberExpression: THandler;
|
|
1
|
+
import { THandler } from "../types";
|
|
2
|
+
export declare const ObjectExpression: THandler;
|
|
3
|
+
export declare const ArrayExpression: THandler;
|
|
4
|
+
export declare const MemberExpression: THandler;
|
package/build/handlers/Object.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MemberExpression = exports.ArrayExpression = exports.ObjectExpression = void 0;
|
|
4
|
-
const values_1 = require("../values");
|
|
5
|
-
const ObjectExpression = (c, scope, node) => {
|
|
6
|
-
const data = {};
|
|
7
|
-
const inst = [];
|
|
8
|
-
for (const prop of node.properties) {
|
|
9
|
-
if (prop.computed)
|
|
10
|
-
throw new Error("Cannot handle computed property.");
|
|
11
|
-
const { key, value } = prop;
|
|
12
|
-
let index;
|
|
13
|
-
if (key.type === "Identifier")
|
|
14
|
-
index = key.name;
|
|
15
|
-
else if (key.type === "Literal")
|
|
16
|
-
index = "" + key.value;
|
|
17
|
-
const [member, memberInst] = c.handleEval(scope, value);
|
|
18
|
-
data[index] = member;
|
|
19
|
-
inst.push(...memberInst);
|
|
20
|
-
}
|
|
21
|
-
return [new values_1.ObjectValue(scope, data), inst];
|
|
22
|
-
};
|
|
23
|
-
exports.ObjectExpression = ObjectExpression;
|
|
24
|
-
const ArrayExpression = (c, scope, node) => {
|
|
25
|
-
const data = {};
|
|
26
|
-
const inst = [];
|
|
27
|
-
node.elements.forEach((element, i) => {
|
|
28
|
-
const [value, valueInst] = c.handleEval(scope, element);
|
|
29
|
-
data[i] = value;
|
|
30
|
-
inst.push(...valueInst);
|
|
31
|
-
});
|
|
32
|
-
return [new values_1.ObjectValue(scope, data), inst];
|
|
33
|
-
};
|
|
34
|
-
exports.ArrayExpression = ArrayExpression;
|
|
35
|
-
const MemberExpression = (c, scope, node) => {
|
|
36
|
-
const [obj, objInst] = c.handleEval(scope, node.object);
|
|
37
|
-
const [prop, propInst] = node.computed
|
|
38
|
-
? c.handleEval(scope, node.property)
|
|
39
|
-
: [new values_1.LiteralValue(scope, node.property.name), []];
|
|
40
|
-
const [got, gotInst] = obj.get(scope, prop);
|
|
41
|
-
return [got, [...objInst, ...propInst, ...gotInst]];
|
|
42
|
-
};
|
|
43
|
-
exports.MemberExpression = MemberExpression;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MemberExpression = exports.ArrayExpression = exports.ObjectExpression = void 0;
|
|
4
|
+
const values_1 = require("../values");
|
|
5
|
+
const ObjectExpression = (c, scope, node) => {
|
|
6
|
+
const data = {};
|
|
7
|
+
const inst = [];
|
|
8
|
+
for (const prop of node.properties) {
|
|
9
|
+
if (prop.computed)
|
|
10
|
+
throw new Error("Cannot handle computed property.");
|
|
11
|
+
const { key, value } = prop;
|
|
12
|
+
let index;
|
|
13
|
+
if (key.type === "Identifier")
|
|
14
|
+
index = key.name;
|
|
15
|
+
else if (key.type === "Literal")
|
|
16
|
+
index = "" + key.value;
|
|
17
|
+
const [member, memberInst] = c.handleEval(scope, value);
|
|
18
|
+
data[index] = member;
|
|
19
|
+
inst.push(...memberInst);
|
|
20
|
+
}
|
|
21
|
+
return [new values_1.ObjectValue(scope, data), inst];
|
|
22
|
+
};
|
|
23
|
+
exports.ObjectExpression = ObjectExpression;
|
|
24
|
+
const ArrayExpression = (c, scope, node) => {
|
|
25
|
+
const data = {};
|
|
26
|
+
const inst = [];
|
|
27
|
+
node.elements.forEach((element, i) => {
|
|
28
|
+
const [value, valueInst] = c.handleEval(scope, element);
|
|
29
|
+
data[i] = value;
|
|
30
|
+
inst.push(...valueInst);
|
|
31
|
+
});
|
|
32
|
+
return [new values_1.ObjectValue(scope, data), inst];
|
|
33
|
+
};
|
|
34
|
+
exports.ArrayExpression = ArrayExpression;
|
|
35
|
+
const MemberExpression = (c, scope, node) => {
|
|
36
|
+
const [obj, objInst] = c.handleEval(scope, node.object);
|
|
37
|
+
const [prop, propInst] = node.computed
|
|
38
|
+
? c.handleEval(scope, node.property)
|
|
39
|
+
: [new values_1.LiteralValue(scope, node.property.name), []];
|
|
40
|
+
const [got, gotInst] = obj.get(scope, prop);
|
|
41
|
+
return [got, [...objInst, ...propInst, ...gotInst]];
|
|
42
|
+
};
|
|
43
|
+
exports.MemberExpression = MemberExpression;
|
|
44
44
|
//# sourceMappingURL=Object.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { THandler } from "../types";
|
|
2
|
-
export declare const LRExpression: THandler;
|
|
3
|
-
export declare const BinaryExpression: THandler;
|
|
4
|
-
export declare const LogicalExpression: THandler;
|
|
5
|
-
export declare const AssignmentExpression: THandler;
|
|
6
|
-
export declare const UnaryExpression: THandler;
|
|
7
|
-
export declare const UpdateExpression: THandler;
|
|
1
|
+
import { THandler } from "../types";
|
|
2
|
+
export declare const LRExpression: THandler;
|
|
3
|
+
export declare const BinaryExpression: THandler;
|
|
4
|
+
export declare const LogicalExpression: THandler;
|
|
5
|
+
export declare const AssignmentExpression: THandler;
|
|
6
|
+
export declare const UnaryExpression: THandler;
|
|
7
|
+
export declare const UpdateExpression: THandler;
|