scalan.meta.SSymName.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sigma-state_2.12 Show documentation
Show all versions of sigma-state_2.12 Show documentation
Interpreter of a Sigma-State language
The newest version!
package scalan.meta
import sigma.util.StringUtil.StringUtilExtensions
case class ImportItem(packageName: String, importedNames: List[String])
case class SSymName(packageName: String, name: String) {
import SSymName._
def this(name: String) = this("", name)
def mkFullName = fullNameString(packageName, name)
def isImportedBy(item: ImportItem): Boolean = {
if (packageName != item.packageName) return false
item.importedNames.contains(SSymName.ImportAllWildcard) || item.importedNames.contains(name)
}
}
object SSymName {
/** Wildcard character used to signify imporing all names from namespace */
val ImportAllWildcard = "*"
def fullNameString(packageName: String, name: String): String =
if (packageName.isNullOrEmpty) name else s"$packageName.$name"
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy