class

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

Source

Class methods

eval(string_source : String, *, with_stdlib? : Bool = true, use_stdios? : Bool = false, product? : Bool = true)
Source
for_content(string_source : String, *, with_stdlib? : Bool = true, use_stdios? : Bool = false, product? : Bool = true)
Source
for_file(source_file : String, *, with_stdlib? : Bool = true, use_stdios? : Bool = false, product? : Bool = true)
Source
run(source_file : String, *, with_stdlib? : Bool = true, use_stdios? : Bool = false, product? : Bool = true)
Source

Instance methods

errput
Source
errput=(io : IO)
Source
eval(program : String)

Tries to run the provided string as a myst program

Source
input
Source
input=(io : IO)
Source
interpreter
Source
output
Source
output=(io : IO)
Source
program=(program)
Source
require(*programs)
Source
reset!(with_stdlib? : Bool = @with_stdlib)
Source
run(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.).

Source
run

Runs the @program property

Source
run(*programs)

Runs file(s) and IO(s)

Source
semantic_visitor
Source
use_stdios!
Source
use_stdios=(use_stdios : Bool)

Helper method to quickly set all io to std or new

Source
use_stdios?
Source