Libraries.Language.Compile.CodeCompletionListener Documentation

The codeCompletionListener is a QuorumSourceListener designed to read expressions for code completion. It processes a limited subset of the language on a per line basis, notably expressions, and places an opcode on the opcode stack of a particular type. This type is the type being requested for code completion information.

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

Actions Documentation

CanCodeComplete()

Return

boolean

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)

Empty()

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)

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

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)

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

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

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

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

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)

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)

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)

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

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)

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

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)

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

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)

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

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)

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

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

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

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

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)

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

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

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

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

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

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

get the name of the variable

Parameters

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

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)

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

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

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

for now, only do this for items with no parameters.

Parameters

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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)

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

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

GetOpcodeStack()

GetSource()

Return

text

SetCanCodeComplete(boolean canCodeComplete)

Parameters

  • boolean canCodeComplete

SetCompilerErrorManager(Libraries.Language.Compile.CompilerErrorManager errors)

SetCurrentClass(Libraries.Language.Compile.Symbol.Class currentClass)

SetFile(Libraries.System.File file)

SetLexer(Libraries.Language.Compile.Lexer lexer)

SetRequest(Libraries.Language.Compile.CodeCompletionRequest request)

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