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(*files)
- #reset!
-
#run
Runs the
@source
io -
#run(*files)
Runs file(s)
- #use_stdios!
-
#use_stdios=(use_stdios : Bool)
Helper method to quickly set all io to std or new
- #use_stdios?
Constructor Detail
def self.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 Detail
def self.eval(string_source : String, with_stdlib : Bool = true, use_stdios? : Bool = false, product : Bool = true)
#
def self.for_content(string_source : String, with_stdlib : Bool = true, use_stdios? : Bool = false, product : Bool = true)
#
def self.for_file(source_file : String, with_stdlib : Bool = true, use_stdios? : Bool = false, product : Bool = true)
#
def self.run(source_file : String, with_stdlib : Bool = true, use_stdios? : Bool = false, product : Bool = true)
#