Libraries.Language.Compile.Symbol.Block Documentation
Inherits from: Libraries.Language.Compile.Location, Libraries.Language.Object
Variables Table
Variables | Description |
---|---|
integer IF | |
integer ELSE_IF | |
integer ALWAYS | |
integer REPEAT_TIMES | |
integer DETECT | |
integer REPEAT_WHILE | |
integer ELSE | |
integer CHECK | |
integer REPEAT_UNTIL |
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
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
- Libraries.Language.Object: The object to compare to.
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
Equals(Libraries.Language.Object object)
This action determines if two objects are equal based on their hash code values.
Parameters
- Libraries.Language.Object: The to be compared.
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)
GetBlockType()
Return
integer
GetBlocks()
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
GetFile()
Return
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:
GetParentAction()
GetParentBlock()
GetParentClass()
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
GetVariablesAllBlocks()
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)
if undefined, check the parents
Parameters
Return
SetFile(Libraries.System.File file)
Parameters
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)
Parameters
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)
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:
On this page
Variables TableAction Documentation- Add(Libraries.Language.Compile.Symbol.Block block)
- Add(Libraries.Language.Compile.Symbol.Variable variable)
- AssignBytecodeLocations()
- Compare(Libraries.Language.Object object)
- ComputeSubblockReturnSatisfied()
- CreateLocationCopy()
- Equals(Libraries.Language.Object object)
- GetBlock(integer next)
- GetBlockType()
- GetBlocks()
- GetBytecodeLocation()
- GetColumnNumber()
- GetColumnNumberEnd()
- GetExceptionVariable()
- GetFile()
- GetHashCode()
- GetIndex()
- GetIndexEnd()
- GetLineNumber()
- GetLineNumberEnd()
- GetNewVariableInBlock(text var)
- GetParentAction()
- GetParentBlock()
- GetParentClass()
- GetSubBlockSize()
- GetVariable(text key)
- GetVariableThisBlock(text key)
- GetVariables()
- GetVariablesAllBlocks()
- HasIssuedReturnError()
- HasReturnThisBlock()
- HasVariableExceptField(text key)
- IsReturnSatisfied()
- SetBlockType(integer value)
- SetColumnNumber(integer column)
- SetColumnNumberEnd(integer column)
- SetExceptionVariable(Libraries.Language.Compile.Symbol.Variable variable)
- SetFile(Libraries.System.File file)
- SetIndex(integer index)
- SetIndexEnd(integer index)
- SetIsReturnSatisfied(boolean isSatisfied)
- SetIssuedReturnError(boolean error)
- SetLineNumber(integer line)
- SetLineNumberEnd(integer line)
- SetLocation(Libraries.Language.Compile.Location location)
- SetParentAction(Libraries.Language.Compile.Symbol.Action method)
- SetParentBlock(Libraries.Language.Compile.Symbol.Block block)
- SetParentClass(Libraries.Language.Compile.Symbol.Class clazz)
- SetReturnThisBlock(boolean hasReturn)
- ToText()