Libraries.Language.Compile.Symbol.SymbolTable Documentation
Ths SymbolTable class stores all pertinent information about a compile as it goes. It allows for querying of various kinds and stores only the information in its transitive dependency graph. However, in some instances, like in the use of IDE usage, a symbol table may contain a second table, called a standard library cache. This cache contains classes that are not used in the compile, but that are available to the compiler for use. This is useful for things like editor hint
Inherits from: Libraries.Language.Object
Summary
Actions Summary Table
Actions | Description |
---|---|
Add(Libraries.Language.Compile.Symbol.Class clazz) | Returns whether the symbol table has a |
Compare(Libraries.Language.Object object) | This action compares two object hash codes and returns an integer. |
Copy() | This action returns a copy of the symbol table. |
Empty() | This action gathers all of the classes from the table variable and puts them into this symbol table, clearing out the table before starting. |
Equals(Libraries.Language.Object object) | This action determines if two objects are equal based on their hash code values. |
GetClass(text key) | Returns a class with the corresponding unique static ke |
GetClassByName(text name) | This action returns an array of all classes that have a particular name regardless of their static ke |
GetClassInFile(text fileKey) | This action returns the first class in the file with the designated ke |
GetClassInPackage(text packageKey, text name) | finally, since it is unique, add it to the list of class nam |
GetClassSize() | Returns the number of classes in the symbol tabl |
GetClasses() | This action returns a copy of the symbol table. |
GetClassesInPackage(text packageKey) | Returns all classes in a particular packag |
GetClassesSortedInPackage(text packageKey) | This action returns an array of classes in a particular subpackage sorted by their static key |
GetFileSize() | Returns the number of files in the symbol tabl |
GetHashCode() | This action gets the hash code for an object. |
GetLibrary() | This stores the standard library cache. |
GetPackageSize() | Returns the number of packages in the symbol tabl |
GetPackages() | Returns an iterator of all loaded package |
GetPackagesSorted() | Returns an iterator of all loaded package |
GetPackagesSortedIterator() | This action returns an array of classes in a particular subpackage sorted by their static key |
GetSubpackageNames(text parentPackage) | create o |
HasClass(text key) | Returns whether or not a class exists in the symbol table. |
HasFile(text absolutePath) | Returns whether or not the symbol table has a fi |
HasLibrary() | This stores whether or not a standard library cache exists. |
IsEmpty() | Returns whether the symbol table has a |
RemoveClass(text key) | Removes a class with a static key from the symbol tabl |
RemoveFile(text absolutePath) | Removes a file, and any associated classes, from the syste |
SetLibrary(Libraries.Language.Compile.Library library) | This action sets the standard library cach |
SetTo(Libraries.Language.Compile.Symbol.SymbolTable table) | This action gathers all of the classes from the table variable and puts them into this symbol table, clearing out the table before starting. |
Actions Documentation
Add(Libraries.Language.Compile.Symbol.Class clazz)
Returns whether the symbol table has a
Parameters
Return
Libraries.Language.Compile.CompilerError:
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 (smalle
Parameters
- Libraries.Language.Object: The object to compare to.
Return
integer: The Compare result, Smaller, Equal, or Larger.
Copy()
This action returns a copy of the symbol table. Each class object inside of the table is a shallow copy of the origina
Return
Libraries.Language.Compile.Symbol.SymbolTable:
Empty()
This action gathers all of the classes from the table variable and puts them into this symbol table, clearing out the table before starting. This action only copies the classe
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(
Parameters
- Libraries.Language.Object: The to be compared.
Return
boolean: True if the hash codes are equal and false if they are not equal.
GetClass(text key)
Returns a class with the corresponding unique static ke
Parameters
Return
Libraries.Language.Compile.Symbol.Class:
GetClassByName(text name)
This action returns an array of all classes that have a particular name regardless of their static ke
Parameters
Return
Libraries.Containers.Iterator:
GetClassInFile(text fileKey)
This action returns the first class in the file with the designated ke
Parameters
Return
Libraries.Language.Compile.Symbol.Class:
GetClassInPackage(text packageKey, text name)
finally, since it is unique, add it to the list of class nam
Parameters
Return
Libraries.Language.Compile.Symbol.Class:
GetClassSize()
Returns the number of classes in the symbol tabl
Return
integer:
GetClasses()
This action returns a copy of the symbol table. Each class object inside of the table is a shallow copy of the origina
Return
Libraries.Containers.Iterator:
GetClassesInPackage(text packageKey)
Returns all classes in a particular packag
Parameters
Return
Libraries.Containers.Iterator:
GetClassesSortedInPackage(text packageKey)
This action returns an array of classes in a particular subpackage sorted by their static key
Parameters
Return
GetFileSize()
Returns the number of files in the symbol tabl
Return
integer:
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.
GetLibrary()
This stores the standard library cache. It contains any classes available to the system, regardless of whether they available in the current compil
Return
Libraries.Language.Compile.Library:
GetPackageSize()
Returns the number of packages in the symbol tabl
Return
integer:
GetPackages()
Returns an iterator of all loaded package
Return
Libraries.Containers.Iterator:
GetPackagesSorted()
Returns an iterator of all loaded package
Return
GetPackagesSortedIterator()
This action returns an array of classes in a particular subpackage sorted by their static key
Return
Libraries.Containers.Iterator:
GetSubpackageNames(text parentPackage)
create o
Parameters
Return
Libraries.Containers.Iterator:
HasClass(text key)
Returns whether or not a class exists in the symbol table. The key passed must be the full static key (i.e., Libraries.Language.Object, not Object
Parameters
Return
boolean:
HasFile(text absolutePath)
Returns whether or not the symbol table has a fi
Parameters
Return
boolean:
HasLibrary()
This stores whether or not a standard library cache exists. There are good reasons why a cache may not exist. For example, if this symbol table is a cache, it won't have another one. Further, if scanning is turned off, then no cache will exis
Return
boolean:
IsEmpty()
Returns whether the symbol table has a
Return
boolean:
RemoveClass(text key)
Removes a class with a static key from the symbol tabl
Parameters
RemoveFile(text absolutePath)
Removes a file, and any associated classes, from the syste
Parameters
SetLibrary(Libraries.Language.Compile.Library library)
This action sets the standard library cach
Parameters
SetTo(Libraries.Language.Compile.Symbol.SymbolTable table)
This action gathers all of the classes from the table variable and puts them into this symbol table, clearing out the table before starting. This action only copies the classe