case class Scope(variables: Map[Identifier, Expression], parent: Option[Scope]) extends Product with Serializable
Represents a scope within the language containing declared variables as well as the parent scope if it exists.
- variables
The variables associated with the scope
- parent
Some scope if a parent exists, otherwise None
- Alphabetic
- By Inheritance
- Scope
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Scope(variables: Map[Identifier, Expression], parent: Option[Scope])
- variables
The variables associated with the scope
- parent
Some scope if a parent exists, otherwise None
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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
findVariable(identifier: Identifier): Option[Expression]
Retrieves the variable with the associated identifier, recursing through parent scopes until the variable is found.
Retrieves the variable with the associated identifier, recursing through parent scopes until the variable is found.
- identifier
The identifier for the variable to look up
- returns
Some variable value if found, otherwise None
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isRoot: Boolean
Indicates whether or not this scope is a root scope.
Indicates whether or not this scope is a root scope.
- returns
True if this scope has no parent, otherwise false
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- val parent: Option[Scope]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val variables: Map[Identifier, Expression]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )