diff --git a/src/cmd.js b/src/cmd.js index 57cf6f1..bcdde7a 100644 --- a/src/cmd.js +++ b/src/cmd.js @@ -267,9 +267,6 @@ const input = (state, code, index) => { } const can_evaluate_node = (parent, node) => { - // TODO also can evaluate in top level even if stepped into (and evaluate in - // any stack frame that was before current one) - const anc = ancestry(node, parent) if(anc == null){ return {ok: false, message: 'out of scope'} @@ -281,7 +278,7 @@ const can_evaluate_node = (parent, node) => { if(intermediate_fn != null){ // TODO check if identifier is defined in current scope, and eval - return {ok: false, message: 'cannot eval inside function: first step into it'} + return {ok: false, message: 'code was not reached during program execution'} } return {ok: true} diff --git a/test/test.js b/test/test.js index 7dc2843..e9d3e09 100644 --- a/test/test.js +++ b/test/test.js @@ -2408,7 +2408,7 @@ const y = x()` s6.effects, { type: 'set_status', - args: ['cannot eval inside function: first step into it'] + args: ['code was not reached during program execution'] } )