49 return BadObject.Wrap(lStr.Value + rNative.Value);
51 return BadObject.Wrap(lStr.Value + right);
53 return BadObject.Wrap(lNum.Value + rStr.Value);
55 return BadObject.Wrap(lNum.Value + rNum.Value);
62 return BadObject.Wrap(lBool.Value + rStr.Value);
113 yield
return Add(left, right, position);
129 left = left.Dereference();
139 right = right.Dereference();
Describes a specific position inside a source file.
Contains Static Data for the BadScript Language.
const string ADD_OPERATOR_NAME
Base Implementation for all Expressions used inside the Script.
static IEnumerable< BadObject > ExecuteOperatorOverride(BadObject left, BadObject right, BadExecutionContext context, string name, BadSourcePosition position)
Helper function that executes an operator override function if implemented.
BadSourcePosition Position
The source Position of the Expression.
IEnumerable< BadObject > Execute(BadExecutionContext context)
Evaluates the Expression within the current Execution Context.
Base Implementation of all Binary Expressions.
BadExpression Right
Right side of the Expression.
BadExpression Left
Left side of the Expression.
Implements the Add Expression.
BadAddExpression(BadExpression left, BadExpression right, BadSourcePosition position)
Constructor of the Add Expression.
static BadObject Add(BadObject left, BadObject right, BadSourcePosition pos)
Adds left and right together.
override IEnumerable< BadObject > InnerExecute(BadExecutionContext context)
static IEnumerable< BadObject > AddWithOverride(BadExecutionContext? context, BadObject leftRef, BadObject right, BadSourcePosition position)
Executes the Operator with operator overrides.
override string GetSymbol()
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.
The Base Class for all BadScript Objects.
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 Interface for Native Boolean.
Defines properties for Native Types.
Implements the Interface for Native Numbers.
Implements the Interface for Native Strings.
Contains Shared Data Structures and Functionality.
Contains the Math Expressions for the BadScript2 Language.
Contains the Error Objects for the BadScript2 Language.
Contains the Native Runtime Objects.
Contains the Runtime Objects.
Contains the Runtime Implementation.