BadScript 2
Loading...
Searching...
No Matches
BadBreakExpression.cs
Go to the documentation of this file.
1
using
BadScript2.Common
;
2
using
BadScript2.Runtime
;
3
using
BadScript2.Runtime.Objects
;
4
8
namespace
BadScript2.Parser.Expressions.ControlFlow
;
9
13
public
class
BadBreakExpression
:
BadExpression
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
}
BadScript2.Common.BadSourcePosition
Describes a specific position inside a source file.
Definition
BadSourcePosition.cs:9
BadScript2.Parser.Expressions.BadExpression
Base Implementation for all Expressions used inside the Script.
Definition
BadExpression.cs:23
BadScript2.Parser.Expressions.ControlFlow.BadBreakExpression
Implements the Break Expression that is used to prematurely exit a loop.
Definition
BadBreakExpression.cs:14
BadScript2.Parser.Expressions.ControlFlow.BadBreakExpression.BadBreakExpression
BadBreakExpression(BadSourcePosition position)
Constructor of the Break Expression.
Definition
BadBreakExpression.cs:19
BadScript2.Parser.Expressions.ControlFlow.BadBreakExpression.InnerExecute
override IEnumerable< BadObject > InnerExecute(BadExecutionContext context)
Definition
BadBreakExpression.cs:22
BadScript2.Parser.Expressions.ControlFlow.BadBreakExpression.GetDescendants
override IEnumerable< BadExpression > GetDescendants()
Definition
BadBreakExpression.cs:30
BadScript2.Runtime.BadExecutionContext
The Execution Context. Every execution of a script needs a context the script is running in....
Definition
BadExecutionContext.cs:16
BadScript2.Runtime.BadExecutionContext.Scope
BadScope Scope
The Root Scope of the Context.
Definition
BadExecutionContext.cs:29
BadScript2.Runtime.BadScope.SetBreak
void SetBreak()
Sets the break keyword inside this scope.
Definition
BadScope.cs:679
BadScript2.Runtime.Objects.BadObject
The Base Class for all BadScript Objects.
Definition
BadObject.cs:14
BadScript2.Runtime.Objects.BadObject.Null
static readonly BadObject Null
The Null Value for the BadScript Language.
Definition
BadObject.cs:28
BadScript2.Common
Contains Shared Data Structures and Functionality.
Definition
BadParseException.cs:1
BadScript2.Parser.Expressions.ControlFlow
Contains the Controlflow Expressions for the BadScript2 Language.
Definition
BadBreakExpression.cs:8
BadScript2.Runtime.Objects
Contains the Runtime Objects.
Definition
BadArray.cs:10
BadScript2.Runtime
Contains the Runtime Implementation.
Definition
BadExecutionContext.cs:8
src
BadScript2
Parser
Expressions
ControlFlow
BadBreakExpression.cs
Generated by
1.9.8