23 public readonly
string Name;
66 return m_Expressions.SelectMany(expr => expr.GetDescendantsAndSelf());
Describes a specific position inside a source file.
Implements a simple constant folding optimization.
static BadExpression Optimize(BadExpression expr)
Optimizes the given expression.
Base Implementation for all Expressions used inside the Script.
BadSourcePosition Position
The source Position of the Expression.
Implements the Using Block Expression.
BadUsingExpression(string name, BadExpression[] expressions, BadSourcePosition position, BadExpression definition)
Creates a new Using Expression.
BadExpression Definition
The definition of the object.
IEnumerable< BadExpression > Expressions
Creates a new Using Expression.
override IEnumerable< BadExpression > GetDescendants()
override void Optimize()
Uses the Constant Folding Optimizer to optimize the expression.
static void Finalize(BadExecutionContext usingContext, string name, BadSourcePosition position)
The Finalizer method of the Using Expression.
override IEnumerable< BadObject > InnerExecute(BadExecutionContext context)
readonly string Name
The name of the variable that holds the object.
BadExpression m_Definition
The definition of the object.
readonly BadExpression[] m_Expressions
The Expressions inside the Using Block.
Implements the Invocation Expression.
static IEnumerable< BadObject > Invoke(BadObject left, IEnumerable< BadObject > args, BadSourcePosition position, BadExecutionContext context)
Invokes a function.
The Execution Context. Every execution of a script needs a context the script is running in....
BadScope Scope
The Root Scope of the Context.
BadScope CreateChild(string name, BadScope? caller, bool? useVisibility, BadScopeFlags flags=BadScopeFlags.RootScope)
Creates a subscope of the current scope.
BadObjectReference GetVariable(string name, BadScope caller)
Returns the variable reference of the specified variable.
Gets thrown by the runtime.
static BadRuntimeException Create(BadScope? scope, string message)
Creates a new BadScriptException.
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.
Contains Shared Data Structures and Functionality.
Contains the BadScript2 Constant Folding Optimizations.
Contains the Block Expressions for the BadScript2 Language.
Contains the Function Expressions for the BadScript2 Language.
Contains the Error Objects for the BadScript2 Language.
Contains the Runtime Objects.
Contains the Runtime Implementation.