SimpleLanguage is a language which compiles to JavaScript.
-
install nodejs
-
install simple language
$ git clone https://github.com/hitsubunnu/SimpleLanguage.git
$ cd SimpleLanguage
$ node builder.js test/w.sl
$ node test/w.js
$ cat test/w.sl
my i = 0;
my j = 0;
w(i<2){
i = i + 1;
if(i > 0){
p "hello world!";
}
f(j=0;j<4;j = j +1;){
p j;
}
}
$ node builder.js test/w.sl
$ node test/w.js
hello world!
0
1
2
3
hello world!
0
1
2
3
{ value: '=', arity: 'binary',
first: { value: 'aa', arity: 'name', reserved: false, nud: [Function], led: null, std: null, lbp: 0, scope: { def: { my: { value: 'my', arity: 'name', reserved: true }, aa: [Circular] }, parent: undefined } },
second:
{ value: '[', arity: 'unary',
first:
[ { value: 1, arity: 'literal' },
{ value: 3, arity: 'literal' },
{ value: 3, arity: 'literal' } ] } }