make decl_pair evaluatable to righthand value

This commit is contained in:
Dmitry Vasilev
2023-11-19 04:27:21 +08:00
parent 25b9504a2f
commit 5c81f50348
2 changed files with 1 additions and 3 deletions

View File

@@ -1078,7 +1078,7 @@ const eval_decl_pair = (s, scope, calls, context) => {
return {
ok: true,
node: {...s_evaled, result: {ok: true}},
node: {...s_evaled, result: node.result},
scope: {...scope_after_expr, ...next_scope},
calls: next_calls,
}

View File

@@ -1100,7 +1100,6 @@ const decl_pair = if_ok(
return {
...node,
type: 'decl_pair',
not_evaluatable: true,
children: [lefthand, expr],
}
}
@@ -1140,7 +1139,6 @@ const simple_decl_pair = if_ok(
return {
...node,
type: 'decl_pair',
not_evaluatable: true,
children: [lefthand, expr],
}
}