Interpreter - Scope change for a few functions
This commit is contained in:
parent
a65bb4aa73
commit
f02d15fa83
1 changed files with 2 additions and 2 deletions
|
@ -35,7 +35,7 @@ pub enum InterpreterFlowControl {
|
||||||
impl InterpreterFlowControl {
|
impl InterpreterFlowControl {
|
||||||
/// Return the result's value. If the flow control value does not represent
|
/// Return the result's value. If the flow control value does not represent
|
||||||
/// a result, panic.
|
/// a result, panic.
|
||||||
fn result(self) -> Value {
|
pub(crate) fn result(self) -> Value {
|
||||||
match self {
|
match self {
|
||||||
Self::Result(v) => v,
|
Self::Result(v) => v,
|
||||||
other => panic!("Result expected, {:?} found instead", other),
|
other => panic!("Result expected, {:?} found instead", other),
|
||||||
|
@ -44,7 +44,7 @@ impl InterpreterFlowControl {
|
||||||
|
|
||||||
/// Check whether a flow control value contains actual flow control
|
/// Check whether a flow control value contains actual flow control
|
||||||
/// information.
|
/// information.
|
||||||
fn is_flow_control(&self) -> bool {
|
pub(crate) fn is_flow_control(&self) -> bool {
|
||||||
matches!(self, Self::Break(_) | Self::Continue(_))
|
matches!(self, Self::Break(_) | Self::Continue(_))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue