Libraries.Language.Compile.Compiler Documentation

Inherits from: Libraries.Language.Object

Variables Table

VariablesDescription
number VERSION
integer JAVASCRIPT
integer PYTHON
integer JAVA_BYTECODE
integer DOCUMENT

Actions Documentation

AddJar(Libraries.System.File file)

This action checks if this is a jar file and then adds it as a dependency.

Parameters

AddPluginFolder(Libraries.System.File file)

This action adds a directory of plugins to be written to the output jar

Parameters

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)

Compile(Libraries.Language.Compile.CompilerRequest request)

Tells the compiler to build a program, given a particular request object. Request objects may contain files and other information on what is to be built.

Parameters

Return

Libraries.Language.Compile.CompilerResult:

EmptyAdditionalJars()

This action returns a profiler that has tracked information about each phase of a compile as it goes.

EmptyAdditionalPluginFolders()

This action adds a directory of plugins to be written to the output jar

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)

GetAllRequiredFiles(Libraries.Language.Compile.Symbol.SymbolTable table, Libraries.Language.Compile.Symbol.TypeChecker types, Libraries.Language.Compile.CompilerErrorManager errors, Libraries.Language.Compile.Library library)

This action is called after the parsing phase, returning an array of all files were required for building the project.

Parameters

Return

Libraries.Containers.HashTable:

GetBuildFolder()

GetCompilerProfiler()

This action returns a profiler that has tracked information about each phase of a compile as it goes.

Return

Libraries.Language.Compile.CompilerProfiler:

GetDependencies()

This action tells the compiler what kind of output to emit.

Return

Libraries.Containers.Iterator:

GetExecutable(Libraries.Language.Compile.CompilerRequest request)

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

GetMainClass(Libraries.System.File theMain, Libraries.Language.Compile.Symbol.SymbolTable table)

GetName()

Get the container name without the "all" at the end

Return

text:

GetOutputFolder()

GetOutputSpeech()

Return

boolean

GetOutputType()

This action sets what kind of output the compiler is going to have. By default this returns Java bytecode.

Return

integer:

GetRunFolder()

GetStandardLibrary()

GetStandardLibraryFile(text key, text fromPackage)

table

Parameters

  • text key
  • text fromPackage

Return

Libraries.System.File:

GetStandardLibraryFolder()

GetVersion()

Return

text

HasSpeechCallInCompile()

Return

boolean

IsWritingJavaScriptToDisk()

Return

boolean

IsWritingPythonToDisk()

Return

boolean

LoadDependency(text from, text to)

Parameters

  • text from
  • text to

Parse(Libraries.System.File file, Libraries.Language.Compile.QuorumSourceListener listener)

This action scans the system classes available and parses them appropriately.

Parameters

Parse(text source, Libraries.Language.Compile.QuorumSourceListener listener)

This action sets what kind of output the compiler is going to have. By default this returns Java bytecode.

Parameters

ParseSandbox(text source, Libraries.Language.Compile.QuorumSourceListener listener, Libraries.Language.Compile.Symbol.SymbolTable table, Libraries.Language.Compile.CompilerErrorManager errors, Libraries.Language.Compile.Symbol.TypeChecker types, Libraries.System.File loc)

Request(Libraries.Language.Compile.CodeCompletionRequest request)

we know this is the case if the tree exists and there are no errors.

Parameters

Return

Libraries.Language.Compile.CodeCompletionResult:

ScanStandardLibrary()

This action scans the system classes available and parses them appropriately.

SetName(text name)

if there are some, mark them as unparsed

Parameters

  • text name

SetOutputFolder(Libraries.System.File file)

SetOutputSpeech(boolean doSay)

Parameters

  • boolean doSay

SetOutputType(integer type)

This action tells the compiler what kind of output to emit.

Parameters

  • integer type

SetStandardLibrary(Libraries.Language.Compile.Library library)

SetStandardLibraryFolder(Libraries.System.File file)

SetWritingJavaScriptToDisk(boolean write)

Parameters

  • boolean write

SetWritingPythonToDisk(boolean write)

Parameters

  • boolean write

Traverse(text source, Libraries.Language.Compile.QuorumSourceListener listener, Libraries.Language.Compile.Symbol.SymbolTable table, Libraries.Language.Compile.CompilerErrorManager errors, Libraries.Language.Compile.Symbol.TypeChecker types, Libraries.System.File loc, Libraries.Language.Compile.CompilerResult result)

TypeResolution(Libraries.Language.Compile.Symbol.SymbolTable table, Libraries.Language.Compile.Symbol.TypeChecker types, Libraries.Language.Compile.CompilerErrorManager errors)

TypeResolution(Libraries.Language.Compile.Symbol.SymbolTable table, Libraries.Language.Compile.Symbol.TypeChecker types, Libraries.Language.Compile.CompilerErrorManager errors, Libraries.Language.Compile.Symbol.SymbolTable fullCompilation)