Libraries.Language.Compile.Symbol.Block Documentation

Inherits from: Libraries.Language.Compile.Location, Libraries.Language.Object

Variables Table

VariablesDescription
integer IF
integer ALWAYS
integer DETECT
integer ELSE_IF
integer REPEAT_UNTIL
integer ELSE
integer CHECK
integer REPEAT_TIMES
integer REPEAT_WHILE

Actions Documentation

Add(Libraries.Language.Compile.Symbol.Block block)

This action returns all variables in this, and only this, block. Variables in parent scope or child scope are excluded.

Parameters

Add(Libraries.Language.Compile.Symbol.Variable variable)

Sets whether this block has a return value. This value is set during the parsing phase and should not be adjusted afterward.

Parameters

Return

Libraries.Language.Compile.CompilerError:

AssignBytecodeLocations()

Determines whether this block has a return value. This value is set during the parsing phase.

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

Example

Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)

ComputeSubblockReturnSatisfied()

This action determines whether this block has a valid return statement at some point within it. If this block does have a return, it checks its subblocks. If all of its subblocks have a return, this action returns true as well. Note that the semantics of this action require separate processing in the semantic analysis layer before it can compute the correct value. The reason is because any given subblock may be within some structure, like an if statement, loop, or the like, and these statements can choose has they define satisfaction of a return in any mathematically sensible way they choose, according to their meaning.

Return

boolean:

CreateLocationCopy()

This action is a helper action to get copies of the location.

Return

Libraries.Language.Compile.Location:

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

Example

use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)

GetBlock(integer next)

Parameters

  • integer next

Return

Libraries.Language.Compile.Symbol.Block

GetBlockType()

Return

integer

GetBytecodeLocation()

Returns the number of blocks that are contained within this block at the root level. Blocks inside of this block may contain their own sub-blocks, but these are not counted by this action.

Return

integer:

GetColumnNumber()

Return

integer

GetColumnNumberEnd()

Return

integer

GetExceptionVariable()

This action computes whether or not a variable of the same name exists in this block or one of its parents. If it does, it returns true, otherwise false.

Return

Libraries.Language.Compile.Symbol.Variable:

GetFile()

GetHashCode()

This action gets the hash code for an object.

Return

integer: The integer hash code of the object.

Example

Object o
integer hash = o:GetHashCode()

GetIndex()

Return

integer

GetIndexEnd()

Return

integer

GetLineNumber()

Return

integer

GetLineNumberEnd()

Return

integer

GetNewVariableInBlock(text var)

check for the variable

Parameters

  • text var

Return

text:

GetParentBlock()

check for the variable

Return

Libraries.Language.Compile.Symbol.Block:

GetParentClass()

check for the variable

Return

Libraries.Language.Compile.Symbol.Class:

GetSubBlockSize()

Returns the number of blocks that are contained within this block at the root level. Blocks inside of this block may contain their own sub-blocks, but these are not counted by this action.

Return

integer:

GetVariable(text key)

GetVariableThisBlock(text key)

GetVariables()

This action returns all variables in this, and only this, block. Variables in parent scope or child scope are excluded.

Return

Libraries.Containers.Iterator:

GetVariablesAllBlocks()

This action gets all variables in this block and all parents

Return

Libraries.Containers.Iterator:

HasIssuedReturnError()

Determines whether an error has already been issued from this block from statements that cannot be executed. An example of this would issuing a return now from an action then trying to assign to a variable.

Return

boolean:

HasReturnThisBlock()

Determines whether this block has a return value. This value is set during the parsing phase.

Return

boolean:

HasVariableExceptField(text key)

This action computes whether or not a variable of the same name exists in this block or one of its parents. If it does, it returns true, otherwise false.

Parameters

  • text key

Return

boolean:

IsReturnSatisfied()

Return

boolean

SetBlockType(integer value)

Parameters

  • integer value

SetColumnNumber(integer column)

Parameters

  • integer column

SetColumnNumberEnd(integer column)

Parameters

  • integer column

SetExceptionVariable(Libraries.Language.Compile.Symbol.Variable variable)

SetFile(Libraries.System.File file)

SetIndex(integer index)

Parameters

  • integer index

SetIndexEnd(integer index)

Parameters

  • integer index

SetIsReturnSatisfied(boolean isSatisfied)

Parameters

  • boolean isSatisfied

SetIssuedReturnError(boolean error)

Sets whether an error has already been issued from this block from statements that cannot be executed. An example of this would issuing a return now from an action then trying to assign to a variable.

Parameters

  • boolean error

SetLineNumber(integer line)

Parameters

  • integer line

SetLineNumberEnd(integer line)

Parameters

  • integer line

SetLocation(Libraries.Language.Compile.Location location)

This action uses the location and resets the current error's data.

Parameters

SetParentAction(Libraries.Language.Compile.Symbol.Action method)

SetParentBlock(Libraries.Language.Compile.Symbol.Block block)

not a parameter either, so check the class's fields

Parameters

SetParentClass(Libraries.Language.Compile.Symbol.Class clazz)

if undefined, check the parents

Parameters

SetReturnThisBlock(boolean hasReturn)

Sets whether this block has a return value. This value is set during the parsing phase and should not be adjusted afterward.

Parameters

  • boolean hasReturn

ToText()

This action is a helper action to get copies of the location.

Return

text: