BeginStatement

Overview

BeginStatement represents a block statement, a begin/end statement in code. It holds a list of statements, and optionally a list of local variables introduced inside this statement. All local variables created here can be referenced by using a NamedLocalValue or a BeginLocalValue.

Location


 

constructor

Constructor that does not initialize any fields.

 

constructor

 

BeginStatement()

 

init()

 

BeginStatement()

 

Sub New()

constructor (IEnumerable<LocalVariable>, array of Statement)

Constructor

 

constructor(aLocals: IEnumerable<LocalVariable>; params anItems: array of Statement)

 

BeginStatement(IEnumerable<LocalVariable> aLocals, params Statement[] anItems)

 

init(_ aLocals: IEnumerable<LocalVariable>, _ anItems: Statement...)

 

BeginStatement(IEnumerable<LocalVariable> aLocals, Statement[]... anItems)

 

Sub New(aLocals As IEnumerable<LocalVariable>, ParamArray anItems As Statement())

Parameters:

  • aLocals: Locals in this begin/end statement.
  • anItems: Statements to add to this begin/end statement.

constructor (array of Statement)

Constructor

 

constructor(params anItems: array of Statement)

 

BeginStatement(params Statement[] anItems)

 

init(_ anItems: Statement...)

 

BeginStatement(Statement[]... anItems)

 

Sub New(ParamArray anItems As Statement())

Parameters:

  • anItems: Statements to add to the begin statement.

Add

Add a new statement to the list

 

method Add(aValue: Statement): Int32

 

Int32 Add(Statement aValue)

 

func Add(_ aValue: Statement) -> Int32

 

Int32 Add(Statement aValue)

 

Function Add(aValue As Statement) As Int32

Parameters:

  • aValue: statement to add.

BuildStatement

Converts a statement to a string.

 

method BuildStatement(anIndent: Int32; sb: StringBuilder)

 

void BuildStatement(Int32 anIndent, StringBuilder sb)

 

func BuildStatement(_ anIndent: Int32, _ sb: StringBuilder)

 

void BuildStatement(Int32 anIndent, StringBuilder sb)

 

Sub BuildStatement(anIndent As Int32, sb As StringBuilder)

Parameters:

  • anIndent: The nr of spaces to place before the start of this statement.
  • sb: Output string builder.

BuildStatementNoBegin

Builds the statement to string but without the begin/end around it. Used for repeat and try.

 

method BuildStatementNoBegin(anIndent: Int32; sb: StringBuilder)

 

void BuildStatementNoBegin(Int32 anIndent, StringBuilder sb)

 

func BuildStatementNoBegin(_ anIndent: Int32, _ sb: StringBuilder)

 

void BuildStatementNoBegin(Int32 anIndent, StringBuilder sb)

 

Sub BuildStatementNoBegin(anIndent As Int32, sb As StringBuilder)

Parameters:

  • anIndent: indentation before the statement.
  • sb: output string builder.

Clear

Clear the statement list

 

method Clear

 

void Clear()

 

func Clear()

 

void Clear()

 

Sub Clear()

Count

Returns the number of elements in this statement collection

 

property Count: Int32 read;

 

Int32 Count { get; }

 

var Count: Int32 { get{} }

 

Int32 Count { __get; }

 

ReadOnly Property Count() As Int32

Item

Indexer to access the statements in this begin statement.

 

property Item[no: Int32]: Statement read write;

 

Statement Item[Int32 no] { get; set; }

 

subscript Item(_ no: Int32) -> Statement { get{} set{} }

 

Statement Item[Int32 no] { __get; __set; }

 

Property Item(no As Int32) As Statement

Kind

Returns what kind of statement this is; this can be used to find out if a statement is of a specific type without having to check all possible casts

 

property Kind: StatementKind read;

 

StatementKind Kind { get; }

 

var Kind: StatementKind { get{} }

 

StatementKind Kind { __get; }

 

ReadOnly Property Kind() As StatementKind

Locals

List of local variables in this statement

 

property Locals: List<LocalVariable> read;

 

List<LocalVariable> Locals { get; }

 

var Locals: List<LocalVariable> { get{} }

 

List<LocalVariable> Locals { __get; }

 

ReadOnly Property Locals() As List<LocalVariable>

OverflowCheck    (declared in Statement)

Overflow checking for binary and unary operations in this statement

 

property OverflowCheck: Boolean read write;

 

Boolean OverflowCheck { get; set; }

 

var OverflowCheck: Boolean { get{} set{} }

 

Boolean OverflowCheck { __get; __set; }

 

Property OverflowCheck() As Boolean

Position    (declared in Statement)

Position this statement is defined at

 

property Position: IPosition read write;

 

IPosition Position { get; set; }

 

var Position: IPosition { get{} set{} }

 

IPosition Position { __get; __set; }

 

Property Position() As IPosition

Remove

Remove a specific statement

 

method Remove(no: Statement)

 

void Remove(Statement no)

 

func Remove(_ no: Statement)

 

void Remove(Statement no)

 

Sub Remove(no As Statement)

Parameters:

  • no: statement to remove

RemoveAt

Remove a specific statement

 

method RemoveAt(no: Int32)

 

void RemoveAt(Int32 no)

 

func RemoveAt(_ no: Int32)

 

void RemoveAt(Int32 no)

 

Sub RemoveAt(no As Int32)

Parameters:

  • no: index of the item to remove.

SetOverflowCheckRecursive (Boolean)

 

method SetOverflowCheckRecursive(aValue: Boolean)

 

void SetOverflowCheckRecursive(Boolean aValue)

 

func SetOverflowCheckRecursive(_ aValue: Boolean)

 

void SetOverflowCheckRecursive(Boolean aValue)

 

Sub SetOverflowCheckRecursive(aValue As Boolean)

Parameters:

  • aValue:

SetOverflowCheckRecursive (Boolean)    (declared in Statement)

Recursively sets the OverflowCheck flag

 

method SetOverflowCheckRecursive(value: Boolean)

 

void SetOverflowCheckRecursive(Boolean value)

 

func SetOverflowCheckRecursive(_ value: Boolean)

 

void SetOverflowCheckRecursive(Boolean value)

 

Sub SetOverflowCheckRecursive(value As Boolean)

Parameters:

  • value: new value

ToString    (declared in Statement)

Returns this statement as a string

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

ToValue

Converts this statement to a value tree that creates these statements

 

method ToValue(aServicesParameter: Value; aServices: IServices): Value

 

Value ToValue(Value aServicesParameter, IServices aServices)

 

func ToValue(_ aServicesParameter: Value, _ aServices: IServices) -> Value

 

Value ToValue(Value aServicesParameter, IServices aServices)

 

Function ToValue(aServicesParameter As Value, aServices As IServices) As Value

Parameters:

  • aServicesParameter: the value that contains where aServices is stored
  • aServices: Actual services instance.

 

Count

Returns the number of elements in this statement collection

 

property Count: Int32 read;

 

Int32 Count { get; }

 

var Count: Int32 { get{} }

 

Int32 Count { __get; }

 

ReadOnly Property Count() As Int32

Item

Indexer to access the statements in this begin statement.

 

property Item[no: Int32]: Statement read write;

 

Statement Item[Int32 no] { get; set; }

 

subscript Item(_ no: Int32) -> Statement { get{} set{} }

 

Statement Item[Int32 no] { __get; __set; }

 

Property Item(no As Int32) As Statement

Kind

Returns what kind of statement this is; this can be used to find out if a statement is of a specific type without having to check all possible casts

 

property Kind: StatementKind read;

 

StatementKind Kind { get; }

 

var Kind: StatementKind { get{} }

 

StatementKind Kind { __get; }

 

ReadOnly Property Kind() As StatementKind

Locals

List of local variables in this statement

 

property Locals: List<LocalVariable> read;

 

List<LocalVariable> Locals { get; }

 

var Locals: List<LocalVariable> { get{} }

 

List<LocalVariable> Locals { __get; }

 

ReadOnly Property Locals() As List<LocalVariable>

OverflowCheck    (declared in Statement)

Overflow checking for binary and unary operations in this statement

 

property OverflowCheck: Boolean read write;

 

Boolean OverflowCheck { get; set; }

 

var OverflowCheck: Boolean { get{} set{} }

 

Boolean OverflowCheck { __get; __set; }

 

Property OverflowCheck() As Boolean

Position    (declared in Statement)

Position this statement is defined at

 

property Position: IPosition read write;

 

IPosition Position { get; set; }

 

var Position: IPosition { get{} set{} }

 

IPosition Position { __get; __set; }

 

Property Position() As IPosition

 

constructor

Constructor that does not initialize any fields.

 

constructor

 

BeginStatement()

 

init()

 

BeginStatement()

 

Sub New()

constructor (IEnumerable<LocalVariable>, array of Statement)

Constructor

 

constructor(aLocals: IEnumerable<LocalVariable>; params anItems: array of Statement)

 

BeginStatement(IEnumerable<LocalVariable> aLocals, params Statement[] anItems)

 

init(_ aLocals: IEnumerable<LocalVariable>, _ anItems: Statement...)

 

BeginStatement(IEnumerable<LocalVariable> aLocals, Statement[]... anItems)

 

Sub New(aLocals As IEnumerable<LocalVariable>, ParamArray anItems As Statement())

Parameters:

  • aLocals: Locals in this begin/end statement.
  • anItems: Statements to add to this begin/end statement.

constructor (array of Statement)

Constructor

 

constructor(params anItems: array of Statement)

 

BeginStatement(params Statement[] anItems)

 

init(_ anItems: Statement...)

 

BeginStatement(Statement[]... anItems)

 

Sub New(ParamArray anItems As Statement())

Parameters:

  • anItems: Statements to add to the begin statement.

Add

Add a new statement to the list

 

method Add(aValue: Statement): Int32

 

Int32 Add(Statement aValue)

 

func Add(_ aValue: Statement) -> Int32

 

Int32 Add(Statement aValue)

 

Function Add(aValue As Statement) As Int32

Parameters:

  • aValue: statement to add.

BuildStatement

Converts a statement to a string.

 

method BuildStatement(anIndent: Int32; sb: StringBuilder)

 

void BuildStatement(Int32 anIndent, StringBuilder sb)

 

func BuildStatement(_ anIndent: Int32, _ sb: StringBuilder)

 

void BuildStatement(Int32 anIndent, StringBuilder sb)

 

Sub BuildStatement(anIndent As Int32, sb As StringBuilder)

Parameters:

  • anIndent: The nr of spaces to place before the start of this statement.
  • sb: Output string builder.

BuildStatementNoBegin

Builds the statement to string but without the begin/end around it. Used for repeat and try.

 

method BuildStatementNoBegin(anIndent: Int32; sb: StringBuilder)

 

void BuildStatementNoBegin(Int32 anIndent, StringBuilder sb)

 

func BuildStatementNoBegin(_ anIndent: Int32, _ sb: StringBuilder)

 

void BuildStatementNoBegin(Int32 anIndent, StringBuilder sb)

 

Sub BuildStatementNoBegin(anIndent As Int32, sb As StringBuilder)

Parameters:

  • anIndent: indentation before the statement.
  • sb: output string builder.

Clear

Clear the statement list

 

method Clear

 

void Clear()

 

func Clear()

 

void Clear()

 

Sub Clear()

Remove

Remove a specific statement

 

method Remove(no: Statement)

 

void Remove(Statement no)

 

func Remove(_ no: Statement)

 

void Remove(Statement no)

 

Sub Remove(no As Statement)

Parameters:

  • no: statement to remove

RemoveAt

Remove a specific statement

 

method RemoveAt(no: Int32)

 

void RemoveAt(Int32 no)

 

func RemoveAt(_ no: Int32)

 

void RemoveAt(Int32 no)

 

Sub RemoveAt(no As Int32)

Parameters:

  • no: index of the item to remove.

SetOverflowCheckRecursive (Boolean)

 

method SetOverflowCheckRecursive(aValue: Boolean)

 

void SetOverflowCheckRecursive(Boolean aValue)

 

func SetOverflowCheckRecursive(_ aValue: Boolean)

 

void SetOverflowCheckRecursive(Boolean aValue)

 

Sub SetOverflowCheckRecursive(aValue As Boolean)

Parameters:

  • aValue:

SetOverflowCheckRecursive (Boolean)    (declared in Statement)

Recursively sets the OverflowCheck flag

 

method SetOverflowCheckRecursive(value: Boolean)

 

void SetOverflowCheckRecursive(Boolean value)

 

func SetOverflowCheckRecursive(_ value: Boolean)

 

void SetOverflowCheckRecursive(Boolean value)

 

Sub SetOverflowCheckRecursive(value As Boolean)

Parameters:

  • value: new value

ToString    (declared in Statement)

Returns this statement as a string

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

ToValue

Converts this statement to a value tree that creates these statements

 

method ToValue(aServicesParameter: Value; aServices: IServices): Value

 

Value ToValue(Value aServicesParameter, IServices aServices)

 

func ToValue(_ aServicesParameter: Value, _ aServices: IServices) -> Value

 

Value ToValue(Value aServicesParameter, IServices aServices)

 

Function ToValue(aServicesParameter As Value, aServices As IServices) As Value

Parameters:

  • aServicesParameter: the value that contains where aServices is stored
  • aServices: Actual services instance.