@ugo-studio/jspp 0.2.9 → 0.3.0
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/dist/core/codegen/class-handlers.js +6 -6
- package/dist/core/codegen/statement-handlers.js +1 -1
- package/package.json +1 -1
- package/src/prelude/any_value.hpp +362 -362
- package/src/prelude/any_value_access.hpp +170 -170
- package/src/prelude/any_value_defines.hpp +189 -189
- package/src/prelude/any_value_helpers.hpp +374 -374
- package/src/prelude/library/array.hpp +185 -185
- package/src/prelude/library/console.hpp +111 -111
- package/src/prelude/library/error.hpp +112 -112
- package/src/prelude/library/function.hpp +10 -10
- package/src/prelude/library/math.hpp +307 -307
- package/src/prelude/library/object.hpp +275 -275
- package/src/prelude/library/process.hpp +39 -39
- package/src/prelude/library/promise.hpp +123 -123
- package/src/prelude/library/symbol.hpp +52 -52
- package/src/prelude/library/timer.hpp +91 -91
- package/src/prelude/types.hpp +178 -178
- package/src/prelude/utils/access.hpp +411 -411
- package/src/prelude/utils/operators.hpp +336 -336
- package/src/prelude/values/array.hpp +0 -1
- package/src/prelude/values/async_iterator.hpp +83 -83
- package/src/prelude/values/function.hpp +82 -82
- package/src/prelude/values/helpers/array.hpp +198 -208
- package/src/prelude/values/helpers/async_iterator.hpp +275 -275
- package/src/prelude/values/helpers/function.hpp +108 -108
- package/src/prelude/values/helpers/iterator.hpp +144 -144
- package/src/prelude/values/helpers/promise.hpp +253 -253
- package/src/prelude/values/helpers/string.hpp +37 -61
- package/src/prelude/values/promise.hpp +72 -72
- package/src/prelude/values/prototypes/array.hpp +14 -2
- package/src/prelude/values/prototypes/iterator.hpp +201 -201
- package/src/prelude/values/prototypes/promise.hpp +196 -196
- package/src/prelude/values/prototypes/string.hpp +564 -542
- package/src/prelude/values/string.hpp +25 -26
|
@@ -42,16 +42,16 @@ export function visitClassDeclaration(node, context) {
|
|
|
42
42
|
// Default constructor
|
|
43
43
|
if (parentName) {
|
|
44
44
|
constructorLambda =
|
|
45
|
-
`jspp::AnyValue::make_class([=](jspp::AnyValue ${this.globalThisVar}, std::span<const jspp::AnyValue> args) mutable -> jspp::AnyValue {
|
|
46
|
-
auto __parent = ${parentName};
|
|
47
|
-
__parent.call(${this.globalThisVar}, args, "super");
|
|
48
|
-
return jspp::Constants::UNDEFINED;
|
|
45
|
+
`jspp::AnyValue::make_class([=](jspp::AnyValue ${this.globalThisVar}, std::span<const jspp::AnyValue> args) mutable -> jspp::AnyValue {
|
|
46
|
+
auto __parent = ${parentName};
|
|
47
|
+
__parent.call(${this.globalThisVar}, args, "super");
|
|
48
|
+
return jspp::Constants::UNDEFINED;
|
|
49
49
|
}, "${className}")`;
|
|
50
50
|
}
|
|
51
51
|
else {
|
|
52
52
|
constructorLambda =
|
|
53
|
-
`jspp::AnyValue::make_class([=](jspp::AnyValue ${this.globalThisVar}, std::span<const jspp::AnyValue> args) mutable -> jspp::AnyValue {
|
|
54
|
-
return jspp::Constants::UNDEFINED;
|
|
53
|
+
`jspp::AnyValue::make_class([=](jspp::AnyValue ${this.globalThisVar}, std::span<const jspp::AnyValue> args) mutable -> jspp::AnyValue {
|
|
54
|
+
return jspp::Constants::UNDEFINED;
|
|
55
55
|
}, "${className}")`;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -366,7 +366,7 @@ export function visitExpressionStatement(node, context) {
|
|
|
366
366
|
export function visitThrowStatement(node, context) {
|
|
367
367
|
const throwStmt = node;
|
|
368
368
|
const expr = this.visit(throwStmt.expression, context);
|
|
369
|
-
return `${this.indent()}throw jspp::Exception(${expr});
|
|
369
|
+
return `${this.indent()}throw jspp::Exception(${expr});
|
|
370
370
|
`;
|
|
371
371
|
}
|
|
372
372
|
export function visitTryStatement(node, context) {
|
package/package.json
CHANGED