mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-09 06:34:04 +09:00
basic: some minor fixes
This commit is contained in:
@@ -203,6 +203,7 @@ let BasicVar = function(literal, type) {
|
|||||||
// Abstract Syntax Tree
|
// Abstract Syntax Tree
|
||||||
// creates empty tree node
|
// creates empty tree node
|
||||||
let astToString = function(ast) {
|
let astToString = function(ast) {
|
||||||
|
if (ast === undefined || ast.astType === undefined) return "";
|
||||||
var sb = "";
|
var sb = "";
|
||||||
var marker = ("lit" == ast.astType) ? "i" :
|
var marker = ("lit" == ast.astType) ? "i" :
|
||||||
("op" == ast.astType) ? String.fromCharCode(177) :
|
("op" == ast.astType) ? String.fromCharCode(177) :
|
||||||
@@ -394,7 +395,7 @@ let ForGen = function(s,e,t) {
|
|||||||
//if (mutated === undefined) throw "InternalError: parametre is missing";
|
//if (mutated === undefined) throw "InternalError: parametre is missing";
|
||||||
if (mutated !== undefined) this.current = (mutated|0);
|
if (mutated !== undefined) this.current = (mutated|0);
|
||||||
this.current += this.step;
|
this.current += this.step;
|
||||||
serial.println(`[BASIC.FORGEN] ${(mutated|0)} -> ${this.current}`);
|
//serial.println(`[BASIC.FORGEN] ${(mutated|0)} -> ${this.current}`);
|
||||||
return this.hasNext() ? this.current : undefined;
|
return this.hasNext() ? this.current : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
0
assets/maptest.bas
Normal file
0
assets/maptest.bas
Normal file
Reference in New Issue
Block a user