BadScript 2
Loading...
Searching...
No Matches
BadUsingStatementExpression.cs
Go to the documentation of this file.
4
6
11{
15 public readonly string Name;
16
23 public BadUsingStatementExpression(BadSourcePosition position, string name, BadExpression expression) : base(false, position)
24 {
25 Name = name;
26 Expression = expression;
27 }
28
32 public BadExpression Expression { get; }
33
35 public override IEnumerable<BadExpression> GetDescendants()
36 {
38 }
39
41 protected override IEnumerable<BadObject> InnerExecute(BadExecutionContext context)
42 {
43 //Register finalizer in scope
45 //Run expression
46 return context.Execute(Expression);
47
48 }
49}
Describes a specific position inside a source file.
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.
static void Finalize(BadExecutionContext usingContext, string name, BadSourcePosition position)
The Finalizer method of the Using Expression.
BadUsingStatementExpression(BadSourcePosition position, string name, BadExpression expression)
Creates a new Using Statement Expression.
override IEnumerable< BadObject > InnerExecute(BadExecutionContext context)
readonly string Name
The name of the variable that holds the object.
The Execution Context. Every execution of a script needs a context the script is running in....
IEnumerable< BadObject > Execute(IEnumerable< BadExpression > expressions)
Executes an enumeration of expressions.
BadScope Scope
The Root Scope of the Context.
void AddFinalizer(Action finalizer)
Adds a Finalizer to the Scope.
Definition BadScope.cs:498
Contains Shared Data Structures and Functionality.
Contains the Block Expressions for the BadScript2 Language.
Contains the Runtime Objects.
Definition BadArray.cs:10
Contains the Runtime Implementation.