BadScript 2
Loading...
Searching...
No Matches
BadUsingExpressionCompiler.cs
Go to the documentation of this file.
3
5
9public class BadUsingExpressionCompiler : BadExpressionCompiler<BadUsingExpression>
10{
12 public override void Compile(BadExpressionCompileContext context, BadUsingExpression expression)
13 {
14 context.Emit(BadOpCode.CreateScope, expression.Position, "UsingScope", BadObject.Null);
15 context.Compile(expression.Definition);
16 context.Compile(expression.Expressions);
17 context.Emit(BadOpCode.AddDisposeFinalizer, expression.Position, expression.Name);
18 context.Emit(BadOpCode.DestroyScope, expression.Position);
19 }
20}
BadSourcePosition Position
The source Position of the Expression.
BadExpression Definition
The definition of the object.
IEnumerable< BadExpression > Expressions
Creates a new Using Expression.
readonly string Name
The name of the variable that holds the object.
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
override void Compile(BadExpressionCompileContext context, BadUsingExpression expression)
Contains the Block Expressions for the BadScript2 Language.
Contains the Runtime Objects.
Definition BadArray.cs:10
BadOpCode
Defines the Operations that the BadVirtualMachine can execute.
Definition BadOpCode.cs:7