mirror of
https://github.com/leporello-js/leporello-js
synced 2026-01-13 13:04:30 -08:00
fix error message
This commit is contained in:
@@ -267,9 +267,6 @@ const input = (state, code, index) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const can_evaluate_node = (parent, node) => {
|
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)
|
const anc = ancestry(node, parent)
|
||||||
if(anc == null){
|
if(anc == null){
|
||||||
return {ok: false, message: 'out of scope'}
|
return {ok: false, message: 'out of scope'}
|
||||||
@@ -281,7 +278,7 @@ const can_evaluate_node = (parent, node) => {
|
|||||||
|
|
||||||
if(intermediate_fn != null){
|
if(intermediate_fn != null){
|
||||||
// TODO check if identifier is defined in current scope, and eval
|
// 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}
|
return {ok: true}
|
||||||
|
|||||||
@@ -2408,7 +2408,7 @@ const y = x()`
|
|||||||
s6.effects,
|
s6.effects,
|
||||||
{
|
{
|
||||||
type: 'set_status',
|
type: 'set_status',
|
||||||
args: ['cannot eval inside function: first step into it']
|
args: ['code was not reached during program execution']
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user