class Myst::Interpreter
- Myst::Interpreter
- Reference
- Object
Defined in:
myst/interpreter.crmyst/interpreter/kernel.cr
myst/interpreter/matcher.cr
myst/interpreter/native_lib/boolean.cr
myst/interpreter/native_lib/file_utils.cr
myst/interpreter/native_lib/float.cr
myst/interpreter/native_lib/integer.cr
myst/interpreter/native_lib/io.cr
myst/interpreter/native_lib/list.cr
myst/interpreter/native_lib/map.cr
myst/interpreter/native_lib/nil.cr
myst/interpreter/native_lib/string.cr
myst/interpreter/native_lib/symbol.cr
myst/interpreter/native_lib/time.cr
myst/interpreter/native_lib/top_level.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/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_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
Macro Summary
-
__disallow_primitives(value, operation = nil)
Primitive types have some restrictions on functionality.
Instance Method Summary
-
#__scopeof(value : Value) : Scope
Resolve the Scope for
value
. -
#__typeof(value : Value)
Resolve the TType object representing the type of
value
. - #bool_eq(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #bool_not_eq(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #bool_to_s(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #callstack : Callstack
- #callstack=(callstack : Callstack)
- #create_kernel : TModule
- #current_scope
- #current_self
- #errput : IO
- #errput=(errput : IO)
- #float_add(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #float_divide(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #float_eq(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #float_gt(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #float_gte(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #float_lt(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #float_lte(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #float_modulo(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #float_multiply(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #float_negate(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #float_not_eq(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #float_subtract(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #float_to_s(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #fs_utils_close(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #fs_utils_open(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #fs_utils_read(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #fs_utils_read_all(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #fs_utils_size(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #fs_utils_write(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #init_boolean(kernel : TModule)
- #init_file_utils(kernel : TModule)
- #init_float(kernel : TModule)
- #init_integer(kernel : TModule)
- #init_io(kernel : TModule)
- #init_list(kernel : TModule)
- #init_map(kernel : TModule)
- #init_nil(kernel : TModule)
- #init_string(kernel : TModule)
- #init_symbol(kernel : TModule)
- #init_time(kernel : TModule)
- #init_top_level(kernel : TModule)
- #input : IO
- #input=(input : IO)
- #int_add(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #int_divide(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #int_eq(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #int_gt(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #int_gte(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #int_lt(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #int_lte(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #int_modulo(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #int_multiply(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #int_negate(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #int_not_eq(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #int_subtract(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #int_to_s(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #io_gets(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #io_print(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #io_puts(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #kernel : TModule
- #kernel=(kernel : TModule)
- #list_access(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #list_access_assign(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #list_add(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #list_each(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #list_eq(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #list_minus(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #list_proper_subset(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #list_size(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #list_splat(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #list_subset(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
-
#load_dirs
The set of directories that should be considered when performing lookups with bare paths (not explicitly relative).
-
#loaded_files : Hash(String, Bool)
A Hash of entries indicating files that have already been loaded.
-
#loaded_files=(loaded_files : Hash(String, Bool))
A Hash of entries indicating files that have already been loaded.
-
#lookup(node)
Lookup a value under the given name in the current scope or one of its ancestors.
- #map_add(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #map_each(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #map_proper_subset(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #map_size(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #map_subset(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #match(pattern : Node, value : Value)
- #mt_exit(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #nil_eq(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #nil_not_eq(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #nil_to_s(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #output : IO
- #output=(output : IO)
- #pop_scope_override(to_size : Int)
- #pop_scope_override
- #pop_self(to_size : Int)
- #pop_self
- #push_scope_override(scope : Scope = Scope.new)
- #push_self(new_self : Value)
- #put_error(error : RuntimeError)
- #raise_not_found(name, value)
-
#recursive_lookup(receiver, name)
Attempt to lookup the given name recursively through the ancestry of the given receiver.
- #run(program)
- #scope_override
- #self_stack : Array(Value)
- #self_stack=(self_stack : Array(Value))
- #stack : Array(Value)
- #stack=(stack : Array(Value))
- #static_time_now(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #string_add(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #string_eq(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #string_multiply(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #string_not_eq(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #string_size(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #string_split(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #string_to_s(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #symbol_eq(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #symbol_not_eq(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #symbol_to_s(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #time_subtract(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #time_to_s(this : Value, __args : Array(Value), block : TFunctor | Nil) : Value
- #visit(node : AnonymousFunction)
-
#visit(node : And)
The result of either expression, in any case, will be the value that determined the result.
- #visit(node : Or)
- #visit(node : Call)
- #visit(node : When)
- #visit(node : Unless)
- #visit(node : Return)
- #visit(node : Break)
- #visit(node : Next)
- #visit(node : Def)
- #visit(node : ExceptionHandler)
- #visit(node : Expressions)
- #visit(node : Extend)
- #visit(node : FunctionCapture)
- #visit(node : Include)
- #visit(node : Instantiation)
- #visit(node : ValueInterpolation)
- #visit(node : ListLiteral)
- #visit(node : MapLiteral)
- #visit(node : InterpolatedStringLiteral)
- #visit(node : Literal)
- #visit(node : While)
- #visit(node : Until)
- #visit(node : MagicConst)
- #visit(node : MatchAssign)
- #visit(node : ModuleDef)
- #visit(node : Nop)
- #visit(node : OpAssign)
- #visit(node : Raise)
- #visit(node : Var)
- #visit(node : IVar)
- #visit(node : Const)
- #visit(node : Underscore)
- #visit(node : Require)
- #visit(node : Self)
- #visit(node : SimpleAssign)
- #visit(node : TypeDef)
- #visit(node : Negation)
- #visit(node : Not)
- #visit(node : Splat)
- #visit(node : Node)
- #visit_and_assign(node : OpAssign)
- #visit_or_assign(node : OpAssign)
- #warn(message : String, node : Node)
- #warnings : Int32
- #warnings=(warnings : Int32)
Constructor Detail
Macro Detail
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.
Instance Method Detail
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.
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.
The set of directories that should be considered when performing lookups with bare paths (not explicitly relative).
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.
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.
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.
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.
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
.