abstract class Magiika::Scope

Direct Known Subclasses

Defined in:

scope/scope.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(name : String, position : Position | Nil = nil) #

[View source]

Class Method Detail

def self.use(*args, **kwargs, & : self -> R) : R forall R #

[View source]

Instance Method Detail

abstract def assign(name : String, meta : Node::Meta) : Nil #

assign (define or replace) a value


[View source]
def assign(name : String, value : TypeNode) : Nil #

[View source]
def assign(pairs : Hash(String, TypeNode | Node::Meta)) #

[View source]
abstract def cleanup : Nil #

[View source]
abstract def define(name : String, meta : Node::Meta) : Nil #

define a new value


[View source]
def define(name : String, value : TypeNode) : Nil #

[View source]
def define(pairs : Hash(String, TypeNode | Node::Meta)) #

[View source]
abstract def exist?(name : String) : Bool #

[View source]
abstract def exist_here?(name : String) : Bool #

[View source]
abstract def find_base_scope : Scope #

[View source]
def name : String #

[View source]
def name=(name : String) #

[View source]
def position : Position #

[View source]
def position? : Position | Nil #

[View source]
abstract def replace(name : String, meta : Node::Meta) : Nil #

replace an existing value


[View source]
def replace(name : String, value : TypeNode) : Nil #

[View source]
def replace(pairs : Hash(String, TypeNode | Node::Meta)) #

[View source]
def retrieve(name : String) : Node::Meta #

[View source]
abstract def retrieve?(name : String) : Node::Meta | Nil #

[View source]
def retrieve_fn(name : String, args : FnArgs, deep_analysis : Bool = false) : Tuple(MatchResult, Tuple(Node::Fn, Hash(String, Node)) | Nil) #

[View source]
def retrieve_fn?(name : String, args : FnArgs, deep_analysis : Bool = false) : Tuple(MatchResult, Tuple(Node::Fn, Hash(String, Node)) | Nil) | Nil #

[View source]
def seek(&block : Scope -> R) : R | Nil forall R #

[View source]