33 List<BadExpression> genericArguments,
34 bool nullChecked =
false) : base(
81 left = left.Dereference();
93 ret = ret.Dereference();
98 $
"Object {ret} does not support generic arguments",
110 genParams[i] = genParams[i].Dereference();
113 yield
return genType.CreateGeneric(genParams);
124 return $
"({Left}{(NullChecked ? "?
" : "")}.{Right})";
Describes a specific position inside a source file.
Implements a simple constant folding optimization.
static BadExpression Optimize(BadExpression expr)
Optimizes the given expression.
Implements the Member Access to set or get properties from an object. LEFT.RIGHT.
IReadOnlyList< BadExpression > GenericArguments
override string ToString()
override IEnumerable< BadObject > InnerExecute(BadExecutionContext context)
override void Optimize()
Uses the Constant Folding Optimizer to optimize the expression.
bool NullChecked
Property that indicates if the result of the left side of the expression should be null-checked.
override IEnumerable< BadExpression > GetDescendants()
BadWordToken Right
Right Side of the expression.
BadExpression Left
Left side of the expression.
BadMemberAccessExpression(BadExpression left, BadWordToken right, BadSourcePosition position, List< BadExpression > genericArguments, bool nullChecked=false)
Constructor for the Member Access Expression.
Base Implementation for all Expressions used inside the Script.
IEnumerable< BadExpression > GetDescendantsAndSelf()
Returns all Descendants of the Expression and the Expression itself.
BadSourcePosition Position
The source Position of the Expression.
IEnumerable< BadObject > Execute(BadExecutionContext context)
Evaluates the Expression within the current Execution Context.
string Text
The Text Representation of the Token.
The Execution Context. Every execution of a script needs a context the script is running in....
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.
static readonly BadObject Null
The Null Value for the BadScript Language.
Defines the interface for BadScript Access Expressions.
Represents a Generic Object.
Contains Shared Data Structures and Functionality.
Contains the BadScript2 Constant Folding Optimizations.
Contains the Access Expressions for the BadScript2 Language.
Contains the Reader Tokens for the BadScript2 Language.
Contains the Error Objects for the BadScript2 Language.
Contains Runtime Interface Objects.
Contains Runtime Type Objects.
Contains the Runtime Objects.
Contains the Runtime Implementation.