Libraries.Language.Compile.Symbol.Block Documentation
Inherits from: Libraries.Language.Compile.Location, Libraries.Language.Object
Summary
Variable Summary Table
Variables | Description |
---|---|
integer ALWAYS | |
integer CHECK | |
integer REPEAT_TIMES | |
integer REPEAT_UNTIL | |
integer IF | |
integer ELSE | |
integer REPEAT_WHILE | |
integer DETECT | |
integer ELSE_IF |
Actions Summary Table
Actions | Description |
---|---|
Add(Libraries.Language.Compile.Symbol.Block block) | This action returns all variables in this, and only this, block. |
Add(Libraries.Language.Compile.Symbol.Variable variable) | Sets whether this block has a return value. |
AssignBytecodeLocations() | Determines whether this block has a return value. |
Compare(Libraries.Language.Object object) | This action compares two object hash codes and returns an integer. |
ComputeSubblockReturnSatisfied() | This action determines whether this block has a valid return statement at some point within it. |
CreateLocationCopy() | This action is a helper action to get copies of the location. |
Equals(Libraries.Language.Object object) | This action determines if two objects are equal based on their hash code values. |
GetBlock(integer next) | |
GetBlockType() | |
GetBlocks() | |
GetBytecodeLocation() | Returns the number of blocks that are contained within this block at the root level. |
GetColumnNumber() | |
GetColumnNumberEnd() | |
GetExceptionVariable() | This action computes whether or not a variable of the same name exists in this block or one of its parents. |
GetFile() | |
GetHashCode() | This action gets the hash code for an object. |
GetIndex() | |
GetIndexEnd() | |
GetLineNumber() | |
GetLineNumberEnd() | |
GetNewVariableInBlock(text var) | check for the variab |
GetParentAction() | |
GetParentBlock() | check for the variab |
GetParentClass() | check for the variab |
GetSubBlockSize() | Returns the number of blocks that are contained within this block at the root level. |
GetVariable(text key) | |
GetVariableThisBlock(text key) | |
GetVariables() | This action returns all variables in this, and only this, block. |
GetVariablesAllBlocks() | This action gets all variables in this block and all parents |
HasIssuedReturnError() | Determines whether an error has already been issued from this block from statements that cannot be executed. |
HasReturnThisBlock() | Determines whether this block has a return value. |
HasVariableExceptField(text key) | This action computes whether or not a variable of the same name exists in this block or one of its parents. |
IsReturnSatisfied() | |
SetBlockType(integer value) | |
SetColumnNumber(integer column) | |
SetColumnNumberEnd(integer column) | |
SetExceptionVariable(Libraries.Language.Compile.Symbol.Variable variable) | if undefined, check the paren |
SetFile(Libraries.System.File file) | |
SetIndex(integer index) | |
SetIndexEnd(integer index) | |
SetIsReturnSatisfied(boolean isSatisfied) | |
SetIssuedReturnError(boolean error) | Sets whether an error has already been issued from this block from statements that cannot be executed. |
SetLineNumber(integer line) | |
SetLineNumberEnd(integer line) | |
SetLocation(Libraries.Language.Compile.Location location) | This action uses the location and resets the current error's data. |
SetParentAction(Libraries.Language.Compile.Symbol.Action method) | |
SetParentBlock(Libraries.Language.Compile.Symbol.Block block) | not a parameter either, so check the class's fiel |
SetParentClass(Libraries.Language.Compile.Symbol.Class clazz) | if undefined, check the paren |
SetReturnThisBlock(boolean hasReturn) | Sets whether this block has a return value. |
ToText() | This action is a helper action to get copies of the location. |
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.
Example Code
Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)
Parameters
- Libraries.Language.Object: The object to compare to.
Return
integer: The Compare result, Smaller, Equal, or Larger.
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.
Example Code
use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)
Parameters
- Libraries.Language.Object: The to be compared.
Return
boolean: True if the hash codes are equal and false if they are not equal.
GetBlock(integer next)
Parameters
Return
Libraries.Language.Compile.Symbol.Block
GetBlockType()
Return
integer
GetBlocks()
Return
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()
Return
GetHashCode()
This action gets the hash code for an object.
Example Code
Object o
integer hash = o:GetHashCode()
Return
integer: The integer hash code of the object.
GetIndex()
Return
integer
GetIndexEnd()
Return
integer
GetLineNumber()
Return
integer
GetLineNumberEnd()
Return
integer
GetNewVariableInBlock(text var)
check for the variab
Parameters
Return
text:
GetParentAction()
Return
Libraries.Language.Compile.Symbol.Action
GetParentBlock()
check for the variab
Return
Libraries.Language.Compile.Symbol.Block:
GetParentClass()
check for the variab
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)
Parameters
Return
Libraries.Language.Compile.Symbol.Variable
GetVariableThisBlock(text key)
Parameters
Return
Libraries.Language.Compile.Symbol.Variable
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
Return
boolean:
IsReturnSatisfied()
Return
boolean
SetBlockType(integer value)
Parameters
SetColumnNumber(integer column)
Parameters
SetColumnNumberEnd(integer column)
Parameters
SetExceptionVariable(Libraries.Language.Compile.Symbol.Variable variable)
if undefined, check the paren
Parameters
Return
Libraries.Language.Compile.CompilerError:
SetFile(Libraries.System.File file)
Parameters
SetIndex(integer index)
Parameters
SetIndexEnd(integer index)
Parameters
SetIsReturnSatisfied(boolean isSatisfied)
Parameters
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
SetLineNumber(integer line)
Parameters
SetLineNumberEnd(integer line)
Parameters
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 fiel
Parameters
SetParentClass(Libraries.Language.Compile.Symbol.Class clazz)
if undefined, check the paren
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
ToText()
This action is a helper action to get copies of the location.
Return
text: