case class SymbolTable(container: AST.Definition) extends Product with Serializable
Symbol Table for Validation and other purposes. This symbol table is built from the AST model after syntactic parsing is complete. It will also work for any sub-tree of the model that is rooted by a ParentDefOf[Definition] node.
The symbol tree contains a mapping from leaf name to the entire list of parent definitions (symbols) as well as a mapping from definitions to their parents (parentage). Bot maps are built during a single pass of the AST.
- container
The node from which to build the symbol table
- Alphabetic
- By Inheritance
- SymbolTable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new SymbolTable(container: AST.Definition)
- container
The node from which to build the symbol table
Type Members
- type LookupResult[D <: AST.Definition] = List[(AST.Definition, Option[D])]
The result of a lookupSymbol request A lookupSymbol request returns a list of tuples that contain the generic definition, as a Definition, and, if the definition matches the type of interest, D, then an Option[D] for convenience.
- type Parentage = HashMap[AST.Definition, Parents]
- type Parents = Seq[AST.Definition]
- type SymTab = HashMap[String, Seq[SymTabItem]]
- type SymTabItem = (AST.Definition, Parents)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- val container: AST.Definition
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def foreachOverloadedSymbol[T](process: (Seq[Seq[AST.Definition]]) => T): T
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def lookup[D <: AST.Definition](id: Seq[String])(implicit arg0: ClassTag[D]): List[D]
- def lookup[D <: AST.Definition](ref: AST.Reference[D])(implicit arg0: ClassTag[D]): List[D]
- def lookupParentage(names: Seq[String]): List[SymTabItem]
Look up a symbol in the table
Look up a symbol in the table
- returns
A list of matching definitions of 2-tuples giving the definition as a Definition type and optionally as the requested type
- def lookupSymbol[D <: AST.Definition](id: Seq[String])(implicit arg0: ClassTag[D]): LookupResult[D]
Look up a symbol in the table
Look up a symbol in the table
- D
The expected type of definition
- id
The multi-part identifier of the symbol, from leaf to root, that is from most nested to least nested.
- returns
A list of matching definitions of 2-tuples giving the definition as a Definition type and optionally as the requested type
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def parentOf(definition: AST.Definition): Option[AST.Definition]
Get the parent of a definition
Get the parent of a definition
- definition
The definition whose parent is to be sought.
- returns
optionally, the parent definition of the given definition
- def parentsOf(definition: AST.Definition): Seq[AST.Definition]
Get all parents of a definition
Get all parents of a definition
- definition
The defintiion whose parents are to be sought.
- returns
the sequence of ParentDefOf parents or empty if none.
- def pathOf(definition: AST.Definition): Seq[String]
Get the full path of a definition
Get the full path of a definition
- definition
The definition for which the path name is sought.
- returns
A list of strings from leaf to root giving the names of the definition and its parents.
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated