diff --git a/src/cli/repl.es6 b/src/cli/repl.es6 index 80c47e5d..14ab5b9b 100644 --- a/src/cli/repl.es6 +++ b/src/cli/repl.es6 @@ -144,7 +144,10 @@ The following commands are available: else if (!Output) { console.log(String(Output).red); } else if (!printed) { - if (Output && Output.Cast && ( + if (Output instanceof NIL) { + // do nothing? + } + else if (Output && Output.Cast && ( Output.Operator.has('repr') || Output.Cast.has('String'))) { @@ -157,9 +160,6 @@ The following commands are available: } console.log(txt.magenta); } - else if (Output instanceof NIL) { - // do nothing? - } else if (Output instanceof CheddarScope) { console.log(`< Instance of "${Output.constructor.Name}" >`.cyan); } diff --git a/src/interpreter/states/for.es6 b/src/interpreter/states/for.es6 index 0cb40531..0ca3cae6 100644 --- a/src/interpreter/states/for.es6 +++ b/src/interpreter/states/for.es6 @@ -14,7 +14,7 @@ export default class CheddarFor { exec() { // Create `for`'s scope, inherits from parent - let SCOPE; + let SCOPE = this.scope; // Determine whether for..in or for (a; b; c) // 4 tokens === for..in