BadScript 2
Loading...
Searching...
No Matches
BadArrayAccessReverseExpressionCompiler.cs
Go to the documentation of this file.
2
4
8public class BadArrayAccessReverseExpressionCompiler : BadExpressionCompiler<BadArrayAccessReverseExpression>
9{
12 {
13 context.Compile(expression.Arguments);
14 context.Compile(expression.Left);
15 if (expression.NullChecked)
16 {
17 context.Emit(BadOpCode.LoadArrayAccessReverseNullChecked, expression.Position, expression.ArgumentCount);
18 }
19 else
20 {
21 context.Emit(BadOpCode.LoadArrayAccessReverse, expression.Position, expression.ArgumentCount);
22 }
23 }
24}
Implements the Reverse Array Access to set or get properties from an object. LEFT[^RIGHT].
bool NullChecked
Indicates if the expression will be null-checked by the runtime.
IEnumerable< BadExpression > Arguments
The Arguments of the Array Access.
BadSourcePosition Position
The source Position of the Expression.
override void Compile(BadExpressionCompileContext context, BadArrayAccessReverseExpression expression)
Contains the Access Expressions for the BadScript2 Language.
BadOpCode
Defines the Operations that the BadVirtualMachine can execute.
Definition BadOpCode.cs:7