C# Class Jurassic.Compiler.AssignmentExpression

Represents an assignment expression (++, --, =, +=, -=, *=, /=, %=, &=, |=, ^=, <<=, >>=, >>>=).
Inheritance: Jurassic.Compiler.OperatorExpression
Show file Open project: paulbartrum/jurassic

Public Methods

Method Description
AssignmentExpression ( Jurassic.Compiler.Operator @operator ) : System

Creates a new instance of AssignmentExpression.

AssignmentExpression ( Scope scope, string name, Jurassic.Compiler.Expression value ) : System

Creates a simple variable assignment expression.

GenerateCode ( ILGenerator generator, OptimizationInfo optimizationInfo ) : void

Generates CIL for the expression.

Private Methods

Method Description
GenerateAssignment ( ILGenerator generator, OptimizationInfo optimizationInfo, IReferenceExpression target ) : void

Generates CIL for an assignment expression.

GenerateCompoundAddAssignment ( ILGenerator generator, OptimizationInfo optimizationInfo, IReferenceExpression target ) : void

Generates CIL for a compound assignment expression.

GenerateCompoundAssignment ( ILGenerator generator, OptimizationInfo optimizationInfo, IReferenceExpression target ) : void

Generates CIL for a compound assignment expression.

GenerateIncrementOrDecrement ( ILGenerator generator, OptimizationInfo optimizationInfo, IReferenceExpression target, bool postfix, bool increment ) : void

Generates CIL for an increment or decrement expression.

GetCompoundBaseOperator ( OperatorType compoundOperatorType ) : Jurassic.Compiler.Operator

Gets the underlying base operator for the given compound operator.

Method Details

AssignmentExpression() public method

Creates a new instance of AssignmentExpression.
public AssignmentExpression ( Jurassic.Compiler.Operator @operator ) : System
@operator Jurassic.Compiler.Operator
return System

AssignmentExpression() public method

Creates a simple variable assignment expression.
public AssignmentExpression ( Scope scope, string name, Jurassic.Compiler.Expression value ) : System
scope Scope The scope the variable is defined within.
name string The name of the variable to set.
value Jurassic.Compiler.Expression The value to set the variable to.
return System

GenerateCode() public method

Generates CIL for the expression.
public GenerateCode ( ILGenerator generator, OptimizationInfo optimizationInfo ) : void
generator ILGenerator The generator to output the CIL to.
optimizationInfo OptimizationInfo Information about any optimizations that should be performed.
return void