Trait

org.bitbucket.inkytonik.kiama.util

Environments

Related Doc: package util

Permalink

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
Visibility
  1. Public
  2. All

Type Members

  1. type Environment = List[Scope]

    Permalink

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

  2. trait Named extends AnyRef

    Permalink

    Support for unique ids for named things.

  3. trait NamedEntity extends Entity with Named

    Permalink

    A named entity.

  4. type Scope = Map[String, Entity]

    Permalink

    A scope maps identifiers to entities.

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

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

    Permalink

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

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

    Permalink

    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.

  8. def enter(env: Environment): Environment

    Permalink

    Enter a new empty scope nested within the given environment.

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

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

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

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

    Permalink

    Pretty-print the environment env.

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

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

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

    Permalink

    Say whether i is defined in any scope of env.

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

    Permalink

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

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

    Permalink

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

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

    Permalink

    Say whether i is defined in the given scope.

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

    Permalink

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

  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. def leave(env: Environment): Environment

    Permalink

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

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

    Permalink

    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.

  23. val nameCounter: Counter

    Permalink

    A counter to count generated names.

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

    Permalink
    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

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

    Permalink

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

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

    Permalink
    Definition Classes
    AnyRef
  29. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped