✨ add pretty printer to stderr.debug()
This commit is contained in:
parent
3bce41fda6
commit
b91893d06f
@ -21,6 +21,14 @@ class Juicescript_io {
|
|||||||
get stderr(){
|
get stderr(){
|
||||||
return {
|
return {
|
||||||
debug: (text, additional) => {
|
debug: (text, additional) => {
|
||||||
|
// PRETTY PRINT INCOMMING DATA? //
|
||||||
|
// object
|
||||||
|
if(typeof text === "object"){
|
||||||
|
text = "Object" + "\n" + JSON.stringify(text, null, 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// OUTPUT //
|
||||||
// add defaults
|
// add defaults
|
||||||
additional ??= {};
|
additional ??= {};
|
||||||
additional.line ??= null;
|
additional.line ??= null;
|
||||||
|
@ -110,6 +110,7 @@ class Juicescript {
|
|||||||
Run previously parsed program
|
Run previously parsed program
|
||||||
*/
|
*/
|
||||||
run(){
|
run(){
|
||||||
|
/**/this.io.stderr.debug(this.program_tree);
|
||||||
/**/console.log(this.program_tree);
|
/**/console.log(this.program_tree);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user