godprotocol 1.0.77 → 1.0.79
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/Index.js +3 -15
- package/Loader_sequence/main.js +255 -55
- package/Objects/Account.js +24 -21
- package/Objects/Block.js +4 -1
- package/Objects/Chain.js +8 -1
- package/Objects/Filesystem.js +11 -15
- package/Objects/Manager.js +19 -8
- package/Objects/Opcodes.js +5 -3
- package/Objects/Oracle.js +10 -0
- package/Objects/Virtual_machine.js +1 -7
- package/framer.js +2 -4
- package/opcodes/std.js +2 -1
- package/opcodes.js +6 -4
- package/package.json +13 -3
- package/readme.md +2 -2
- package/utils/create_server.js +23 -3
- package/.github/workflows/npm-publish-github-packages.yml +0 -36
- package/Accounts/59eb3cb130074f7b1ddb99c8fe14f27e1dbca735bb3da82e1ff0305340a32419/0ee263de3fb9e3e08e7d5abe21db8c0fe66188829979996dcddd3533d855a817/30dc10d3485923c0c19083559094fe636f9491bff9c997306ffdbf3e1618a402/74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b +0 -1
- package/Accounts/59eb3cb130074f7b1ddb99c8fe14f27e1dbca735bb3da82e1ff0305340a32419/0ee263de3fb9e3e08e7d5abe21db8c0fe66188829979996dcddd3533d855a817/4dc569813ce0a2f446a3eec01358f5774f8564641ef8d579ff5b6d94b4d031a7/74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b +0 -1
- package/Accounts/59eb3cb130074f7b1ddb99c8fe14f27e1dbca735bb3da82e1ff0305340a32419/0ee263de3fb9e3e08e7d5abe21db8c0fe66188829979996dcddd3533d855a817/74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b +0 -1
- package/Accounts/59eb3cb130074f7b1ddb99c8fe14f27e1dbca735bb3da82e1ff0305340a32419/0ee263de3fb9e3e08e7d5abe21db8c0fe66188829979996dcddd3533d855a817/a965464a6d9f981543ce3aede226bd0fb989d9300cd8468f41cd1fc0139c8f44/74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b +0 -1
- package/Accounts/59eb3cb130074f7b1ddb99c8fe14f27e1dbca735bb3da82e1ff0305340a32419/12cd650efa4f63b7c61c3345db3daa0534f4c370a003ea6d8ae0d29a49f6f928/74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b +0 -1
- package/Accounts/59eb3cb130074f7b1ddb99c8fe14f27e1dbca735bb3da82e1ff0305340a32419/3ff3661353ccadcaf9c6759a539d8d31e19c07ed0dd888170b9e55c7a18721da/74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b +0 -1
- package/Accounts/59eb3cb130074f7b1ddb99c8fe14f27e1dbca735bb3da82e1ff0305340a32419/3ff3661353ccadcaf9c6759a539d8d31e19c07ed0dd888170b9e55c7a18721da/de551b5a493859e532316cbbf1e4a14eb06e0512556b1c1295ad60ffe07c185b/19270ea4f98808a63fbb99bc26a5ee6f0fe8df9c8182cf1d710b115d57250578 +0 -1
- package/Accounts/59eb3cb130074f7b1ddb99c8fe14f27e1dbca735bb3da82e1ff0305340a32419/3ff3661353ccadcaf9c6759a539d8d31e19c07ed0dd888170b9e55c7a18721da/f8a165e3f556ca2ea189f4d4401d139b22a6f19d0b38329fe4a5f14599840634/4f52f1dc77e0233034c6566fc73c30234de85d2298ff90885a7c56502dffa0b2 +0 -1
- package/Accounts/59eb3cb130074f7b1ddb99c8fe14f27e1dbca735bb3da82e1ff0305340a32419/3ff3661353ccadcaf9c6759a539d8d31e19c07ed0dd888170b9e55c7a18721da/f8a165e3f556ca2ea189f4d4401d139b22a6f19d0b38329fe4a5f14599840634/8d3c916f9c93a6f4c8be9c3f4493b1c02d3eb7516eac153a98320924b27739d8 +0 -1
- package/Accounts/59eb3cb130074f7b1ddb99c8fe14f27e1dbca735bb3da82e1ff0305340a32419/f968ed8cf7958218d4604b3de0bf074f09bac7925e86f7d1f495f8b2c67f31a7/61bdf0593cd727752cb917ab968a08853d45142b8a8e4cdcd0fe03d1616f3586/74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b +0 -1
- package/Accounts/59eb3cb130074f7b1ddb99c8fe14f27e1dbca735bb3da82e1ff0305340a32419/f968ed8cf7958218d4604b3de0bf074f09bac7925e86f7d1f495f8b2c67f31a7/74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b +0 -1
- package/Loader_sequence/functions/parse_expression.js +0 -107
- package/Loader_sequence/functions/parse_to_obj.js +0 -38
- package/Loader_sequence/functions/parse_variable.js +0 -38
- package/Loader_sequence/functions/tokenise.js +0 -135
- package/Loader_sequence/functions/utils.js +0 -14
- package/Loader_sequence/keywords/parse.js +0 -23
- package/Loader_sequence/native_classes/Variable.js +0 -49
- package/Loader_sequence/native_classes/datatypes/Array.js +0 -56
- package/Loader_sequence/native_classes/datatypes/Boolean.js +0 -42
- package/Loader_sequence/native_classes/datatypes/Number.js +0 -42
- package/Loader_sequence/native_classes/datatypes/String.js +0 -42
- package/Loader_sequence/native_classes/datatypes/Twain.js +0 -65
- package/Loader_sequence/native_classes/datatypes/Void.js +0 -42
- package/Loader_sequence/native_classes/global.js +0 -48
- package/Loader_sequence/native_classes/native.js +0 -63
- package/Loader_sequence/native_classes/operators.js +0 -64
- package/Loader_sequence/native_classes/parse.js +0 -54
- package/Loader_sequence/utils/format_instructions.js +0 -52
- package/build/Account.js +0 -245
- package/build/Array.js +0 -142
- package/build/Block.js +0 -100
- package/build/Blockweb.js +0 -78
- package/build/Boolean.js +0 -128
- package/build/Chain.js +0 -198
- package/build/Explorer.js +0 -85
- package/build/Filesystem.js +0 -173
- package/build/Frame.js +0 -108
- package/build/Index.js +0 -31
- package/build/Manager.js +0 -167
- package/build/Number.js +0 -128
- package/build/Opcodes.js +0 -75
- package/build/Oracle.js +0 -70
- package/build/String.js +0 -128
- package/build/Twain.js +0 -151
- package/build/Variable.js +0 -135
- package/build/Virtual_machine.js +0 -220
- package/build/Void.js +0 -128
- package/build/format_instructions.js +0 -52
- package/build/framer.js +0 -90
- package/build/global.js +0 -134
- package/build/main.js +0 -83
- package/build/native.js +0 -101
- package/build/operators.js +0 -150
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _native = _interopRequireDefault(require("./native"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
11
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
12
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
14
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
15
|
-
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
16
|
-
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
17
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
18
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
20
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
21
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
22
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
23
|
-
var Variable = /*#__PURE__*/function (_Native) {
|
|
24
|
-
_inherits(Variable, _Native);
|
|
25
|
-
var _super = _createSuper(Variable);
|
|
26
|
-
function Variable(token) {
|
|
27
|
-
var _this;
|
|
28
|
-
_classCallCheck(this, Variable);
|
|
29
|
-
_this = _super.call(this);
|
|
30
|
-
_defineProperty(_assertThisInitialized(_this), "assign", function (obj) {
|
|
31
|
-
_this.assign_obj = obj;
|
|
32
|
-
});
|
|
33
|
-
_defineProperty(_assertThisInitialized(_this), "generate_assembly", function (sequence) {
|
|
34
|
-
sequence.push(_this.declaration ? "link ".concat(_this.declaration.path) : "chain ".concat(_this.name));
|
|
35
|
-
if (_this.assign_obj) {
|
|
36
|
-
_this.assign_obj.generate_assembly(sequence);
|
|
37
|
-
sequence.push("cursor {output}");
|
|
38
|
-
sequence.push(!_this.token.compiler.datatypes.includes(_this.assign_obj.token.type) ? "write {metadata.output:-1}" : "write {datapath:-1}");
|
|
39
|
-
}
|
|
40
|
-
sequence.push("pop ".concat(_this.name));
|
|
41
|
-
});
|
|
42
|
-
_this.token = token;
|
|
43
|
-
_this.name = _this.token.value;
|
|
44
|
-
return _this;
|
|
45
|
-
}
|
|
46
|
-
return _createClass(Variable);
|
|
47
|
-
}(_native["default"]);
|
|
48
|
-
var _default = Variable;
|
|
49
|
-
exports["default"] = _default;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _utils = require("../../functions/utils");
|
|
8
|
-
var _native = _interopRequireDefault(require("../native"));
|
|
9
|
-
var _Boolean = _interopRequireDefault(require("./Boolean"));
|
|
10
|
-
var _Number = _interopRequireDefault(require("./Number"));
|
|
11
|
-
var _String = _interopRequireDefault(require("./String"));
|
|
12
|
-
var _Twain = _interopRequireDefault(require("./Twain"));
|
|
13
|
-
var _Void = _interopRequireDefault(require("./Void"));
|
|
14
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
15
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
16
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
17
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
19
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
20
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
21
|
-
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
22
|
-
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
23
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
24
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
25
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
26
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
27
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
28
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
29
|
-
var Arr = /*#__PURE__*/function (_Native) {
|
|
30
|
-
_inherits(Arr, _Native);
|
|
31
|
-
var _super = _createSuper(Arr);
|
|
32
|
-
function Arr(token) {
|
|
33
|
-
var _this;
|
|
34
|
-
_classCallCheck(this, Arr);
|
|
35
|
-
_this = _super.call(this);
|
|
36
|
-
_defineProperty(_assertThisInitialized(_this), "generate_assembly", function (sequence) {
|
|
37
|
-
sequence.push("link ".concat(_this.token.compiler.account.physical_address, "/Datatypes/Array"));
|
|
38
|
-
_this.value = _this.value.filter(function (v) {
|
|
39
|
-
return !(0, _utils.is_token_value)(v, ",", "separator");
|
|
40
|
-
});
|
|
41
|
-
_this.token.compiler.parse(_this.value, _assertThisInitialized(_this));
|
|
42
|
-
_this.children.map(function (child, i) {
|
|
43
|
-
child.generate_assembly(sequence);
|
|
44
|
-
sequence.push("cursor ".concat(i));
|
|
45
|
-
sequence.push("write {datapath:-1}");
|
|
46
|
-
});
|
|
47
|
-
sequence.push("pop Datatypes/Array");
|
|
48
|
-
});
|
|
49
|
-
_this.token = token;
|
|
50
|
-
_this.value = _this.token.value;
|
|
51
|
-
return _this;
|
|
52
|
-
}
|
|
53
|
-
return _createClass(Arr);
|
|
54
|
-
}(_native["default"]);
|
|
55
|
-
var _default = Arr;
|
|
56
|
-
exports["default"] = _default;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _native = _interopRequireDefault(require("../native"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
11
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
12
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
14
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
15
|
-
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
16
|
-
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
17
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
18
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
20
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
21
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
22
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
23
|
-
var Bool = /*#__PURE__*/function (_Native) {
|
|
24
|
-
_inherits(Bool, _Native);
|
|
25
|
-
var _super = _createSuper(Bool);
|
|
26
|
-
function Bool(token) {
|
|
27
|
-
var _this;
|
|
28
|
-
_classCallCheck(this, Bool);
|
|
29
|
-
_this = _super.call(this);
|
|
30
|
-
_defineProperty(_assertThisInitialized(_this), "generate_assembly", function (sequence) {
|
|
31
|
-
sequence.push("link ".concat(_this.token.compiler.account.physical_address, "/Datatypes/Boolean"));
|
|
32
|
-
sequence.push("write ".concat(_this.name));
|
|
33
|
-
sequence.push("pop Datatypes/Boolean");
|
|
34
|
-
});
|
|
35
|
-
_this.token = token;
|
|
36
|
-
_this.name = _this.token.value;
|
|
37
|
-
return _this;
|
|
38
|
-
}
|
|
39
|
-
return _createClass(Bool);
|
|
40
|
-
}(_native["default"]);
|
|
41
|
-
var _default = Bool;
|
|
42
|
-
exports["default"] = _default;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _native = _interopRequireDefault(require("../native"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
11
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
12
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
14
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
15
|
-
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
16
|
-
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
17
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
18
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
20
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
21
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
22
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
23
|
-
var Num = /*#__PURE__*/function (_Native) {
|
|
24
|
-
_inherits(Num, _Native);
|
|
25
|
-
var _super = _createSuper(Num);
|
|
26
|
-
function Num(token) {
|
|
27
|
-
var _this;
|
|
28
|
-
_classCallCheck(this, Num);
|
|
29
|
-
_this = _super.call(this);
|
|
30
|
-
_defineProperty(_assertThisInitialized(_this), "generate_assembly", function (sequence) {
|
|
31
|
-
sequence.push("link ".concat(_this.token.compiler.account.physical_address, "/Datatypes/Number"));
|
|
32
|
-
sequence.push("write ".concat(_this.token.type ? _this.name : _this.token));
|
|
33
|
-
sequence.push("pop Datatypes/Number");
|
|
34
|
-
});
|
|
35
|
-
_this.token = token;
|
|
36
|
-
_this.name = _this.token.value;
|
|
37
|
-
return _this;
|
|
38
|
-
}
|
|
39
|
-
return _createClass(Num);
|
|
40
|
-
}(_native["default"]);
|
|
41
|
-
var _default = Num;
|
|
42
|
-
exports["default"] = _default;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _native = _interopRequireDefault(require("../native"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
11
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
12
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
14
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
15
|
-
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
16
|
-
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
17
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
18
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
20
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
21
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
22
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
23
|
-
var Str = /*#__PURE__*/function (_Native) {
|
|
24
|
-
_inherits(Str, _Native);
|
|
25
|
-
var _super = _createSuper(Str);
|
|
26
|
-
function Str(token) {
|
|
27
|
-
var _this;
|
|
28
|
-
_classCallCheck(this, Str);
|
|
29
|
-
_this = _super.call(this);
|
|
30
|
-
_defineProperty(_assertThisInitialized(_this), "generate_assembly", function (sequence) {
|
|
31
|
-
sequence.push("link ".concat(_this.token.compiler.account.physical_address, "/Datatypes/String"));
|
|
32
|
-
sequence.push("write ".concat(_this.token.type ? _this.name : _this.token));
|
|
33
|
-
sequence.push("pop Datatypes/String");
|
|
34
|
-
});
|
|
35
|
-
_this.token = token;
|
|
36
|
-
_this.name = _this.token.value;
|
|
37
|
-
return _this;
|
|
38
|
-
}
|
|
39
|
-
return _createClass(Str);
|
|
40
|
-
}(_native["default"]);
|
|
41
|
-
var _default = Str;
|
|
42
|
-
exports["default"] = _default;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _native = _interopRequireDefault(require("../native"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
11
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
12
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
14
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
15
|
-
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
16
|
-
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
17
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
18
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
20
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
21
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
22
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
23
|
-
var Twain = /*#__PURE__*/function (_Native) {
|
|
24
|
-
_inherits(Twain, _Native);
|
|
25
|
-
var _super = _createSuper(Twain);
|
|
26
|
-
function Twain(token) {
|
|
27
|
-
var _this;
|
|
28
|
-
_classCallCheck(this, Twain);
|
|
29
|
-
_this = _super.call(this);
|
|
30
|
-
_defineProperty(_assertThisInitialized(_this), "generate_assembly", function (sequence) {
|
|
31
|
-
sequence.push("link ".concat(_this.token.compiler.account.physical_address, "/Datatypes/Twain"));
|
|
32
|
-
_this.value = _this.token.value;
|
|
33
|
-
var is_prop = true;
|
|
34
|
-
var pairs = new Array();
|
|
35
|
-
_this.value.map(function (val) {
|
|
36
|
-
if (val.type === "separator") {
|
|
37
|
-
is_prop = val.value === "," ? true : false;
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
if (is_prop) {
|
|
41
|
-
pairs.push([val]);
|
|
42
|
-
} else pairs.slice(-1)[0].push(val);
|
|
43
|
-
});
|
|
44
|
-
for (var p = 0; p < pairs.length; p++) {
|
|
45
|
-
var pair = pairs[p];
|
|
46
|
-
if (pair.length !== 2) continue;
|
|
47
|
-
_this.token.compiler.parse(pair, _assertThisInitialized(_this));
|
|
48
|
-
}
|
|
49
|
-
_this.children.map(function (child, i) {
|
|
50
|
-
child.generate_assembly(sequence);
|
|
51
|
-
if (i % 2 === 1 && i) {
|
|
52
|
-
sequence.push("cursor {*datapath:-2}");
|
|
53
|
-
sequence.push("write {datapath:-1}");
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
sequence.push("pop Datatypes/Twain");
|
|
57
|
-
});
|
|
58
|
-
_this.token = token;
|
|
59
|
-
_this.name = _this.token.value;
|
|
60
|
-
return _this;
|
|
61
|
-
}
|
|
62
|
-
return _createClass(Twain);
|
|
63
|
-
}(_native["default"]);
|
|
64
|
-
var _default = Twain;
|
|
65
|
-
exports["default"] = _default;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _native = _interopRequireDefault(require("../native"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
11
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
12
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
14
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
15
|
-
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
16
|
-
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
17
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
18
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
20
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
21
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
22
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
23
|
-
var Void = /*#__PURE__*/function (_Native) {
|
|
24
|
-
_inherits(Void, _Native);
|
|
25
|
-
var _super = _createSuper(Void);
|
|
26
|
-
function Void(token) {
|
|
27
|
-
var _this;
|
|
28
|
-
_classCallCheck(this, Void);
|
|
29
|
-
_this = _super.call(this);
|
|
30
|
-
_defineProperty(_assertThisInitialized(_this), "generate_assembly", function (sequence) {
|
|
31
|
-
sequence.push("link ".concat(_this.token.compiler.account.physical_address, "/Datatypes/Void"));
|
|
32
|
-
sequence.push("write ".concat(_this.name));
|
|
33
|
-
sequence.push("pop Datatypes/Void");
|
|
34
|
-
});
|
|
35
|
-
_this.token = token;
|
|
36
|
-
_this.name = _this.token.value;
|
|
37
|
-
return _this;
|
|
38
|
-
}
|
|
39
|
-
return _createClass(Void);
|
|
40
|
-
}(_native["default"]);
|
|
41
|
-
var _default = Void;
|
|
42
|
-
exports["default"] = _default;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _native = _interopRequireDefault(require("./native"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
11
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
12
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
14
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
15
|
-
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
16
|
-
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
17
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
18
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
20
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
21
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
22
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
23
|
-
var Global = /*#__PURE__*/function (_Native) {
|
|
24
|
-
_inherits(Global, _Native);
|
|
25
|
-
var _super = _createSuper(Global);
|
|
26
|
-
function Global(compiler) {
|
|
27
|
-
var _this;
|
|
28
|
-
_classCallCheck(this, Global);
|
|
29
|
-
_this = _super.call(this);
|
|
30
|
-
_defineProperty(_assertThisInitialized(_this), "generate_assembly", function (sequence) {
|
|
31
|
-
// sequence.push(`chain ${this.name}`);
|
|
32
|
-
|
|
33
|
-
_this.children.map(function (c) {
|
|
34
|
-
return c.generate_assembly(sequence);
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
// sequence.push(`pop ${this.name}`);
|
|
38
|
-
});
|
|
39
|
-
_this.is_global = true;
|
|
40
|
-
_this.compiler = compiler;
|
|
41
|
-
_this.name = _this.compiler.name;
|
|
42
|
-
_this.path = _this.compiler.account.physical_address;
|
|
43
|
-
return _this;
|
|
44
|
-
}
|
|
45
|
-
return _createClass(Global);
|
|
46
|
-
}(_native["default"]);
|
|
47
|
-
var _default = Global;
|
|
48
|
-
exports["default"] = _default;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _parse_expression3 = require("../functions/parse_expression");
|
|
8
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
9
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
10
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
11
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
12
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
13
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
|
-
var Native = /*#__PURE__*/_createClass(function Native() {
|
|
16
|
-
var _this = this;
|
|
17
|
-
_classCallCheck(this, Native);
|
|
18
|
-
_defineProperty(this, "find", function (obj) {
|
|
19
|
-
for (var c = 0; c < _this.children.length; c++) {
|
|
20
|
-
var child = _this.children[c];
|
|
21
|
-
if (child.token.value === obj.token.value && child.token.type === "variable") {
|
|
22
|
-
return child;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return _this.parent ? _this.parent.find(obj) : null;
|
|
26
|
-
});
|
|
27
|
-
_defineProperty(this, "greedy", function (tokens) {
|
|
28
|
-
var pos = 0,
|
|
29
|
-
obj;
|
|
30
|
-
if (_this.token.compiler.expr_types.includes(_this.token.type)) {
|
|
31
|
-
var _parse_expression = (0, _parse_expression3.parse_expression)(tokens.slice(pos + 1), _this, true),
|
|
32
|
-
obj_ = _parse_expression.obj,
|
|
33
|
-
pos_ = _parse_expression.pos;
|
|
34
|
-
obj = obj_;
|
|
35
|
-
pos += pos_;
|
|
36
|
-
} else if (_this.token.type === "keyword") {
|
|
37
|
-
if (["parse", "return"].includes(_this.token.value)) {
|
|
38
|
-
var _parse_expression2 = (0, _parse_expression3.parse_expression)(tokens.slice(pos + 1), _this),
|
|
39
|
-
_obj = _parse_expression2.obj,
|
|
40
|
-
_pos_ = _parse_expression2.pos;
|
|
41
|
-
_this.push(_obj);
|
|
42
|
-
pos += _pos_ + 1;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return {
|
|
46
|
-
obj: obj || _this,
|
|
47
|
-
pos: pos
|
|
48
|
-
};
|
|
49
|
-
});
|
|
50
|
-
_defineProperty(this, "set_parent", function (parent) {
|
|
51
|
-
_this.parent = parent;
|
|
52
|
-
_this.path = "".concat(_this.parent.path, "/").concat(_this.name);
|
|
53
|
-
});
|
|
54
|
-
_defineProperty(this, "push", function (obj) {
|
|
55
|
-
if (!obj) return;
|
|
56
|
-
_this.children.push(obj);
|
|
57
|
-
if (obj.set_parent) obj.set_parent(_this);
|
|
58
|
-
});
|
|
59
|
-
this._id = Math.random();
|
|
60
|
-
this.children = new Array();
|
|
61
|
-
});
|
|
62
|
-
var _default = Native;
|
|
63
|
-
exports["default"] = _default;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.op_to_name = exports["default"] = void 0;
|
|
7
|
-
var _native = _interopRequireDefault(require("./native"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
11
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
12
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
14
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
15
|
-
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
16
|
-
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
17
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
18
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
20
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
21
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
22
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
23
|
-
var op_to_name = {
|
|
24
|
-
"+": "add",
|
|
25
|
-
"-": "subtract",
|
|
26
|
-
"/": "divide",
|
|
27
|
-
"*": "multiply",
|
|
28
|
-
"=": "assign"
|
|
29
|
-
};
|
|
30
|
-
exports.op_to_name = op_to_name;
|
|
31
|
-
var Operator = /*#__PURE__*/function (_Native) {
|
|
32
|
-
_inherits(Operator, _Native);
|
|
33
|
-
var _super = _createSuper(Operator);
|
|
34
|
-
function Operator(token) {
|
|
35
|
-
var _this;
|
|
36
|
-
_classCallCheck(this, Operator);
|
|
37
|
-
_this = _super.call(this);
|
|
38
|
-
_defineProperty(_assertThisInitialized(_this), "generate_assembly", function (sequence) {
|
|
39
|
-
sequence.push("link ".concat(_this.token.compiler.account.physical_address, "/Opcodes/").concat(_this.name));
|
|
40
|
-
sequence.push("link ".concat(_this.token.compiler.account.physical_address, "/Datatypes/Twain"));
|
|
41
|
-
for (var c = 0; c < _this.children.length; c++) {
|
|
42
|
-
var child = _this.children[c];
|
|
43
|
-
child.generate_assembly(sequence);
|
|
44
|
-
sequence.push("cursor op".concat(c));
|
|
45
|
-
sequence.push("write {".concat(_this.token.compiler.datatypes.includes(child.token.type) ? "datapath" : "metadata.output", ":-1}"));
|
|
46
|
-
}
|
|
47
|
-
sequence.push("pop");
|
|
48
|
-
sequence.push("link ".concat(_this.token.compiler.account.physical_address, "/Datatypes/Twain"));
|
|
49
|
-
sequence.push("cursor inputs");
|
|
50
|
-
sequence.push("write ../{datapath:-1}");
|
|
51
|
-
sequence.push(_this.name);
|
|
52
|
-
sequence.push("pop ".concat(_this.token.compiler.account.physical_address, "/Datatypes/Twain"));
|
|
53
|
-
sequence.push("cursor {output}");
|
|
54
|
-
sequence.push("write ^{datapath:-1}");
|
|
55
|
-
sequence.push("pop Opcodes/".concat(_this.name));
|
|
56
|
-
});
|
|
57
|
-
_this.token = token;
|
|
58
|
-
_this.name = op_to_name[_this.token.value];
|
|
59
|
-
return _this;
|
|
60
|
-
}
|
|
61
|
-
return _createClass(Operator);
|
|
62
|
-
}(_native["default"]);
|
|
63
|
-
var _default = Operator;
|
|
64
|
-
exports["default"] = _default;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _native = _interopRequireDefault(require("./native"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
11
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
12
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
14
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
15
|
-
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
16
|
-
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
17
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
18
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
20
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
21
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
22
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
23
|
-
var Parse = /*#__PURE__*/function (_Native) {
|
|
24
|
-
_inherits(Parse, _Native);
|
|
25
|
-
var _super = _createSuper(Parse);
|
|
26
|
-
function Parse(token) {
|
|
27
|
-
var _this;
|
|
28
|
-
_classCallCheck(this, Parse);
|
|
29
|
-
_this = _super.call(this);
|
|
30
|
-
_defineProperty(_assertThisInitialized(_this), "generate_assembly", function (sequence) {
|
|
31
|
-
sequence.push("link ".concat(_this.token.compiler.account.physical_address, "/Opcodes/stdout"));
|
|
32
|
-
sequence.push("link ".concat(_this.token.compiler.account.physical_address, "/Datatypes/Twain"));
|
|
33
|
-
for (var c = 0; c < _this.children.length; c++) {
|
|
34
|
-
var child = _this.children[c];
|
|
35
|
-
child.generate_assembly(sequence);
|
|
36
|
-
sequence.push("cursor op".concat(c));
|
|
37
|
-
sequence.push("write {".concat(_this.token.compiler.datatypes.includes(child.token.type) ? "datapath" : "metadata.output", ":-1}"));
|
|
38
|
-
}
|
|
39
|
-
sequence.push("pop");
|
|
40
|
-
sequence.push("link ".concat(_this.token.compiler.account.physical_address, "/Datatypes/Twain"));
|
|
41
|
-
sequence.push("cursor inputs");
|
|
42
|
-
sequence.push("write ../{datapath:-1}");
|
|
43
|
-
sequence.push(_this.name);
|
|
44
|
-
sequence.push("pop Datatypes/Twain");
|
|
45
|
-
sequence.push("pop Opcodes/stdout");
|
|
46
|
-
});
|
|
47
|
-
_this.token = token;
|
|
48
|
-
_this.name = "stdout";
|
|
49
|
-
return _this;
|
|
50
|
-
}
|
|
51
|
-
return _createClass(Parse);
|
|
52
|
-
}(_native["default"]);
|
|
53
|
-
var _default = Parse;
|
|
54
|
-
exports["default"] = _default;
|