class Myst::Interpreter

Defined in:

myst/interpreter.cr
myst/interpreter/kernel.cr
myst/interpreter/matcher.cr
myst/interpreter/native_lib/boolean.cr
myst/interpreter/native_lib/env.cr
myst/interpreter/native_lib/file.cr
myst/interpreter/native_lib/float.cr
myst/interpreter/native_lib/functor.cr
myst/interpreter/native_lib/integer.cr
myst/interpreter/native_lib/io.cr
myst/interpreter/native_lib/io/file_descriptor.cr
myst/interpreter/native_lib/list.cr
myst/interpreter/native_lib/map.cr
myst/interpreter/native_lib/nil.cr
myst/interpreter/native_lib/object.cr
myst/interpreter/native_lib/random.cr
myst/interpreter/native_lib/string.cr
myst/interpreter/native_lib/symbol.cr
myst/interpreter/native_lib/tcp_socket.cr
myst/interpreter/native_lib/time.cr
myst/interpreter/native_lib/top_level.cr
myst/interpreter/native_lib/type.cr
myst/interpreter/nodes/anonymous_function.cr
myst/interpreter/nodes/binary_ops.cr
myst/interpreter/nodes/call.cr
myst/interpreter/nodes/conditionals.cr
myst/interpreter/nodes/control_exprs.cr
myst/interpreter/nodes/def.cr
myst/interpreter/nodes/doc.cr
myst/interpreter/nodes/exception_handler.cr
myst/interpreter/nodes/expressions.cr
myst/interpreter/nodes/extend.cr
myst/interpreter/nodes/function_capture.cr
myst/interpreter/nodes/include.cr
myst/interpreter/nodes/instantiation.cr
myst/interpreter/nodes/interpolation.cr
myst/interpreter/nodes/literals.cr
myst/interpreter/nodes/loops.cr
myst/interpreter/nodes/magic_const.cr
myst/interpreter/nodes/match.cr
myst/interpreter/nodes/match_assign.cr
myst/interpreter/nodes/module_def.cr
myst/interpreter/nodes/nop.cr
myst/interpreter/nodes/op_assign.cr
myst/interpreter/nodes/raise.cr
myst/interpreter/nodes/references.cr
myst/interpreter/nodes/require.cr
myst/interpreter/nodes/self.cr
myst/interpreter/nodes/simple_assign.cr
myst/interpreter/nodes/type_def.cr
myst/interpreter/nodes/unary_ops.cr
myst/interpreter/util.cr

Constructors

Class Method Summary

Instance Method Summary

Macro Summary

Constructor Detail

def self.new(input : IO = STDIN, output : IO = STDOUT, errput : IO = STDERR) #

[View source]

Class Method Detail

def self.__value_from_literal(literal : Node) #

[View source]

Instance Method Detail

def __make_type(name : String, lexical_scope : Scope | Nil, parent_type = @base_type) #

Create a new, fully initialized TType object. This takes care of setting the lexical scope, inheriting from the base type and more.


[View source]
def __raise_not_found(name, value : MTValue | Nil) #

[View source]
def __raise_runtime_error(message : String) #

Raise a RuntimeError from the current location. Execution is immediataly halted and the interpreter will panic up until a rescuer is found.

Multiple overloads of this function are provided for simplicity at the call site.


[View source]
def __raise_runtime_error(value : MTValue) #

[View source]
def __raise_runtime_error(error : RuntimeError) #

[View source]
def __scopeof(value : MTValue, prefer_instance_scope = false) : Scope #

Resolve the Scope for value. For primitives, this returns the instance scope of the Type for that value. For Instances, Types, and Modules, this just returns .scope for that value.


[View source]
def __typeof(value : MTValue) #

Resolve the TType object representing the type of value. For primitive types, these are always looked up in the Kernel. For Instances, the type is looked up from the type reference on the instance itself. For Types and Modules, the value itself is returned.


[View source]
def base_object : TType #

The true base type of every object in Myst.


[View source]
def base_object=(base_object : TType) #

The true base type of every object in Myst.


[View source]
def base_type : TType #

The base Type for all type objects.


[View source]
def base_type=(base_type : TType) #

The base Type for all type objects.


[View source]
def bool_eq(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def bool_not_eq(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def bool_to_s(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def callstack : Callstack #

Current stack of method calls/code blocks at any point in the interpreter.


[View source]
def callstack=(callstack : Callstack) #

Current stack of method calls/code blocks at any point in the interpreter.


[View source]
def create_kernel : TModule #

[View source]
def current_scope #

[View source]
def current_self #

[View source]
def doc_table : Hash(MTValue, DocComment) #

A mapping of values to documentation about that value. Mostly applied to modules, types, and methods.


[View source]
def doc_table=(doc_table : Hash(MTValue, DocComment)) #

A mapping of values to documentation about that value. Mostly applied to modules, types, and methods.


[View source]
def env_assign(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def env_delete(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def env_fetch(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def env_get(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def env_keys(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def env_values(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def errput #

[View source]
def errput=(other) #

[View source]
def fd_pool : Hash(Int32, IO) #

The pool of open file descriptors used to avoid duplicating entries.


[View source]
def file_close(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def file_init(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def file_size(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def float_add(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def float_divide(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def float_eq(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def float_gt(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def float_gte(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def float_lt(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def float_lte(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def float_modulo(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def float_multiply(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def float_negate(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def float_not_eq(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def float_round(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def float_subtract(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def float_to_i(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def float_to_s(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def func_to_s(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def init_base_object #

[View source]
def init_base_type #

[View source]
def init_boolean #

[View source]
def init_env #

[View source]
def init_file(fd_type : TType) #

[View source]
def init_file_descriptor(io_type : TType) #

[View source]
def init_float #

[View source]
def init_functor #

[View source]
def init_integer #

[View source]
def init_io #

[View source]
def init_list #

[View source]
def init_map #

[View source]
def init_nil #

[View source]
def init_random #

[View source]
def init_string #

[View source]
def init_symbol #

[View source]
def init_tcp_socket(io_type) #

[View source]
def init_time #

[View source]
def init_top_level #

[View source]
def input #

[View source]
def input=(other) #

[View source]
def int_add(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def int_divide(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def int_eq(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def int_gt(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def int_gte(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def int_lt(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def int_lte(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def int_modulo(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def int_multiply(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def int_negate(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def int_not_eq(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def int_subtract(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def int_to_f(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def int_to_s(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def io_fd_init(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def io_fd_read(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def io_fd_write(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def io_read(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def io_write(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def kernel : TModule #

The Kernel module for this instance of the interpreter.


[View source]
def kernel=(kernel : TModule) #

The Kernel module for this instance of the interpreter.


[View source]
def list_access(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def list_access_assign(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def list_add(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def list_each(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def list_eq(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def list_minus(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def list_not_eq(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def list_pop(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def list_proper_subset(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def list_push(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def list_shift(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def list_size(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def list_splat(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def list_subset(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def list_unshift(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def load_dirs #

The set of directories that should be considered when performing lookups with bare paths (not explicitly relative).


[View source]
def loaded_files : Hash(String, Bool) #

A Hash of entries indicating files that have already been loaded. Entries in this Hash should always be absolute paths to avoid ambiguity between relative paths that resolve to the same file.


[View source]
def loaded_files=(loaded_files : Hash(String, Bool)) #

A Hash of entries indicating files that have already been loaded. Entries in this Hash should always be absolute paths to avoid ambiguity between relative paths that resolve to the same file.


[View source]
def lookup(node) #

Lookup a value under the given name in the current scope or one of its ancestors. If the value is not found, a No variable or method RuntimeError will be raised.


[View source]
def map_access(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def map_access_assign(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def map_add(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def map_each(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def map_eq(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def map_not_eq(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def map_proper_subset(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def map_size(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def map_subset(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def match(pattern : Node, value : MTValue) #

[View source]
def mt_doc(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def mt_exit(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def mt_sleep(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def nil_eq(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def nil_not_eq(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def nil_to_s(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def obj_eq(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def obj_not_eq(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def obj_to_s(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def output #

[View source]
def output=(other) #

[View source]
def passthrough_ENV_clear(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

def passthrough_ENV_has_key?(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

def passthrough_File_basename(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

def passthrough_File_chmod(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

def passthrough_File_delete(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

def passthrough_File_directory?(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

def passthrough_File_dirname(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

def passthrough_File_empty?(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

def passthrough_File_executable?(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

def passthrough_File_exists?(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

def passthrough_File_expand_path(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

def passthrough_File_extname(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

def passthrough_File_file?(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

def passthrough_File_link(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def passthrough_File_read(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

def passthrough_File_readable?(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

def passthrough_File_real_path(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

def passthrough_File_rename(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def passthrough_File_size(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def passthrough_File_symlink(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def passthrough_File_symlink?(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

def passthrough_File_touch(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

def passthrough_File_writable?(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

def passthrough_File_write(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def pop_callstack(to_size : Int) #

[View source]
def pop_scope_override(to_size : Int) #

[View source]
def pop_scope_override #

[View source]
def pop_self(to_size : Int) #

[View source]
def pop_self #

[View source]
def push_scope_override(scope : Scope = Scope.new) #

[View source]
def push_self(new_self : MTValue) #

[View source]
def put_error(error : RuntimeError) #

[View source]
def random_rand(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def recursive_lookup(receiver, name, check_current = true) #

Attempt to lookup the given name recursively through the ancestry of the given receiver. This is mainly used for method lookup, where the simple #lookup method does not search deep enough for a value.

The method will return nil if no matching entry is found.


[View source]
def run(program, capture_errors = true) #

[View source]
def scope_override #

[View source]
def scope_stack : Array(Scope) #

Stack of scopes representing the current lexical scope.


[View source]
def scope_stack=(scope_stack : Array(Scope)) #

Stack of scopes representing the current lexical scope.


[View source]
def self_stack : Array(MTValue) #

Value stack representing the current receiver value for operations.


[View source]
def self_stack=(self_stack : Array(MTValue)) #

Value stack representing the current receiver value for operations.


[View source]
def stack : Array(MTValue) #

Value stack the the interpreter uses to pass around arguments and values.


[View source]
def stack=(stack : Array(MTValue)) #

Value stack the the interpreter uses to pass around arguments and values.


[View source]
def static_File_each_line(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def static_File_join(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def static_File_lines(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def static_time_now(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def static_type_ancestors(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def static_type_eq(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def static_type_not_eq(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def static_type_to_s(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def string_add(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def string_at(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def string_chars(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def string_chomp(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def string_downcase(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def string_eq(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def string_includes?(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def string_lstrip(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def string_multiply(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def string_not_eq(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def string_reverse(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def string_rstrip(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def string_size(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def string_split(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def string_strip(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def string_to_f(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def string_to_i(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def string_to_s(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def string_upcase(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def symbol_eq(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def symbol_not_eq(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def symbol_to_s(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def tcp_socket_init(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def tcp_socket_read(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def tcp_socket_write(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def time_to_s(this : MTValue, __args : Array(MTValue), block : TFunctor | Nil) : MTValue #

[View source]
def visit(node : AnonymousFunction) #

[View source]
def visit(node : And) #

The result of either expression, in any case, will be the value that determined the result. i.e., in the expression true && false, the result will be false, while nil && false will result in nil.


[View source]
def visit(node : Or) #

[View source]
def visit(node : Call) #

[View source]
def visit(node : When) #

[View source]
def visit(node : Unless) #

[View source]
def visit(node : Return) #

[View source]
def visit(node : Break) #

[View source]
def visit(node : Next) #

[View source]
def visit(node : Def) #

[View source]
def visit(node : DocComment) #

[View source]
def visit(node : ExceptionHandler) #

[View source]
def visit(node : Expressions) #

[View source]
def visit(node : Extend) #

[View source]
def visit(node : FunctionCapture) #

[View source]
def visit(node : Include) #

[View source]
def visit(node : Instantiation) #

[View source]
def visit(node : ValueInterpolation) #

[View source]
def visit(node : ListLiteral) #

[View source]
def visit(node : MapLiteral) #

[View source]
def visit(node : InterpolatedStringLiteral) #

[View source]
def visit(node : Literal) #

[View source]
def visit(node : While) #

[View source]
def visit(node : Until) #

[View source]
def visit(node : MagicConst) #

[View source]
def visit(node : Match) #

Matches are syntax sugar for the creation and immediate invocation of an anonymous function. As such, they can be re-written into a Call of an AnonymousFunction node. For example: match x, y ->(true) { } ->(false) { } ->(_) { } end would be expanded to (fn ->(true) { } ->(false) { } ->(_) { } end)(x, y) which is semantically equivalent.


[View source]
def visit(node : MatchAssign) #

[View source]
def visit(node : ModuleDef) #

[View source]
def visit(node : Nop) #

[View source]
def visit(node : OpAssign) #

[View source]
def visit(node : Raise) #

[View source]
def visit(node : Var) #

[View source]
def visit(node : IVar) #

[View source]
def visit(node : Const) #

[View source]
def visit(node : Underscore) #

[View source]
def visit(node : Require) #

[View source]
def visit(node : Self) #

[View source]
def visit(node : SimpleAssign) #

[View source]
def visit(node : TypeDef) #

[View source]
def visit(node : Negation) #

[View source]
def visit(node : Not) #

[View source]
def visit(node : Splat) #

[View source]
def visit(node : Node) #

[View source]
def visit_and_assign(node : OpAssign) #

[View source]
def visit_or_assign(node : OpAssign) #

[View source]
def warn(message : String, node : Node) #

[View source]
def warnings : Int32 #

The number of warnings generated by execution of programs.


[View source]
def warnings=(warnings : Int32) #

The number of warnings generated by execution of programs.


[View source]

Macro Detail

macro __disallow_primitives(value, operation = nil) #

Primitive types have some restrictions on functionality. This method will raise an appropriate error if the given value is a primitive. If operation is given, it will be used as the error message.


[View source]