Class RuntimeResult
- Namespace
- EzrSquared.Runtime
- Assembly
- ezrSquared-lib.dll
The type of the object that is returned as the result of interpretation done by the Interpreter.
public class RuntimeResult
- Inheritance
-
objectRuntimeResult
Constructors
RuntimeResult()
Creates a new RuntimeResult.
internal RuntimeResult()
Fields
Error
The error that occured in interpretation, if none occured, this is null.
public IEzrRuntimeError? Error
Field Value
Reference
The reference to the resulting IEzrObject.
public Reference Reference
Field Value
ReturnSet
The flag for when a return call is called.
public bool ReturnSet
Field Value
- bool
SkipSet
The flag for when a loop skip is called.
public bool SkipSet
Field Value
- bool
StopSet
The flag for when a loop stop is called.
public bool StopSet
Field Value
- bool
Properties
ShouldReturn
Should the interpreter return from the current execution?
public bool ShouldReturn { get; }
Property Value
- bool
Remarks
This is true when either of the below conditions are met:
ShouldReturnFunction
Should the interpreter return from the current function execution?
public bool ShouldReturnFunction { get; }
Property Value
- bool
Remarks
ShouldReturnLoop
Should the interpreter return from the current loop execution?
public bool ShouldReturnLoop { get; }
Property Value
- bool
Remarks
ShouldReturnTryCatch
Should the interpreter return from the current try-catch block execution?
public bool ShouldReturnTryCatch { get; }
Property Value
- bool
Remarks
This is true when either of the below conditions are met:
Methods
Failure(IEzrRuntimeError)
Sets a failed expression execution.
public void Failure(IEzrRuntimeError error)
Parameters
error
IEzrRuntimeErrorThe error that caused the failure.
GetReferenceCopyIfReleasable()
Creates a shallow copy of the current Reference if it is eligible for release by the pool.
public Reference GetReferenceCopyIfReleasable()
Returns
- Reference
The copy of the reference, or the reference itself if not eligible for release.
Reset(Reference?)
Resets the current RuntimeResult.
public void Reset(Reference? exclude = null)
Parameters
exclude
ReferenceReference to exclude from release.
Remarks
This:
SetReference(Reference)
Sets Reference.
private void SetReference(Reference reference)
Parameters
SetReturnFlag(Reference)
Sets the ReturnSet flag, signifying a function return.
public void SetReturnFlag(Reference reference)
Parameters
reference
ReferenceThe reference to the object returned by the function.
SetSkipFlag(Reference)
Sets the SkipSet flag, signifying a loop skip.
public void SetSkipFlag(Reference reference)
Parameters
reference
ReferenceThe reference to return when the skip flag is used outside a loop.
SetStopFlag(Reference)
Sets the StopSet flag, signifying a loop stop.
public void SetStopFlag(Reference reference)
Parameters
reference
ReferenceThe reference to return when the stop flag is used outside a loop.
Success(Reference)
Sets a successful expression execution.
public void Success(Reference reference)
Parameters
reference
ReferenceThe reference to the resulting IEzrObject.