public class NamedConstantsScope extends java.lang.Object implements ParserScope
Constructor and Description |
---|
NamedConstantsScope(java.util.Map map)
Construct a new scope that contains the given map from names to
value tokens.
|
Modifier and Type | Method and Description |
---|---|
Token |
get(java.lang.String name)
Look up and return the value with the specified name in the
scope.
|
Type |
getType(java.lang.String name)
Look up and return the type of the value with the specified
name in the scope.
|
InequalityTerm |
getTypeTerm(java.lang.String name)
Look up and return the type term for the specified name
in the scope.
|
java.util.Set |
identifierSet()
Return the set of identifiers defined in this scope.
|
public NamedConstantsScope(java.util.Map map)
map
- The map of names to values where the keys are Strings
that name a variable and each key is a Token
.public Token get(java.lang.String name)
get
in interface ParserScope
name
- The name of the variable to be looked up.public Type getType(java.lang.String name)
getType
in interface ParserScope
name
- The name of the variable to be looked up.public InequalityTerm getTypeTerm(java.lang.String name)
getTypeTerm
in interface ParserScope
name
- The name of the variable to be looked up.public java.util.Set identifierSet()
identifierSet
in interface ParserScope