76 (_, i, o) =>
Insert(a, i, o),
90 a.
InnerArray.InsertRange((
int)num, arr.InnerArray);
96 a.
InnerArray.InsertRange((
int)num, enumerated);
155 (_, i, v) =>
Set(a, i, v),
213 enumerator = enumerator.Dereference();
231 context.Scope.CreateChild(
253 result.InnerArray.Add(
Get(array, n.Value));
265 "Enumerator MoveNext did not return a boolean",
352 int index = (int)obj;
366 int index = (int)obj;
380 int index = (int)obj;
Describes a specific position inside a source file.
static BadSourcePosition FromSource(string source, int index, int length)
Creates a new Source Position.
Contains Static Data for the BadScript Language.
const string ARRAY_ACCESS_REVERSE_OPERATOR_NAME
const string ARRAY_ACCESS_OPERATOR_NAME
Implements Array Extensions.
static BadObject ArrayAccess(BadExecutionContext context, BadArray array, BadObject enumerator)
static BadObject Get(BadArray arg, decimal obj)
Returns a value from the array.
static BadObject Remove(BadArray arg, BadObject obj)
Removes an element from the array.
static BadObject Add(BadArray arg, BadObject obj)
Adds an element to the array.
static BadObject Set(BadArray arg, decimal obj, BadObject value)
Sets a value in the array.
override void AddExtensions(BadInteropExtensionProvider provider)
static BadObject RemoveAt(BadArray arg, decimal obj)
Removes an element at the given index.
static BadObject Contains(BadArray arg, BadObject obj)
Returns True if the array contains the given element.
static BadObject GetEnumerator(BadArray array)
Returns an enumerator of the array.
static BadObject Clear(BadArray arg)
Clears the array.
static BadObject Insert(BadArray arg, decimal index, BadObject obj)
Inserts an element at the given index.
Implements the For Each Expression.
static BadFunction BadFunction getCurrent FindEnumerator(BadObject target, BadExecutionContext context, BadSourcePosition position)
The Execution Context. Every execution of a script needs a context the script is running in....
BadScope Scope
The Root Scope of the Context.
Gets thrown by the runtime.
static BadRuntimeException Create(BadScope? scope, string message)
Creates a new BadScriptException.
Implements a simple wrapper for C# IEnumerators to be used in BS2.
Public Extension API for the BS2 Runtime.
void RegisterObject(Type t, string propName, BadObject obj)
Registers the specified extension for the specified type.
Non Generic Interop Function.
Implements a Dynamic List/Array for the BadScript Language.
List< BadObject > InnerArray
The Inner Array.
The Base Class for all BadScript Objects.
virtual BadObjectReference GetProperty(string propName, BadScope? caller=null)
Returns a Reference to the Property with the given Name.
virtual bool HasProperty(string propName, BadScope? caller=null)
Returns true if the object contains a given property or there exists an extension for the current Ins...
static readonly BadObject Null
The Null Value for the BadScript Language.
Implements the base functionality for a BadScript Reference.
static BadObjectReference Make(string refText, Func< BadObject > getter, Action< BadObject, BadPropertyInfo?>? setter=null, Action? delete=null)
Creates a new Reference Object.
Implements a function that can be called from the script.
The Any Prototype, Base type for all types.
static readonly BadAnyPrototype Instance
The Instance of the BadAnyPrototype.
Helper Class that Builds a Native Class from a Prototype.
static readonly BadInterfacePrototype Enumerable
The IEnumerable Interface Prototype.
static BadClassPrototype GetNative(string name)
Returns a Native Class Prototype for the given Native Type.
static readonly BadInterfacePrototype Enumerator
The IEnumerator Interface Prototype.
Helper Class for Creating Native Class Prototypes.
static IEnumerable< BadObject > ExecuteEnumerate(BadExecutionContext ctx, BadObject enumerable)
Executes the Enumerable.
Implements the Interface for Native Boolean.
new bool Value
The Boolean Value.
Implements the Interface for Native Numbers.
Contains Shared Data Structures and Functionality.
Contains Common Interop Extensions for the BadScript2 Runtime.
Contains the Loop Expressions for the BadScript2 Language.
Contains the Error Objects for the BadScript2 Language.
Contains the Interop Function Classes for the BadScript2 Language.
Contains the Interop Abstractions and Implementations for the BadScript2 Language.
Contains Runtime Function Objects.
Contains the Native Runtime Objects.
Contains Runtime Type Objects.
Contains the Runtime Objects.
Contains the Runtime Implementation.
BadScopeFlags
Defines Different Behaviours for the Current Scope.