Table of Contents

Interface IEzrObject

Namespace
EzrSquared.Runtime.Types
Assembly
ezrSquared-lib.dll

An object in the ezrĀ² language.

public interface IEzrObject

Properties

Context

The Context of the object.

Context Context { get; }

Property Value

Context

CreationContext

The context under which the object was created.

Context CreationContext { get; }

Property Value

Context

EndPosition

The ending position of the object in source code.

Position EndPosition { get; }

Property Value

Position

HashTag

The hash of Tag.

int HashTag { get; }

Property Value

int

StartPosition

The starting position of the object in source code.

Position StartPosition { get; }

Property Value

Position

Tag

The tag of the type of this object, similar to C# namespace naming conventions.

string Tag { get; }

Property Value

string

TypeName

The name of the type of this object, in plain text, all lowercase. Spaces are allowed.

string TypeName { get; }

Property Value

string

Methods

Addition(IEzrObject, RuntimeResult)

Performs the addition operation between the current object and another.

void Addition(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

Affirmation(RuntimeResult)

Affirms the current object.

void Affirmation(RuntimeResult result)

Parameters

result RuntimeResult

Runtime result for carrying the result and any errors.

BitwiseAnd(IEzrObject, RuntimeResult)

Performs the bit-wise AND operation between the current object and another.

void BitwiseAnd(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

BitwiseLeftShift(IEzrObject, RuntimeResult)

Performs the bit-wise left-shift operation between the current object and another.

void BitwiseLeftShift(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

BitwiseNegation(RuntimeResult)

Bit-wise negates the current object.

void BitwiseNegation(RuntimeResult result)

Parameters

result RuntimeResult

Runtime result for carrying the result and any errors.

BitwiseOr(IEzrObject, RuntimeResult)

Performs the bit-wise OR operation between the current object and another.

void BitwiseOr(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

BitwiseRightShift(IEzrObject, RuntimeResult)

Performs the bit-wise right-shift operation between the current object and another.

void BitwiseRightShift(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

BitwiseXOr(IEzrObject, RuntimeResult)

Performs the bit-wise X-OR operation between the current object and another.

void BitwiseXOr(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

ComparisonEqual(IEzrObject, RuntimeResult)

Compares the object to another, checks equality.

void ComparisonEqual(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

ComparisonGreaterThan(IEzrObject, RuntimeResult)

Compares the object to another, checks if the current object is greater than the other.

void ComparisonGreaterThan(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

ComparisonGreaterThanOrEqual(IEzrObject, RuntimeResult)

Compares the object to another, checks if the current object is greater than or equal to the other.

void ComparisonGreaterThanOrEqual(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

ComparisonLessThan(IEzrObject, RuntimeResult)

Compares the object to another, checks if the current object is less than the other.

void ComparisonLessThan(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

ComparisonLessThanOrEqual(IEzrObject, RuntimeResult)

Compares the object to another, checks if the current object is less than or equal to the other.

void ComparisonLessThanOrEqual(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

ComparisonNotEqual(IEzrObject, RuntimeResult)

Compares the object to another, checks unequality.

void ComparisonNotEqual(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

ComputeHashCode(RuntimeResult)

Evaluates the current object as its hash.

int ComputeHashCode(RuntimeResult result)

Parameters

result RuntimeResult

Runtime result for carrying any errors.

Returns

int

The evaluated value.

Division(IEzrObject, RuntimeResult)

Performs the division operation between the current object and another.

void Division(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

EvaluateBoolean(RuntimeResult)

Evaluates the current object as a boolean value.

bool EvaluateBoolean(RuntimeResult result)

Parameters

result RuntimeResult

Runtime result for carrying any errors.

Returns

bool

The evaluated value.

Execute(Reference[], Interpreter, RuntimeResult)

Executes the current object, like a function.

void Execute(Reference[] arguments, Interpreter interpreter, RuntimeResult result)

Parameters

arguments Reference[]

The arguments of the execution.

interpreter Interpreter

The interpreter to be used in execution.

result RuntimeResult

Runtime result for carrying the result and any errors.

HasValueContained(IEzrObject, RuntimeResult)

Checks if the other object is contained in the current object.

void HasValueContained(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

Interpret(Node, Context, Interpreter, RuntimeResult, bool)

Interprets an AST node in context of the current object.

void Interpret(Node code, Context callingContext, Interpreter interpreter, RuntimeResult result, bool ignoreUndefinedVariable = false)

Parameters

code Node

The node to interpret.

callingContext Context

The context calling on this action.

interpreter Interpreter

The interpreter to use.

result RuntimeResult

Runtime result for carrying the result and any errors.

ignoreUndefinedVariable bool

Should the interpretation ignore undefined variables? Useful in getting empty variable references.

Inversion(RuntimeResult)

Inverts the current object, like, for example, true to false.

void Inversion(RuntimeResult result)

Parameters

result RuntimeResult

Runtime result for carrying the result and any errors.

Modulo(IEzrObject, RuntimeResult)

Performs the modulo operation between the current object and another.

void Modulo(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

Multiplication(IEzrObject, RuntimeResult)

Performs the multiplication operation between the current object and another.

void Multiplication(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

Negation(RuntimeResult)

Negates the current object.

void Negation(RuntimeResult result)

Parameters

result RuntimeResult

Runtime result for carrying the result and any errors.

NotHasValueContained(IEzrObject, RuntimeResult)

Checks if the other object is NOT contained in the current object.

void NotHasValueContained(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

Power(IEzrObject, RuntimeResult)

Performs the power or exponent operation between the current object and another.

void Power(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

StrictEquals(IEzrObject, RuntimeResult)

Strictly compares the current object to another, taking into account inheritance.

bool StrictEquals(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying any errors.

Returns

bool

Subtraction(IEzrObject, RuntimeResult)

Performs the subtraction operation between the current object and another.

void Subtraction(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

ToPureString(RuntimeResult)

Evaluates the current object as a string value.

string ToPureString(RuntimeResult result)

Parameters

result RuntimeResult

Runtime result for carrying any errors.

Returns

string

The evaluated value.

Remarks

This is used to show the 'real' string representation of the object. Like, for example, ToString(RuntimeResult) will
return "example" when called on an EzrString object with value "example", but this function will return example (without quotes).

ToString(RuntimeResult)

Evaluates the current object as a string value.

string ToString(RuntimeResult result)

Parameters

result RuntimeResult

Runtime result for carrying any errors.

Returns

string

The evaluated value.

Update(Context, Position, Position)

Updates the context and position of the object.

void Update(Context context, Position startPosition, Position endPosition)

Parameters

context Context

The new context of the object.

startPosition Position

The new starting position of the object.

endPosition Position

The new ending position of the object.

UpdateCreationContext(Context)

Changes CreationContext and the parent of Context. Be careful when you use this function.

void UpdateCreationContext(Context newCreationContext)

Parameters

newCreationContext Context

The new creation context.