porffor 0.0.0-7e89c1d → 0.0.0-828ee15
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/compiler/codeGen.js +2 -1
- package/package.json +1 -1
- package/runner/repl.js +2 -2
package/compiler/codeGen.js
CHANGED
@@ -538,7 +538,8 @@ const performOp = (scope, op, left, right, leftType, rightType, _global = false,
|
|
538
538
|
if (!['==', '===', '!=', '!==', '>', '>=', '<', '<='].includes(op)) return number(NaN);
|
539
539
|
|
540
540
|
// else leave bool ops
|
541
|
-
// todo: convert string to number if string and number
|
541
|
+
// todo: convert string to number if string and number
|
542
|
+
// todo: string (>|>=|<|<=) string
|
542
543
|
// todo: string equality
|
543
544
|
}
|
544
545
|
|
package/package.json
CHANGED
package/runner/repl.js
CHANGED
@@ -64,8 +64,8 @@ const run = async (source, _context, _filename, callback, run = true) => {
|
|
64
64
|
const ret = run ? exports.main() : undefined;
|
65
65
|
callback(null, ret);
|
66
66
|
|
67
|
-
|
68
|
-
prev = toRun + ';\n';
|
67
|
+
if (source.includes(' = ') || source.includes('let ') || source.includes('var ') || source.includes('const ') || source.includes('function ')) prev = toRun + ';\n';
|
68
|
+
// prev = toRun + ';\n';
|
69
69
|
};
|
70
70
|
|
71
71
|
const replServer = repl.start({ prompt: '> ', eval: run });
|