org.bitbucket.inkytonik.kiama.util

Environments

trait Environments extends AnyRef

General implementation of environments as stacked scopes. The objects associated with names in environments are of type Entity.

Source
Environments.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Environments
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type Environment = List[Scope]

    An environment is a stack of scopes with the innermost scope on the top.

  2. trait Named extends AnyRef

    Support for unique ids for named things.

  3. trait NamedEntity extends Entity with Named

    A named entity.

  4. type Scope = Map[String, Entity]

    A scope maps identifiers to entities.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def define(env: Environment, i: String, e: Entity): Environment

    Define i to be e in the current scope of env, raising an error if the environment is empty.

  9. def defineIfNew(env: Environment, i: String, e: ⇒ Entity): Environment

    As for define, except if i is already defined in the innermost scope of env, define it to be MultipleEntity instead.

    As for define, except if i is already defined in the innermost scope of env, define it to be MultipleEntity instead. The entity e is only evaluated if needed.

  10. def enter(env: Environment): Environment

    Enter a new empty scope nested within the given environment.

  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def format(env: Environment): String

    Pretty-print the environment env.

  15. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  17. def isDefinedInEnv(env: Environment, i: String): Boolean

    Say whether i is defined in any scope of env.

  18. def isDefinedInInner(env: Environment, i: String): Boolean

    Say whether i is defined in an innermost scope of env (i.

    Say whether i is defined in an innermost scope of env (i.e., in the current scope).

  19. def isDefinedInOuter(env: Environment, i: String): Boolean

    Say whether i is defined in an outer scope of env (i.

    Say whether i is defined in an outer scope of env (i.e., not in the current scope).

  20. def isDefinedInScope(scope: Scope, i: String): Boolean

    Say whether i is defined in the given scope.

  21. def isDefinedInScope(env: Environment, i: String): Boolean

    Say whether i is defined in the current scope of env.

  22. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  23. def leave(env: Environment): Environment

    Leave the outermost scope of the given environment, raising an error if the environment is empty.

  24. def lookup(env: Environment, i: String, e: ⇒ Entity, local: Boolean = false): Entity

    Look up i in env, returning the mapped Entity if there is one, otherwise return e.

    Look up i in env, returning the mapped Entity if there is one, otherwise return e. If local is true, just search the innermost scope, otherwise search outwards in all scopes, returning the first entity found, if any.

  25. val nameCounter: Counter

    A counter to count generated names.

  26. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  29. def rootenv(bindings: (String, Entity)*): Environment

    Create a root environment, i.

    Create a root environment, i.e., one that has a single scope containing the given bindings.

  30. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  31. def toString(): String

    Definition Classes
    AnyRef → Any
  32. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped