The ezr² Project 0.1.1
The codebase for the ezr² programming language.
Loading...
Searching...
No Matches
EzrSquared.Runtime.RuntimeResult Class Reference

The type of the object that is returned as the result of interpretation done by the Interpreter. More...

Public Member Functions

void Reset (Reference? exclude=null)
 Resets the current RuntimeResult.
 
void SetSkipFlag (Reference reference)
 Sets the SkipSet flag, signifying a loop skip.
 
void SetStopFlag (Reference reference)
 Sets the StopSet flag, signifying a loop stop.
 
void SetReturnFlag (Reference reference)
 Sets the ReturnSet flag, signifying a function return.
 
void Success (Reference reference)
 Sets a successful expression execution.
 
void Failure (EzrRuntimeError error)
 Sets a failed expression execution.
 
Reference GetReferenceCopyIfReleasable ()
 Creates a shallow copy of the current Reference if it is eligible for release by the pool.
 

Public Attributes

Reference Reference = Reference.Empty
 The reference to the resulting IEzrObject.
 
EzrRuntimeErrorError
 The error that occured in interpretation, if none occured, this is null.
 
bool SkipSet
 The flag for when a loop skip is called.
 
bool StopSet
 The flag for when a loop stop is called.
 
bool ReturnSet
 The flag for when a return call is called.
 

Properties

bool ShouldReturn [get]
 Should the interpreter return from the current execution?
 
bool ShouldReturnFunction [get]
 Should the interpreter return from the current function execution?
 
bool ShouldReturnLoop [get]
 Should the interpreter return from the current loop execution?
 
bool ShouldReturnTryCatch [get]
 Should the interpreter return from the current try-catch block execution?
 

Private Member Functions

void SetReference (Reference reference)
 Sets Reference.
 

Detailed Description

The type of the object that is returned as the result of interpretation done by the Interpreter.

Member Function Documentation

◆ Failure()

void EzrSquared.Runtime.RuntimeResult.Failure ( EzrRuntimeError error)

Sets a failed expression execution.

Parameters
errorThe error that caused the failure.

◆ GetReferenceCopyIfReleasable()

Reference EzrSquared.Runtime.RuntimeResult.GetReferenceCopyIfReleasable ( )

Creates a shallow copy of the current Reference if it is eligible for release by the pool.

Returns
The copy of the reference, or the reference itself if not eligible for release.

◆ Reset()

void EzrSquared.Runtime.RuntimeResult.Reset ( Reference? exclude = null)

Resets the current RuntimeResult.

This:

Parameters
excludeReference to exclude from release.

◆ SetReference()

void EzrSquared.Runtime.RuntimeResult.SetReference ( Reference reference)
private

Sets Reference.

Parameters
referenceThe new value for Reference.

◆ SetReturnFlag()

void EzrSquared.Runtime.RuntimeResult.SetReturnFlag ( Reference reference)

Sets the ReturnSet flag, signifying a function return.

Parameters
referenceThe reference to the object returned by the function.

◆ SetSkipFlag()

void EzrSquared.Runtime.RuntimeResult.SetSkipFlag ( Reference reference)

Sets the SkipSet flag, signifying a loop skip.

Parameters
referenceThe reference to return when the skip flag is used outside a loop.

◆ SetStopFlag()

void EzrSquared.Runtime.RuntimeResult.SetStopFlag ( Reference reference)

Sets the StopSet flag, signifying a loop stop.

Parameters
referenceThe reference to return when the stop flag is used outside a loop.

◆ Success()

void EzrSquared.Runtime.RuntimeResult.Success ( Reference reference)

Sets a successful expression execution.

Parameters
referenceThe reference to the resulting IEzrObject.

Property Documentation

◆ ShouldReturn

bool EzrSquared.Runtime.RuntimeResult.ShouldReturn
get

Should the interpreter return from the current execution?

This is true when either of the below conditions are met:

◆ ShouldReturnFunction

bool EzrSquared.Runtime.RuntimeResult.ShouldReturnFunction
get

Should the interpreter return from the current function execution?

This is true when either of the below conditions are met:

◆ ShouldReturnLoop

bool EzrSquared.Runtime.RuntimeResult.ShouldReturnLoop
get

Should the interpreter return from the current loop execution?

This is true when either of the below conditions are met:

◆ ShouldReturnTryCatch

bool EzrSquared.Runtime.RuntimeResult.ShouldReturnTryCatch
get

Should the interpreter return from the current try-catch block execution?

This is true when either of the below conditions are met:


The documentation for this class was generated from the following file: