BadScript 2
Loading...
Searching...
No Matches
BadBreakExpression.cs
Go to the documentation of this file.
4
9
14{
19 public BadBreakExpression(BadSourcePosition position) : base(false, position) { }
20
22 protected override IEnumerable<BadObject> InnerExecute(BadExecutionContext context)
23 {
24 context.Scope.SetBreak();
25
26 yield return BadObject.Null;
27 }
28
30 public override IEnumerable<BadExpression> GetDescendants()
31 {
32 yield break;
33 }
34}
Describes a specific position inside a source file.
Base Implementation for all Expressions used inside the Script.
Implements the Break Expression that is used to prematurely exit a loop.
BadBreakExpression(BadSourcePosition position)
Constructor of the Break Expression.
override IEnumerable< BadObject > InnerExecute(BadExecutionContext context)
The Execution Context. Every execution of a script needs a context the script is running in....
BadScope Scope
The Root Scope of the Context.
void SetBreak()
Sets the break keyword inside this scope.
Definition BadScope.cs:679
The Base Class for all BadScript Objects.
Definition BadObject.cs:14
static readonly BadObject Null
The Null Value for the BadScript Language.
Definition BadObject.cs:28
Contains Shared Data Structures and Functionality.
Contains the Controlflow Expressions for the BadScript2 Language.
Contains the Runtime Objects.
Definition BadArray.cs:10
Contains the Runtime Implementation.