class Lit::LitMap

Defined in:

lit/stdlib/lit_map.cr

Constant Summary

TYPE = Type.new("Map", {} of String => Function)

Constructors

Instance Method Summary

Instance methods inherited from class Lit::Instance

call_method(name, arguments, interpreter) call_method, get(name) get, get_method(name) : Callable | Nil get_method, set(name, value) set, to_s(interpreter, token) : String to_s, type : Lit::Type type

Constructor methods inherited from class Lit::Instance

new(type : Type, fields : Hash(String, Bool | Float64 | Int64 | ::Lit::Callable | ::Lit::Instance | ::Lit::Uninitialized | String | Nil) = {} of String => Value) new

Constructor Detail

def self.new(elements : Hash(Bool | Float64 | Int64 | ::Lit::Callable | ::Lit::Instance | ::Lit::Uninitialized | String | Nil, Bool | Float64 | Int64 | ::Lit::Callable | ::Lit::Instance | ::Lit::Uninitialized | String | Nil) = {} of Value => Value) #

[View source]

Instance Method Detail

def elements : Hash(Value, Value) #

[View source]
def get(name : Token) : Value #

[View source]
def set(name : Token, value : Value) #

[View source]