Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

linh

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

linh - npm Package Compare versions

Comparing version
0.0.4
to
0.0.5
+44
-44
lib/ast.js

@@ -5,3 +5,3 @@ var TYPE = require('./config/type');

function AST(context) {
this.context = context;
this.context = context;
}

@@ -12,58 +12,58 @@

AST.prototype.parse = function(values) {
var self = this;
var self = this;
if (!isFunc(self, values[0]) && values.length != 1) {
throw new Error('expr error, first item is not function');
}
if (!isFunc(self, values[0]) && values.length != 1) {
throw new Error('expr error, first item is not function');
}
var list = [],
length = values.length;
var list = [],
length = values.length;
for (var i = 0, cur = 0; i < length; i++) {
var item = values[i];
if (item.type == TYPE.SYNTAX_END) {
list.push(parse(self, values.slice(cur, i)));
cur = i + 1;
}
}
for (var i = 0, cur = 0; i < length; i++) {
var item = values[i];
if (item.type == TYPE.SYNTAX_END) {
list.push(parse(self, values.slice(cur, i)));
cur = i + 1;
}
}
if (cur < length) {
list.push(parse(self, values.slice(cur, i)));
}
if (cur < length) {
list.push(parse(self, values.slice(cur, i)));
}
return list;
return list;
};
var parse = function(self, values) {
var node = new Expression(self.context, values[0]);
var node = new Expression(self.context, values[0]);
for (var i = 1; i < values.length; i++) {
var item = values[i];
if (item.type == TYPE.SYNTAX_PAUSE) {
node.len++;
break;
}
if (item.type == TYPE.SYNTAX_END) {
break;
}
if (!isFunc(self, item)) {
node.add(item);
} else {
var son = parse(self, values.slice(i));
node.add(son);
i += son.length();
}
}
for (var i = 1; i < values.length; i++) {
var item = values[i];
if (item.type == TYPE.SYNTAX_PAUSE) {
node.len++;
break;
}
if (item.type == TYPE.SYNTAX_END) {
break;
}
if (!isFunc(self, item)) {
node.add(item);
} else {
var son = parse(self, values.slice(i));
node.add(son);
i += son.length();
}
}
return node;
return node;
};
var isFunc = function(self, values) {
if (values.type == TYPE.ID || values.type == TYPE.FUNC) {
// identifier
if (self.context.funcs.have(values.content)) {
return true;
}
}
return false;
if (values.type == TYPE.ID || values.type == TYPE.FUNC) {
// identifier
if (self.context.funcs.have(values.content)) {
return true;
}
}
return false;
};

@@ -5,7 +5,7 @@ var TYPE = require('./config/type');

function Context(global) {
this.global = global || {};
this.funcs = new Funcs();
this.local = {};
this.global = global || {};
this.funcs = new Funcs();
this.local = {};
this.init();
this.init();
}

@@ -16,9 +16,9 @@

Context.prototype.init = function() {
var self = this;
self.funcs.register('set', function(params) {
var key = params[0].content;
if (key) {
self.local[key] = params[1].get();
}
});
var self = this;
self.funcs.register('set', function(params) {
var key = params[0].content;
if (key) {
self.local[key] = params[1].get();
}
});
};

@@ -30,6 +30,6 @@

Context.prototype.def = function(name, value) {
if (!!this.local[name]) {
throw new Error(name + ' has defined.');
}
this.local[name] = value;
if (!!this.local[name]) {
throw new Error(name + ' has defined.');
}
this.local[name] = value;
};

@@ -41,7 +41,7 @@

Context.prototype.set = function(name, value) {
if (!!this.local[name]) {
this.local[name] = value;
} else {
this.global[name] = value;
}
if (this.local[name] != undefined) {
this.local[name] = value;
} else {
this.global[name] = value;
}
};

@@ -53,7 +53,7 @@

Context.prototype.get = function(name) {
if (this.local[name] !== undefined) {
return this.local[name];
} else {
return this.global[name];
}
if (this.local[name] !== undefined) {
return this.local[name];
} else {
return this.global[name];
}
};

@@ -65,3 +65,3 @@

Context.prototype.run = function(name, params) {
return this.funcs.run(name, params);
return this.funcs.run(name, params);
};

@@ -7,14 +7,14 @@ var TYPE = require('../config/type');

exports.inc = function(params) {
if (params.length != 1)
throw new Error('function \"inc\" only take one parameter');
if (params.length != 1)
throw new Error('function \"inc\" only take one parameter');
var value = params[0],
num = value.get() + 1;
var value = params[0],
num = value.get() + 1;
if (typeof num == 'number')
value.set(num);
else
throw new Error('type ' + value.type + ' increase not support');
if (typeof num == 'number')
value.set(num);
else
throw new Error('type ' + value.type + ' increase not support');
return num;
return num;
};

@@ -26,14 +26,14 @@

exports.dec = function(params) {
if (params.length != 1)
throw new Error('function \"inc\" only take one parameter');
if (params.length != 1)
throw new Error('function \"inc\" only take one parameter');
var value = params[0],
num = value.get() - 1;
var value = params[0],
num = value.get() - 1;
if (typeof num == 'number')
value.set(num);
else
throw new Error('type ' + value.type + ' increase not support');
if (typeof num == 'number')
value.set(num);
else
throw new Error('type ' + value.type + ' increase not support');
return num;
return num;
};

@@ -45,7 +45,7 @@

exports.add = function(params) {
var sum = 0;
params.forEach(function(value) {
sum += value.get();
});
return sum;
var sum = 0;
params.forEach(function(value) {
sum += value.get();
});
return sum;
};

@@ -57,7 +57,7 @@

exports.sub = function(params) {
var sum = params[0].get();
params.slice(1).forEach(function(value) {
sum -= value.get();
});
return sum;
var sum = params[0].get();
params.slice(1).forEach(function(value) {
sum -= value.get();
});
return sum;
};

@@ -69,7 +69,7 @@

exports.mul = function(params) {
var sum = params[0].get();
params.slice(1).forEach(function(value) {
sum *= value.get();
});
return sum;
var sum = params[0].get();
params.slice(1).forEach(function(value) {
sum *= value.get();
});
return sum;
};

@@ -81,7 +81,7 @@

exports.div = function(params) {
var sum = params[0].get();
params.slice(1).forEach(function(value) {
sum /= value.get();
});
return sum;
var sum = params[0].get();
params.slice(1).forEach(function(value) {
sum /= value.get();
});
return sum;
};

@@ -93,7 +93,7 @@

exports.mod = function(params) {
var sum = params[0].get();
params.slice(1).forEach(function(value) {
sum %= value.get();
});
return sum;
var sum = params[0].get();
params.slice(1).forEach(function(value) {
sum %= value.get();
});
return sum;
};

@@ -8,7 +8,7 @@ var arith = require('./arithmetic');

module.exports = {
arith: arith,
logic: logic,
syntax: syntax,
io: io,
array: array,
arith: arith,
logic: logic,
syntax: syntax,
io: io,
array: array,
};
exports.echo = function(params) {
var values = [];
params.forEach(function(value) {
values.push(value.get());
})
return console.log.apply(null, values);
var values = [];
params.forEach(function(value) {
values.push(value.get());
})
return console.log.apply(null, values);
};
exports.gt = function(params) {
var num = params[0].get();
var left = params.slice(1);
var num = params[0].get();
var left = params.slice(1);
for (var i = 0; i < left.length; i++) {
var value = left[i].get();
if (num <= value)
return false;
}
return true;
for (var i = 0; i < left.length; i++) {
var value = left[i].get();
if (num <= value)
return false;
}
return true;
};
exports.gte = function(params) {
var num = params[0].get();
var left = params.slice(1);
var num = params[0].get();
var left = params.slice(1);
for (var i = 0; i < left.length; i++) {
var value = left[i].get();
if (num < value)
return false;
}
return true;
for (var i = 0; i < left.length; i++) {
var value = left[i].get();
if (num < value)
return false;
}
return true;
};
exports.lt = function(params) {
var num = params[0].get();
var left = params.slice(1);
var num = params[0].get();
var left = params.slice(1);
for (var i = 0; i < left.length; i++) {
var value = left[i].get();
if (num >= value)
return false;
}
return true;
for (var i = 0; i < left.length; i++) {
var value = left[i].get();
if (num >= value)
return false;
}
return true;
};
exports.lte = function(params) {
var num = params[0].get();
var left = params.slice(1);
var num = params[0].get();
var left = params.slice(1);
for (var i = 0; i < left.length; i++) {
var value = left[i].get();
if (num > value)
return false;
}
return true;
for (var i = 0; i < left.length; i++) {
var value = left[i].get();
if (num > value)
return false;
}
return true;
};
exports.if = function(params) {
var expression = params[0];
var iftrue = params[1];
var iffalse = params[2];
var expression = params[0];
var iftrue = params[1];
var iffalse = params[2];
if (expression.get() && !!iftrue) {
return iftrue.get();
} else if (!!iffalse) {
return iffalse.get();
}
if (expression.get() && !!iftrue) {
return iftrue.get();
} else if (!!iffalse) {
return iffalse.get();
}
return undefined;
return undefined;
};
exports.else = function(params) {
for (var i = 0; i < params.length - 1; i++) {
params[i].get();
}
for (var i = 0; i < params.length - 1; i++) {
params[i].get();
}
return params[i].get();
return params[i].get();
};
exports.for = function(params) {
return null;
return null;
};
exports.while = function(params) {
var expression = params[0];
var job = params[1];
var expression = params[0];
var job = params[1];
while (expression.get())
job.get();
while (expression.get())
job.get();
return undefined;
return undefined;
};

@@ -42,5 +42,5 @@

exports.call = function(params) {
var func = params[1];
var args = [params[0]].concat(params.slice(2));
return func.call(args);
var func = params[1];
var args = [params[0]].concat(params.slice(2));
return func.call(args);
};

@@ -52,6 +52,6 @@

exports.do = function(params) {
for (var i = 0; i < params.length - 1; i++) {
params[i].get();
}
return params[i].get();
for (var i = 0; i < params.length - 1; i++) {
params[i].get();
}
return params[i].get();
};

@@ -63,13 +63,13 @@

exports.is = function(params) {
if (params.length != 1)
throw new Error('function \"is\" only take one parameter');
if (params.length != 1)
throw new Error('function \"is\" only take one parameter');
return params[0].get();
return params[0].get();
};
exports.and = function(params) {
if (params.length != 1)
throw new Error('function \"and\" only take one parameter');
if (params.length != 1)
throw new Error('function \"and\" only take one parameter');
return params[0].get();
return params[0].get();
};

@@ -10,7 +10,7 @@ /*

function Expression(context, value) {
property(this, 'context', context);
property(this, 'isFunc', true);
property(this, 'len', 0);
this.name = value.content;
this.params = [];
property(this, 'context', context);
property(this, 'isFunc', true);
property(this, 'len', 0);
this.name = value.content;
this.params = [];
}

@@ -24,8 +24,8 @@

Expression.prototype.add = function(value) {
if (value.type == TYPE.ID) {
// 从上下文中得到标识符的值
value.load(this.context);
}
this.params.push(value);
this.len++;
if (value.type == TYPE.ID) {
// 从上下文中得到标识符的值
value.load(this.context);
}
this.params.push(value);
this.len++;
};

@@ -37,3 +37,3 @@

Expression.prototype.length = function() {
return this.len;
return this.len;
};

@@ -45,6 +45,6 @@

Expression.prototype.run = function() {
if (this.params.length > 0) {
return this.context.run(this.name, this.params);
}
return this.context.get(this.name);
if (this.params.length > 0) {
return this.context.run(this.name, this.params);
}
return this.context.get(this.name);
};

@@ -56,3 +56,3 @@

Expression.prototype.get = function() {
return this.run();
return this.run();
};

@@ -5,4 +5,4 @@ var library = require('./core');

function Functions() {
this.list = {};
this.load();
this.list = {};
this.load();
}

@@ -16,8 +16,8 @@

Functions.prototype.load = function() {
for (var name in library) {
var lib = library[name];
for (var method in lib) {
this.list[method] = lib[method];
}
}
for (var name in library) {
var lib = library[name];
for (var method in lib) {
this.list[method] = lib[method];
}
}
};

@@ -29,3 +29,3 @@

Functions.prototype.register = function(name, callback) {
this.list[name] = callback;
this.list[name] = callback;
};

@@ -37,3 +37,3 @@

Functions.prototype.have = function(func) {
return !!this.list[func];
return !!this.list[func];
};

@@ -45,3 +45,3 @@

Functions.prototype.run = function(func, params) {
return this.list[func](params);
return this.list[func](params);
};

@@ -5,75 +5,57 @@ var Value = require('./value');

exports.parse = function(str) {
// sentence pause
if (str == ',') {
return new Value(TYPE.SYNTAX_PAUSE, str);
}
// sentence pause
if (str == ',') {
return new Value(TYPE.SYNTAX_PAUSE, str);
}
// sentence end
if (str == '.') {
return new Value(TYPE.SYNTAX_END, str);
}
// sentence end
if (str == '.') {
return new Value(TYPE.SYNTAX_END, str);
}
if (str[0] == '[' && str[str.length - 1] == ']') {
// todo recr every item
return new Value(TYPE.ARR, str);
}
if (str[0] == '[' && str[str.length - 1] == ']') {
// todo recr every item
return new Value(TYPE.ARR, str);
}
var re = new RegExp(
'(^[A-Za-z_$][\\w\\s?-]*?$)|' + // identifier
'(^[\\"\\\'][\\w\\W]*[\\"\\\']$)|' + // string
'(^[0-9]+(.[0-9]+)?$)|' + // number (include float)
'(^[A-Za-z_$][\\w\\s?-\\d\\[\\]]*?$)'); // array
var re = new RegExp(
'(^[A-Za-z_$][\\w\\s?-]*?$)|' + // identifier
'(^[\\"\\\'][\\w\\W]*[\\"\\\']$)|' + // string
'(^[0-9]+(.[0-9]+)?$)|' + // number (include float)
'(^[A-Za-z_$][\\w\\s?-\\d\\[\\]]*?$)'); // array
var m = str.match(re);
var m = str.match(re);
if (!m) {
var err = 'token not recognize \"' + str + '\"';
throw new Error(err);
}
if (!m) {
var err = 'token not recognize \"' + str + '\"';
throw new Error(err);
}
// identifier
if (m[1]) {
switch (m[0]) {
case 'true':
case 'false':
return new Value(TYPE.BOOL, Boolean(m[0]));
case 'null':
return new Value(TYPE.NULL, null);
default:
return new Value(TYPE.ID, m[0]);
}
}
// identifier
if (m[1]) {
switch (m[0]) {
case 'true':
case 'false':
return new Value(TYPE.BOOL, Boolean(m[0]));
case 'null':
return new Value(TYPE.NULL, null);
default:
return new Value(TYPE.ID, m[0]);
}
}
// string
if (m[2]) {
return new Value(TYPE.STR, m[0]);
}
// string
if (m[2]) {
return new Value(TYPE.STR, m[0]);
}
// number
if (m[3]) {
return new Value(TYPE.NUM, m[0]);
}
// number
if (m[3]) {
return new Value(TYPE.NUM, m[0]);
}
// array
if (m[5]) {
return new Value(TYPE.ARR, m[0]);
}
// array
if (m[5]) {
return new Value(TYPE.ARR, m[0]);
}
};
// console.log('parse', exports.parse('i'));;
// console.log('parse', exports.parse('arr[0]'));; // todo
// console.log('parse', exports.parse('$i'));;
// console.log('parse', exports.parse('name'));;
// console.log('parse', exports.parse('"name"'));;
// console.log('parse', exports.parse('"hello world"'));;
// console.log('parse', exports.parse('"hello world \\" "'));;
// console.log('parse', exports.parse('name1'));;
// console.log('parse', exports.parse('name_1'));;
// console.log('parse', exports.parse('_name'));;
// console.log('parse', exports.parse('name-1'));;
// console.log('parse', exports.parse('name-1 '));;
// console.log('parse', exports.parse('name-1?'));;
// console.log('parse', exports.parse('123'));;
// console.log('parse', exports.parse('1'));;
// console.log('parse', exports.parse('12.3'));;

@@ -11,16 +11,16 @@ var util = require('util');

module.exports = function(code) {
var values = Token(code);
// console.log('values', values);
var values = Token(code);
// console.log('values', values);
var list = AstTree.parse(values);
// console.log('list', util.inspect(list, false, 15));
var list = AstTree.parse(values);
// console.log('list', util.inspect(list, false, 15));
var result;
for (var i = 0; i < list.length; i++) {
var expression = list[i];
// console.log('expression', util.inspect(expression, false, 15));
result = expression.run();
}
var result;
for (var i = 0; i < list.length; i++) {
var expression = list[i];
// console.log('expression', util.inspect(expression, false, 15));
result = expression.run();
}
return result;
return result;
};

@@ -5,8 +5,8 @@

exports.push = function(item) {
stack.push(item);
stack.push(item);
};
exports.pop = function(item) {
return stack.pop(item);
return stack.pop(item);
};
var lexer = require('./lexer');
function token(text) {
var list = [];
var items = split(text);
var list = [];
var items = split(text);
for (var i = 0; i < items.length; i++) {
var value = lexer.parse(items[i]);
list.push(value);
}
for (var i = 0; i < items.length; i++) {
var value = lexer.parse(items[i]);
list.push(value);
}
return list;
return list;
}
var split = function(text) {
var result = [];
var strings = [];
var arrays = [];
var list = text.trim()
.replace(/[\r\n\t]/g, ' ')
.replace(/[^A-Za-z]\[[\w\W]*?\]/g, function(match) {
arrays.push(match);
return ' #arr ';
})
.replace(/\"[\w\W]*?\"/g, function(match) {
strings.push(match);
return ' #str ';
})
.replace(/([.,])[^\d]?/g, ' $1 ')
.split(/[\ ]+/);
for (var i = 0; i < list.length; i++) {
var item = list[i];
if (item == '#str') {
result.push(strings.shift());
} else if (item == '#arr') {
result.push(arrays.shift().trim());
} else if (item) {
result.push(item);
}
}
return result;
var result = [];
var strings = [];
var arrays = [];
var list = text.trim()
// remove comment
.replace(/#[^\n]*\n/g, '')
.replace(/[\r\n\t]+/g, ' ')
// todo change
.replace(/[^A-Za-z]\[[\w\W]*?\]/g, function(match) {
arrays.push(match);
return ' #arr ';
})
// todo change
.replace(/\"[\w\W]*?\"/g, function(match) {
strings.push(match);
return ' #str ';
})
.replace(/([.,])[^\d]?/g, ' $1 ')
.split(/[\ ]+/);
for (var i = 0; i < list.length; i++) {
var item = list[i];
if (item == '#str') {
result.push(strings.shift());
} else if (item == '#arr') {
result.push(arrays.shift().trim());
} else if (item) {
result.push(item);
}
}
return result;
};
module.exports = token;
// console.log('token()', token('echo [1, 2, 3, 4]'));
// console.log('token()', token('echo arr[0]'));
// console.log('token()', token('add 12,8'));
// console.log('token()', token('if do 5 lt 3, echo "5 < 3", else echo "5 > 3"'));
// console.log('token()', token('do 3 gt 5'));
// console.log('token()', token('if gt num 5 echo "num > 5". echo "num <= 5"'));
// console.log('token()', token('if gt i 20. echo "big!". else set j 10. echo "this is " j.'));
// console.log(split('if gt 3 2. echo "hello world,3 > 2" "test"'));
exports.property = function(obj, key, value) {
Object.defineProperty(obj, key, {
value: value,
enumerable: false,
configurable: true,
writable: true
});
Object.defineProperty(obj, key, {
value: value,
enumerable: false,
configurable: true,
writable: true
});
};
exports.const = function(obj, key, value) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: false
});
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: false
});
};

@@ -34,12 +34,12 @@ /*

module.exports = function() {
var string = util.format.apply(this, arguments);
string = string.replace(/[\d]+|true|false|(undefined)|(\"[\w\W]*?\")/g, function(text, undef, str) {
if (!!undef) {
return styles.grey[0] + text + styles.grey[1];
} else if (str) {
return styles.green[0] + text + styles.green[1];
}
return styles.yellow[0] + text + styles.yellow[1];
});
process.stdout.write(string + '\n');
var string = util.format.apply(this, arguments);
string = string.replace(/[\d]+|true|false|(undefined)|(\"[\w\W]*?\")/g, function(text, undef, str) {
if (!!undef) {
return styles.grey[0] + text + styles.grey[1];
} else if (str) {
return styles.green[0] + text + styles.green[1];
}
return styles.yellow[0] + text + styles.yellow[1];
});
process.stdout.write(string + '\n');
};

@@ -46,0 +46,0 @@

@@ -6,3 +6,3 @@ var AST = require('./ast');

function Value(type, text) {
this.init(type, text);
this.init(type, text);
}

@@ -13,29 +13,29 @@

Value.prototype.init = function(type, text) {
if (!text) {
var value = type;
property(this, 'type', getType(value));
this.content = value;
return;
}
if (!text) {
var value = type;
property(this, 'type', getType(value));
this.content = value;
return;
}
property(this, 'type', type);
switch (type) {
case TYPE.STR:
this.content = dealStr(text);
break;
case TYPE.NUM:
this.content = dealNum(text);
break;
case TYPE.ARR:
this.content = dealArray(text);
break;
case TYPE.BOOL:
this.content = Boolean(text);
break;
case TYPE.NULL:
this.content = null;
break;
default:
this.content = text;
}
property(this, 'type', type);
switch (type) {
case TYPE.STR:
this.content = dealStr(text);
break;
case TYPE.NUM:
this.content = dealNum(text);
break;
case TYPE.ARR:
this.content = dealArray(text);
break;
case TYPE.BOOL:
this.content = Boolean(text);
break;
case TYPE.NULL:
this.content = null;
break;
default:
this.content = text;
}

@@ -45,68 +45,68 @@ };

Value.prototype.load = function(context) {
if (context.funcs.have(this.content)) {
this.type = TYPE.FUNC;
property(this, 'ast', new AST(context));
}
property(this, 'context', context);
if (context.funcs.have(this.content)) {
this.type = TYPE.FUNC;
property(this, 'ast', new AST(context));
}
property(this, 'context', context);
};
Value.prototype.get = function() {
if (this.type == TYPE.ID) {
return this.context.get(this.content);
}
return this.content;
if (this.type == TYPE.ID) {
return this.context.get(this.content);
}
return this.content;
};
Value.prototype.set = function(val) {
if (this.type == TYPE.ID) {
return this.context.set(this.content, val);
}
this.content = val;
if (this.type == TYPE.ID) {
return this.context.set(this.content, val);
}
this.content = val;
};
Value.prototype.call = function(params) {
var values = [this].concat(params);
var expr = this.ast.parse(values).run();
return expr;
var values = [this].concat(params);
var expr = this.ast.parse(values).run();
return expr;
};
Value.prototype.type = function() {
return this.type;
return this.type;
};
var getType = function(value) {
var type = typeof value;
switch (type) {
case 'string':
switch (value) {
case 'true':
case 'false':
return TYPE.BOOL;
case 'null':
return TYPE.NULL;
}
return TYPE.STR;
case 'number':
return TYPE.NUM;
case 'boolean':
return TYPE.BOOL;
case 'object':
// todo
return TYPE.ARR;
}
var type = typeof value;
switch (type) {
case 'string':
switch (value) {
case 'true':
case 'false':
return TYPE.BOOL;
case 'null':
return TYPE.NULL;
}
return TYPE.STR;
case 'number':
return TYPE.NUM;
case 'boolean':
return TYPE.BOOL;
case 'object':
// todo
return TYPE.ARR;
}
};
var dealStr = function(str) {
return str.substring(1, str.length - 1);
return str.substring(1, str.length - 1);
};
var dealNum = function(str) {
if (/[.]/.test(str)) {
return parseFloat(str);
}
return parseInt(str);
if (/[.]/.test(str)) {
return parseFloat(str);
}
return parseInt(str);
};
var dealArray = function(str) {
return JSON.parse(str);
return JSON.parse(str);
};
{
"name": "linh",
"version": "0.0.4",
"version": "0.0.5",
"description": "A script language",

@@ -5,0 +5,0 @@ "main": "./lib/linh.js",

@@ -15,8 +15,9 @@ var run = require('../lib/linh');

// run('set i 10');
// run('i');
// run('while lt i 5, do echo i, inc i.');
// run('while lt i 5, do echo i, inc i. echo "over"');
// var code = 'set i 10';
// var code = 'i';
// var code = 'while lt i 5, do echo i, inc i.';
// var code = 'while lt i 5, do echo i, inc i. echo "over"';
run('set i 0');
run('while lt i 5, do echo i, inc i.');
var code = 'set i 0. while lt i 5, do echo i, inc i.';
console.log(run(code));

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet