Libraries.Language.Compile.QuorumBytecodeListener Documentation

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

Actions Documentation

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)

DoAndOr(Libraries.Language.Compile.Context.AndOrContext context)

else we're making a call on a field, so get it off the stack and take a look

Parameters

EnterAccessModifier(Libraries.Language.Compile.Context.AccessModifierContext context)

EnterAction(Libraries.Language.Compile.Context.ActionContext context)

EnterActionCall(Libraries.Language.Compile.Context.ActionCallContext ctx)

EnterActionExpressionList(Libraries.Language.Compile.Context.ActionExpressionListContext context)

EnterActionHeader(Libraries.Language.Compile.Context.ActionContext context)

EnterActionsNoClass(Libraries.Language.Compile.Context.ActionsNoClassContext context)

EnterAddition(Libraries.Language.Compile.Context.AdditionContext addition)

EnterAlertStatement(Libraries.Language.Compile.Context.AlertContext context)

EnterAlwaysStatement(Libraries.Language.Compile.Context.AlwaysStatementContext context)

get the exception variable from the block

Parameters

EnterAnd(Libraries.Language.Compile.Context.AndOrContext context)

make sure the call is allowed and inform the writer

Parameters

EnterAssignmentDeclaration(Libraries.Language.Compile.Context.AssignmentDeclaractionContext context)

EnterBlock(Libraries.Language.Compile.Context.BlockContext context)

EnterBlueprintAction(Libraries.Language.Compile.Context.ActionContext context)

EnterBoolean(Libraries.Language.Compile.Context.BooleanContext context)

EnterCast(Libraries.Language.Compile.Context.CastContext context)

EnterCheckStatement(Libraries.Language.Compile.Context.CheckContext context)

EnterClassStatements(Libraries.Language.Compile.Context.ClassStatementsContext context)

EnterClassType(Libraries.Language.Compile.Context.ClassTypeContext context)

EnterConstructor(Libraries.Language.Compile.Context.ConstructorContext context)

EnterDetectStatement(Libraries.Language.Compile.Context.DetectStatementContext context)

EnterDocumentation(Libraries.Language.Compile.Context.DocumentationContext context)

EnterElseIfStatement(Libraries.Language.Compile.Context.IfContext context)

currentBlock:SetReturnThisBlock(true)

Parameters

EnterElseStatement(Libraries.Language.Compile.Context.IfContext context)

check all my blocks to make sure we satisfy a return

Parameters

EnterEquals(Libraries.Language.Compile.Context.EqualsContext context)

EnterFormalParameter(Libraries.Language.Compile.Context.FormalParameterContext context)

EnterFullClassDeclaration(Libraries.Language.Compile.Context.FullClassDeclarationContext context)

EnterGenericDeclaration(Libraries.Language.Compile.Context.GenericDeclarationContext context)

EnterGenericStatement(Libraries.Language.Compile.Context.GenericContext context)

EnterIfStatement(Libraries.Language.Compile.Context.IfContext context)

EnterInequality(Libraries.Language.Compile.Context.InequalityContext context)

EnterInheritStatement(Libraries.Language.Compile.Context.InheritStatementContext context)

EnterInheritStatements(Libraries.Language.Compile.Context.InheritStatementsContext context)

EnterInitialParentActionCall(Libraries.Language.Compile.Context.ActionCallContext ctx)

handle any casts, if there are any

Parameters

EnterInput(Libraries.Language.Compile.Context.InputContext context)

EnterInputNoParameters(Libraries.Language.Compile.Context.InputContext context)

EnterInteger(Libraries.Language.Compile.Context.IntegerContext int)

EnterIs(Libraries.Language.Compile.Context.IsContext context)

EnterLoopStatement(Libraries.Language.Compile.Context.LoopContext context)

EnterMe(Libraries.Language.Compile.Context.MeContext context)

EnterMeVariableAccess(Libraries.Language.Compile.Context.MeVariableAccessContext context)

EnterMinus(Libraries.Language.Compile.Context.UnaryMinusContext context)

EnterMultiplication(Libraries.Language.Compile.Context.MultiplicationContext context)

EnterNoActionsNoClass(Libraries.Language.Compile.Context.NoActionsNoClassContext context)

EnterNoClassDeclaration(Libraries.Language.Compile.Context.NoClassDeclarationContext ctx)

EnterNoTypeAssignment(Libraries.Language.Compile.Context.NoTypeAssignmentContext context)

the system should have already output an error, so return

Parameters

EnterNormalAssignment(Libraries.Language.Compile.Context.NormalAssignmentContext context)

EnterNot(Libraries.Language.Compile.Context.NotContext context)

EnterNumber(Libraries.Language.Compile.Context.NumberContext context)

EnterObjectAssignment(Libraries.Language.Compile.Context.ObjectAssignmentContext context)

EnterOr(Libraries.Language.Compile.Context.AndOrContext context)

EnterOutputStatement(Libraries.Language.Compile.Context.OutputContext context)

EnterPackageRule(Libraries.Language.Compile.Context.PackageContext context)

EnterParentAssignment(Libraries.Language.Compile.Context.ParentAssignmentContext context)

EnterParentFieldAccess(Libraries.Language.Compile.Context.ParentFieldAccessContext context)

EnterParentVariableFunctionCall(Libraries.Language.Compile.Context.ParentVariableFunctionCallContext context)

the left hand side for the user if they so choose

Parameters

EnterParentVariableSoloFunctionCall(Libraries.Language.Compile.Context.ParentVariableFunctionCallContext context)

it is mapped to a generic, so find the variable it is mapped to

Parameters

EnterParenthesisExpression(Libraries.Language.Compile.Context.ParenthesisContext context)

EnterQualifiedName(Libraries.Language.Compile.Context.QualifiedNameContext context)

EnterReturnStatement(Libraries.Language.Compile.Context.ReturnContext context)

EnterSayStatement(Libraries.Language.Compile.Context.SayContext context)

EnterStart(Libraries.Language.Compile.Context.StartContext context)

EnterStatement(Libraries.Language.Compile.Context.StatementContext context)

EnterSystemAction(Libraries.Language.Compile.Context.ActionContext context)

EnterText(Libraries.Language.Compile.Context.TextContext context)

EnterUndefined(Libraries.Language.Compile.Context.UndefinedContext context)

EnterUse(Libraries.Language.Compile.Context.UseContext context)

EnterVariableFunctionCall(Libraries.Language.Compile.Context.VariableFunctionCallContext context)

EnterVariableSoloFunctionCall(Libraries.Language.Compile.Context.VariableFunctionCallContext context)

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)

ExitAccessModifier(Libraries.Language.Compile.Context.AccessModifierContext context)

ExitAction(Libraries.Language.Compile.Context.ActionContext context)

ExitActionCall(Libraries.Language.Compile.Context.ActionCallContext context)

get the full static key of the parent

Parameters

ExitActionExpressionList(Libraries.Language.Compile.Context.ActionExpressionListContext context)

thus, if there's a return type, we need to pop it off the stack.

Parameters

ExitActionHeader(Libraries.Language.Compile.Context.ActionContext context)

ExitActionsNoClass(Libraries.Language.Compile.Context.ActionsNoClassContext context)

ExitAddition(Libraries.Language.Compile.Context.AdditionContext addition)

ExitAlertStatement(Libraries.Language.Compile.Context.AlertContext context)

ExitAlwaysStatement(Libraries.Language.Compile.Context.AlwaysStatementContext context)

check to make sure this is valid in the current class.

Parameters

ExitAnd(Libraries.Language.Compile.Context.AndOrContext context)

I don't know why, but this fixes a Quorum 2 bug.

Parameters

ExitAssignmentDeclaration(Libraries.Language.Compile.Context.AssignmentDeclaractionContext context)

ExitBlock(Libraries.Language.Compile.Context.BlockContext context)

ExitBlueprintAction(Libraries.Language.Compile.Context.ActionContext context)

ExitBoolean(Libraries.Language.Compile.Context.BooleanContext context)

ExitCast(Libraries.Language.Compile.Context.CastContext context)

if it is, again previous phase will catch this

Parameters

ExitCheckStatement(Libraries.Language.Compile.Context.CheckContext context)

ExitClass()

ExitClassStatements(Libraries.Language.Compile.Context.ClassStatementsContext context)

ExitClassType(Libraries.Language.Compile.Context.ClassTypeContext context)

ExitConstructor(Libraries.Language.Compile.Context.ConstructorContext context)

ExitDetectStatement(Libraries.Language.Compile.Context.DetectStatementContext context)

ExitDocumentation(Libraries.Language.Compile.Context.DocumentationContext context)

ExitElseIfStatement(Libraries.Language.Compile.Context.IfContext context)

get all of the elseif blocks and check them too

Parameters

ExitElseStatement(Libraries.Language.Compile.Context.IfContext context)

there is a problem and we have previously thrown a compiler error

Parameters

ExitEquals(Libraries.Language.Compile.Context.EqualsContext context)

it's not in the current class

Parameters

ExitFormalParameter(Libraries.Language.Compile.Context.FormalParameterContext context)

ExitFullClassDeclaration(Libraries.Language.Compile.Context.FullClassDeclarationContext context)

ExitGenericDeclaration(Libraries.Language.Compile.Context.GenericDeclarationContext context)

ExitGenericStatement(Libraries.Language.Compile.Context.GenericContext context)

ExitIfStatement(Libraries.Language.Compile.Context.IfContext context)

ExitInequality(Libraries.Language.Compile.Context.InequalityContext context)

get the most recent type off the stack

Parameters

ExitInheritStatement(Libraries.Language.Compile.Context.InheritStatementContext context)

ExitInheritStatements(Libraries.Language.Compile.Context.InheritStatementsContext context)

ExitInitialParentActionCall(Libraries.Language.Compile.Context.ActionCallContext ctx)

issue an error, this is not allowed.

Parameters

ExitInput(Libraries.Language.Compile.Context.InputContext context)

ExitInputNoParameters(Libraries.Language.Compile.Context.InputContext context)

check if it's either text or undefined

Parameters

ExitInteger(Libraries.Language.Compile.Context.IntegerContext context)

ExitIs(Libraries.Language.Compile.Context.IsContext context)

if it isn't text, it better be either Object or a subclass

Parameters

ExitLoopStatement(Libraries.Language.Compile.Context.LoopContext context)

ExitMe(Libraries.Language.Compile.Context.MeContext context)

ExitMeVariableAccess(Libraries.Language.Compile.Context.MeVariableAccessContext context)

ExitMinus(Libraries.Language.Compile.Context.UnaryMinusContext context)

ExitMultiplication(Libraries.Language.Compile.Context.MultiplicationContext context)

ExitNoActionsNoClass(Libraries.Language.Compile.Context.NoActionsNoClassContext context)

ExitNoClassDeclaration(Libraries.Language.Compile.Context.NoClassDeclarationContext ctx)

ExitNoTypeAssignment(Libraries.Language.Compile.Context.NoTypeAssignmentContext context)

we can't allow this to be instantiated, throw an error

Parameters

ExitNormalAssignment(Libraries.Language.Compile.Context.NormalAssignmentContext context)

the system should have already output an error, so return

Parameters

ExitNot(Libraries.Language.Compile.Context.NotContext context)

ExitNumber(Libraries.Language.Compile.Context.NumberContext context)

ExitObjectAssignment(Libraries.Language.Compile.Context.ObjectAssignmentContext context)

ExitOr(Libraries.Language.Compile.Context.AndOrContext context)

ExitOutputStatement(Libraries.Language.Compile.Context.OutputContext context)

now check to see if it's even possible that this type "is" the other type

Parameters

ExitPackageRule(Libraries.Language.Compile.Context.PackageContext context)

ExitParentAssignment(Libraries.Language.Compile.Context.ParentAssignmentContext context)

if it is, again previous phase

Parameters

ExitParentFieldAccess(Libraries.Language.Compile.Context.ParentFieldAccessContext context)

ExitParentVariableFunctionCall(Libraries.Language.Compile.Context.ParentVariableFunctionCallContext context)

this action is private and in another class.

Parameters

ExitParentVariableSoloFunctionCall(Libraries.Language.Compile.Context.ParentVariableFunctionCallContext context)

primitive, so get the object version

Parameters

ExitParenthesisExpression(Libraries.Language.Compile.Context.ParenthesisContext context)

ExitQualifiedName(Libraries.Language.Compile.Context.QualifiedNameContext context)

ExitReturnStatement(Libraries.Language.Compile.Context.ReturnContext context)

throw a compiler error.

Parameters

ExitSayStatement(Libraries.Language.Compile.Context.SayContext context)

ExitStart(Libraries.Language.Compile.Context.StartContext context)

ExitStatement(Libraries.Language.Compile.Context.StatementContext context)

if this is not a void method, handle the return

Parameters

ExitSystemAction(Libraries.Language.Compile.Context.ActionContext context)

ExitText(Libraries.Language.Compile.Context.TextContext context)

ExitUndefined(Libraries.Language.Compile.Context.UndefinedContext context)

ExitUse(Libraries.Language.Compile.Context.UseContext context)

ExitVariableFunctionCall(Libraries.Language.Compile.Context.VariableFunctionCallContext context)

this action must be defined in a parent. Map its generics separately

Parameters

ExitVariableSoloFunctionCall(Libraries.Language.Compile.Context.VariableFunctionCallContext context)

FinishActionResolution(Libraries.Language.Compile.Translate.ActionCallOpcode actionCall, Libraries.Language.Compile.Symbol.ActionCallResolution resolved)

GetBuildFile()

GetBuildInterfaceFile()

GetClassOpcode()

This returns true if a say statement exists within this class.

Return

Libraries.Language.Compile.Translate.ClassOpcode:

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()

GetSource()

Return

text

HasSayStatementInClass()

This returns true if a say statement exists within this class.

Return

boolean:

SetCompilerErrorManager(Libraries.Language.Compile.CompilerErrorManager errors)

SetFile(Libraries.System.File file)

SetLexer(Libraries.Language.Compile.Lexer lexer)

SetSource(text source)

Parameters

  • text source

SetSymbolTable(Libraries.Language.Compile.Symbol.SymbolTable table)

SetTypeChecker(Libraries.Language.Compile.Symbol.TypeChecker checker)

SyntaxError(Libraries.Language.Compile.CompilerError error)

This action is called only under the condition that we are receiving error message events from the underlying parser technology (e.g., ANTLR). If we are, the messages will be propogated. Generally, this action does not need to be overriden.

Parameters