121 Array.Empty<
string>()
125 new Dictionary<string, BadObjectReference>
146 new Dictionary<string, BadObjectReference>
167 new Dictionary<string, BadObjectReference>
191 private static readonly List<BadClassPrototype>
s_NativeTypes =
new List<BadClassPrototype>
199 CreateNativeType<BadArray>(
"Array",
204 BadAnyPrototype.Instance,
209 CreateNativeType<BadTable>(
"Table",
245 public static IEnumerable<BadClassPrototype> NativeTypes => s_NativeTypes;
279 new BadFunctionParameter(
"instance",
284 BadAnyPrototype.Instance
286 new BadFunctionParameter(
"member",
291 BadMemberInfo.Prototype
307 new BadFunctionParameter(
"eventArgs",
312 MemberChangingEventArgs
328 new BadFunctionParameter(
"eventArgs",
333 MemberChangedEventArgs
348 return string.IsNullOrEmpty(str.Value);
358 if (decimal.TryParse(str.Value, out decimal d))
373 if (
bool.TryParse(str.Value, out
bool d))
501 .CreateGeneric(typeParams)
549 .CreateGeneric(typeParams)
702 return s_NativeTypes.FirstOrDefault(x => x.Name == name) ??
712 if (s_NativeTypes.Any(x => x.Name == native.
Name))
717 s_NativeTypes.Add(native);
734 (_, a) => constructor(a),
750 Dictionary<string, BadObjectReference> staticMembers,
754 (_, a) => constructor(a),
783 Dictionary<string, BadObjectReference> staticMembers,
804 return Create<T>(name, constructor, interfaces);
818 Dictionary<string, BadObjectReference> staticMembers,
822 return Create<T>(name, constructor, staticMembers, interfaces);
Contains Static Data for the BadScript Language.
const string ARRAY_ACCESS_REVERSE_OPERATOR_NAME
const string ARRAY_ACCESS_OPERATOR_NAME
Implements a Function Constraint for an Interface The Constraints specifies how a specific function s...
The Execution Context. Every execution of a script needs a context the script is running in....
BadScope Scope
The Root Scope of the Context.
static BadClassPrototype Prototype
Implements the Scope for the Script Engine.
static BadClassPrototype Prototype
A Class Prototype for the Scope.
Implements the Error Object Type.
static readonly BadClassPrototype Prototype
Gets thrown by the runtime.
static BadRuntimeException Create(BadScope? scope, string message)
Creates a new BadScriptException.
Interop Function taking an array of arguments.
The Base Class for all BadScript Objects.
Implements the base functionality for a BadScript Reference.
static BadObjectReference Make(string refText, Func< BadSourcePosition?, BadObject > getter, Action< BadObject, BadSourcePosition?, BadPropertyInfo?>? setter=null, Action< BadSourcePosition?>? delete=null)
Creates a new Reference Object.
Provides function parameter info.
static BadClassPrototype Prototype
Implements a Native String.
static readonly BadString Empty
static BadClassPrototype Prototype
The Any Prototype, Base type for all types.
static readonly BadAnyPrototype Instance
The Instance of the BadAnyPrototype.
Implements a Class Prototype for the BadScript Language.
static readonly BadClassPrototype Prototype
The Prototype of the ClassPrototype(can not be used)
string Name
The Name of the Type.
Helper Class that Builds a Native Class from a Prototype.
static readonly BadInterfacePrototype Attribute
static readonly BadInterfacePrototype MemberChangedEventArgs
static BadInterfaceConstraint[] ChangedAttributeConstraints(BadObject[] arg)
static readonly BadInterfacePrototype MemberChangingEventArgs
static readonly BadInterfacePrototype ImportHandler
static readonly BadInterfacePrototype ChangeAttribute
static readonly BadInterfacePrototype Disposable
The IDisposible Interface Prototype.
static BadInterfaceConstraint[] MemberChangingEventArgsConstraints(BadObject[] arg)
static BadInterfaceConstraint[] DisposableConstraints(BadObject[] typeParams)
The IDisposible Interface Constraints.
static readonly BadInterfacePrototype Enumerable
The IEnumerable Interface Prototype.
static readonly BadInterfacePrototype MemberChangeEventArgs
static readonly Dictionary< string, BadObjectReference > s_StringStaticMembers
static BadObject ParseBoolean(BadExecutionContext ctx, BadObject[] arg)
static BadInterfaceConstraint[] ChangeAttributeConstraints(BadObject[] arg)
static BadInterfaceConstraint[] InitializeAttributeConstraints(BadObject[] arg)
static BadClassPrototype GetNative(string name)
Returns a Native Class Prototype for the given Native Type.
static readonly BadInterfacePrototype InitializeAttribute
static BadInterfaceConstraint[] EnumerableConstraints(BadObject[] typeParams)
The IEnumerable Interface Constraints.
static readonly BadInterfacePrototype ArrayLike
The IArray Interface Prototype.
static BadInterfaceConstraint[] ImportHandlerConstraints(BadObject[] typeParams)
static readonly Dictionary< string, BadObjectReference > s_BooleanStaticMembers
static BadObject StringIsNullOrEmpty(BadExecutionContext ctx, BadObject[] arg)
static void AddNative(BadClassPrototype native)
Adds a native Type.
static BadInterfaceConstraint[] ArrayConstraints(BadObject[] typeParams)
The IArray Interface Constraints.
static readonly BadInterfacePrototype ChangedAttribute
static BadInterfaceConstraint[] EnumeratorConstraints(BadObject[] typeParams)
The IEnumerator Interface Constraints.
static readonly BadInterfacePrototype Enumerator
The IEnumerator Interface Prototype.
static BadObject ParseNumber(BadExecutionContext ctx, BadObject[] arg)
static BadInterfaceConstraint[] MemberChangeEventArgsConstraints(BadObject[] arg)
static readonly Dictionary< string, BadObjectReference > s_NumberStaticMembers
static readonly List< BadClassPrototype > s_NativeTypes
Collection of all Native Class Prototypes.
Helper Class for Creating Native Class Prototypes.
static Func< BadObject[], BadObject > GetConstructor(string name)
Returns a Constructor for the given Native Type.
Implements a Native Class Prototype.
The Void Prototype, can be assigned to nothing, can not be inherited from, can not be instantiated....
static BadVoidPrototype Instance
The Instance of the BadVoidPrototype.
Implements an Interface Constraint.
Implements a BadScript Interface Prototype.
BadObject CreateGeneric(BadObject[] args)
Resolves the Generic Object to a concrete type.
Implements the Interface for Native Strings.
Contains Shared Data Structures and Functionality.
Contains the Type Expressions for the BadScript2 Language.
Contains the Error Objects for the BadScript2 Language.
Contains the Interop Function Classes for the BadScript2 Language.
Contains Runtime Function Objects.
Contains the Native Runtime Objects.
Contains Runtime Interface Objects.
Contains Runtime Type Objects.