eyg/interpreter/block
Values
pub fn call(
f: value.Value(
t,
#(List(#(state.Kontinue(t), t)), state.Env(t)),
),
args: List(
#(
value.Value(
t,
#(List(#(state.Kontinue(t), t)), state.Env(t)),
),
t,
),
),
env: state.Env(t),
) -> Result(
#(
option.Option(
value.Value(
t,
#(List(#(state.Kontinue(t), t)), state.Env(t)),
),
),
List(
#(
String,
value.Value(
t,
#(List(#(state.Kontinue(t), t)), state.Env(t)),
),
),
),
),
#(
break.Reason(
t,
#(List(#(state.Kontinue(t), t)), state.Env(t)),
),
t,
state.Env(t),
state.Stack(t),
),
)
Call an evaluated function with arguments
pub fn execute(
exp: #(tree.Expression(t), t),
scope: List(
#(
String,
value.Value(
t,
#(List(#(state.Kontinue(t), t)), state.Env(t)),
),
),
),
) -> Result(
#(
option.Option(
value.Value(
t,
#(List(#(state.Kontinue(t), t)), state.Env(t)),
),
),
List(
#(
String,
value.Value(
t,
#(List(#(state.Kontinue(t), t)), state.Env(t)),
),
),
),
),
#(
break.Reason(
t,
#(List(#(state.Kontinue(t), t)), state.Env(t)),
),
t,
state.Env(t),
state.Stack(t),
),
)
Execute a block of code. If there is no final expression no value is returned.
On success the block’s scope is returned for use in REPLs.
pub fn resume(
value: value.Value(
t,
#(List(#(state.Kontinue(t), t)), state.Env(t)),
),
env: state.Env(t),
k: state.Stack(t),
) -> Result(
#(
option.Option(
value.Value(
t,
#(List(#(state.Kontinue(t), t)), state.Env(t)),
),
),
List(
#(
String,
value.Value(
t,
#(List(#(state.Kontinue(t), t)), state.Env(t)),
),
),
),
),
#(
break.Reason(
t,
#(List(#(state.Kontinue(t), t)), state.Env(t)),
),
t,
state.Env(t),
state.Stack(t),
),
)
Resume the interpretation loop with a value from a previous break position. This can be used to resume after any break but is normally used to implement effects and reference lookup