summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sotoudeh <matthewsot@outlook.com>2017-07-29 23:42:00 -0700
committerMatthew Sotoudeh <matthewsot@outlook.com>2017-07-29 23:42:00 -0700
commit9ddc781b5d324123422776ccddee003bbeba1d5b (patch)
tree6c71dcd2c0cc545283fba83bf4cbd0c12f2b0a67
parent5f8fe1650f827905368d0ee1a8b49239ee2b583b (diff)
fixed escaping code
-rw-r--r--interpreter/interpreter.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/interpreter/interpreter.js b/interpreter/interpreter.js
index a41fc26..a7b750f 100644
--- a/interpreter/interpreter.js
+++ b/interpreter/interpreter.js
@@ -94,7 +94,7 @@ Yaepl.prototype.splitParams = function (params) {
flags.escaped = (chr == "\\");
if (flags.escaped) {
- curr_param = curr_param.substring(0, curr_param.length - 1);
+ //curr_param = curr_param.substring(0, curr_param.length - 1);
}
else if (chr === flags.quote) {
flags.quote = null;
@@ -122,7 +122,7 @@ Yaepl.prototype.evaluateParams = function (op, line, params) {
var end = isJump ? 1 : 0;
for (var p = 0; p < params.length - end; p++) {
- if (params[p].startsWith("'") || params[p].startsWith("\"") || !isNaN(parseInt(params[p]))) {
+ if (params[p].startsWith("'") || params[p].startsWith("\"") || !isNaN(parseInt(params[p])) || params[p] == "[]") {
params[p] = eval(params[p]);
}
else {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback