com.ossuminc.riddl.passes.symbols.Symbols.scala Maven / Gradle / Ivy
/*
* Copyright 2019 Ossum, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
package com.ossuminc.riddl.passes.symbols
import com.ossuminc.riddl.language.AST.{Definition, NamedValue, Parent, Parents}
import scala.collection.mutable
/** Some common types associated with the AST names of things for brevity; and, used widely */
object Symbols {
type Parentage = mutable.HashMap[NamedValue, Parents]
type ParentStack = mutable.Stack[Parent]
type PathNames = Seq[String]
type SymTabItem = (NamedValue, Parents)
type SymTabItems = Seq[SymTabItem]
type SymTab = mutable.HashMap[String, SymTabItems]
val emptySymTab = mutable.HashMap.empty[String, SymTabItems]
val emptyParentage = mutable.HashMap.empty[NamedValue, Parents]
}