Myst::VM
Inherits Reference / Object
Constructors
new(source : IO = IO::Memory.new, *, source_name : String = "eval_input", with_stdlib? : Bool = true, use_stdios? : Bool = false, product? : Bool = true)
This constructor is not really meant to be called unless you're initializing an "empty" vm
Instead for_file and for_content should be used
Many of these parameters would be rarely used
All having default values, i don't really think the amount of parameters is a problem
Class methods
eval(string_source : String, *, with_stdlib? : Bool = true, use_stdios? : Bool = false, product? : Bool = true)
Sourcefor_content(string_source : String, *, with_stdlib? : Bool = true, use_stdios? : Bool = false, product? : Bool = true)
SourceInstance methods
errput
Sourceerrput=(io : IO)
Sourceinput
Sourceinput=(io : IO)
Sourceinterpreter
Sourceoutput
Sourceoutput=(io : IO)
Sourceprint_ast(io : IO = STDOUT)
Sourceprogram=(program)
Sourcerequire(*programs)
Sourcerun(program : Node)
Standard interface for running a parsed program. Using this interface ensures that every program goes through the proper phases of interpretation (semantic analysis, interpretation, etc.).
semantic_visitor
Sourceuse_stdios!
Sourceuse_stdios?
Source