class Myst::VM
- Myst::VM
- Reference
- Object
Defined in:
myst/vm.crConstructors
-
.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 Method Summary
- .eval(string_source : String, *, with_stdlib? : Bool = true, use_stdios? : Bool = false, product? : Bool = true)
- .for_content(string_source : String, *, with_stdlib? : Bool = true, use_stdios? : Bool = false, product? : Bool = true)
- .for_file(source_file : String, *, with_stdlib? : Bool = true, use_stdios? : Bool = false, product? : Bool = true)
- .run(source_file : String, *, with_stdlib? : Bool = true, use_stdios? : Bool = false, product? : Bool = true)
Instance Method Summary
- #errput
- #errput=(io : IO)
-
#eval(program : String)
Tries to run the provided string as a myst program
- #input
- #input=(io : IO)
- #interpreter : Myst::Interpreter
- #output
- #output=(io : IO)
- #print_ast(io : IO = STDOUT)
- #program=(program)
- #require(*programs)
- #reset!(with_stdlib? : Bool = @with_stdlib)
-
#run(program : Node)
Standard interface for running a parsed program.
-
#run
Runs the
@program
property -
#run(*programs)
Runs file(s) and IO(s)
- #semantic_visitor : Myst::Semantic::Visitor
- #use_stdios!
-
#use_stdios=(use_stdios : Bool)
Helper method to quickly set all io to std or new
- #use_stdios?
Constructor Detail
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 Method Detail
Instance Method Detail
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.).
Helper method to quickly set all io to std or new