diff --git a/src/io.js b/src/io.js index 17320a2..ff1fc3c 100644 --- a/src/io.js +++ b/src/io.js @@ -21,6 +21,14 @@ class Juicescript_io { get stderr(){ return { debug: (text, additional) => { + // PRETTY PRINT INCOMMING DATA? // + // object + if(typeof text === "object"){ + text = "Object" + "\n" + JSON.stringify(text, null, 4); + } + + + // OUTPUT // // add defaults additional ??= {}; additional.line ??= null; diff --git a/src/main.js b/src/main.js index ae56e62..062ee6f 100644 --- a/src/main.js +++ b/src/main.js @@ -110,6 +110,7 @@ class Juicescript { Run previously parsed program */ run(){ + /**/this.io.stderr.debug(this.program_tree); /**/console.log(this.program_tree); } }