Class EzrClass
- Namespace
 - EzrSquared.Runtime.Types.Executables
 
- Assembly
 - ezrSquared-lib.dll
 
The "type" type object? You know.
public class EzrClass : EzrRuntimeExecutable, IEzrMutableObject, IMutable<IEzrMutableObject>, IEzrObject
  - Inheritance
 - 
      objectEzrClass
 
- Implements
 
- Inherited Members
 
Constructors
EzrClass(string?, Node, EzrClass[], bool, bool, Interpreter, RuntimeResult, Context, Position, Position)
Creates a new class.
public EzrClass(string? name, Node body, EzrClass[] parents, bool isReadOnly, bool isStatic, Interpreter interpreter, RuntimeResult result, Context parentContext, Position startPosition, Position endPosition)
  Parameters
namestringThe name of the executable.
bodyNodeThe source code body of the executable.
parentsEzrClass[]The parents of the class.
isReadOnlyboolIs this a read-only class?
isStaticboolIs this a static class?
interpreterInterpreterInterpreter for executing the static body of the class.
resultRuntimeResultRuntime result for carrying errors.
parentContextContextThe parent context.
startPositionPositionThe starting position of the object.
endPositionPositionThe ending position of the object.
EzrClass(string?, Node, (string Name, Node Node)[], (Position StartPosition, Position EndPosition, string Name)?, (Position StartPosition, Position EndPosition, string Name)?, EzrClass[], Reference[], bool, bool, Context, Context, Position, Position)
Creates a new class from the innards of an existing one.
public EzrClass(string? name, Node body, (string Name, Node Node)[] parameters, (Position StartPosition, Position EndPosition, string Name)? extraKeywordArguments, (Position StartPosition, Position EndPosition, string Name)? extraPositionalArguments, EzrClass[] parents, Reference[] staticParentReferences, bool isReadOnly, bool isStatic, Context staticContext, Context parentContext, Position startPosition, Position endPosition)
  Parameters
namestringThe name of the executable.
bodyNodeThe source code body of the executable.
parameters(string Name, Node Node)[]The source code of the class's parameters and their default values.
extraKeywordArguments(Position StartPosition, Position EndPosition, string Name)?The position in source code and name of the variable for the class's extra keyword arguments.
extraPositionalArguments(Position StartPosition, Position EndPosition, string Name)?The position in source code and name of the variable for the class's extra positional arguments.
parentsEzrClass[]The parents of the class.
staticParentReferencesReference[]The references to the class's static parents.
isReadOnlyboolIs this a read-only class?
isStaticboolIs this a static class?
staticContextContextThe internal static context.
parentContextContextThe parent context.
startPositionPositionThe starting position of the object.
endPositionPositionThe ending position of the object.
Fields
IsStatic
Is the class static?
public readonly bool IsStatic
  Field Value
- bool
 
Parents
The parents of the class.
public readonly EzrClass[] Parents
  Field Value
- EzrClass[]
 
StaticParentReferences
The references to the class's static parents.
public readonly Reference[] StaticParentReferences
  Field Value
Properties
Tag
The tag of the type of this object, similar to C# namespace naming conventions.
public override string Tag { get; protected internal set; }
  Property Value
- string
 
TypeName
The name of the type of this object, in plain text, all lowercase. Spaces are allowed.
public override string TypeName { get; protected internal set; }
  Property Value
- string
 
Methods
AddParents(Reference[], Context, Interpreter, RuntimeResult)
private Reference[] AddParents(Reference[] arguments, Context context, Interpreter interpreter, RuntimeResult result)
  Parameters
argumentsReference[]contextContextinterpreterInterpreterresultRuntimeResult
Returns
Remarks
Important
BUG: The name given to the parents is problematic, as two parents could have the same executable name.
AddStaticParents(RuntimeResult)
private void AddStaticParents(RuntimeResult result)
  Parameters
resultRuntimeResult
Remarks
Important
BUG: The name given to the parents is problematic, as two parents could have the same executable name.
DeepCopy(RuntimeResult)
Creates a deep copy of the IMutable<T>.
public IMutable<IEzrMutableObject>? DeepCopy(RuntimeResult result)
  Parameters
resultRuntimeResultRuntime result for raising errors./
Returns
- IMutable<IEzrMutableObject>
 The copy, or, null if failed.
Remarks
The deep copy here means that all IMutable<T> properties and fields in the object are also copied.
Execute(Reference[], Interpreter, RuntimeResult)
Creates a new instance of the class.
public override void Execute(Reference[] arguments, Interpreter interpreter, RuntimeResult result)
  Parameters
argumentsReference[]The arguments of the execution.
interpreterInterpreterThe interpreter to be used in execution.
resultRuntimeResultRuntime result for carrying the result and any errors.
Execute(Reference[], Interpreter, RuntimeResult, bool)
Creates a new instance of the class.
private void Execute(Reference[] arguments, Interpreter interpreter, RuntimeResult result, bool ignoreExtraArguments)
  Parameters
argumentsReference[]The arguments of the execution.
interpreterInterpreterThe interpreter to be used in execution.
resultRuntimeResultRuntime result for carrying the result and any errors.
ignoreExtraArgumentsboolShould the arguments checker ignore extra parameters?