class Cosmo::Scope
- Cosmo::Scope
- Reference
- Object
Defined in:
cosmo/runtime/scope.crConstructors
Instance Method Summary
- #assign(identifier : Token, value : ValueType) : ValueType
- #declare(typedef : Token, identifier : Token, value : ValueType, const : Bool = false, visibility : Visibility = Visibility::Private) : ValueType
- #extend(other : Cosmo::Scope) : Cosmo::Scope
- #lookup(token : Token) : ValueType
- #lookup?(token : Token) : ValueType
- #lookup_at(distance : UInt32, token : Token) : ValueType
- #parent : Cosmo::Scope | Nil
- #parent=(parent : Cosmo::Scope | Nil)
-
#to_s
Returns a nicely readable and concise string representation of this object, typically intended for users.
- #variables : Hash(String, {type: String, value: Cosmo::ValueType, constant: Bool, visibility: Cosmo::AST::Visibility})
- #variables=(variables : Hash(String, NamedTuple(type: String, value: Cosmo::ValueType, constant: Bool, visibility: Cosmo::AST::Visibility)))
Constructor Detail
Instance Method Detail
def declare(typedef : Token, identifier : Token, value : ValueType, const : Bool = false, visibility : Visibility = Visibility::Private) : ValueType
#
def to_s
#
Description copied from class Object
Returns a nicely readable and concise string representation of this object, typically intended for users.
This method should usually not be overridden. It delegates to
#to_s(IO)
which can be overridden for custom implementations.
Also see #inspect
.
def variables : Hash(String, {type: String, value: Cosmo::ValueType, constant: Bool, visibility: Cosmo::AST::Visibility})
#
def variables=(variables : Hash(String, NamedTuple(type: String, value: Cosmo::ValueType, constant: Bool, visibility: Cosmo::AST::Visibility)))
#