class Ven::Input
- Ven::Input
- Reference
- Object
Included Modules
Defined in:
ven/input.crConstructors
Class Method Summary
-
.context
Returns the class-level (aka common, super-Input) context hub (see
Context::Hub
). -
.run(file, source, until step = :eval, passes = 8)
Makes an instance of
Input
, runs it up to step and returns the result.
Instance Method Summary
-
#distinct : Distinct | Nil
This Input's distinct.
-
#exposes : Array(Array(String))
The distincts this Input exposes.
-
#file : String
The name of the file this Input is in.
-
#inspect : Bool
Whether to run inspector after this input evaluates.
-
#inspect=(inspect : Bool)
Whether to run inspector after this input evaluates.
-
#measure : Bool
Whether to record the timetable.
-
#measure=(measure : Bool)
Whether to record the timetable.
-
#quotes : Array(Ven::Suite::Quote)
This Input's quotes.
-
#run(until step = :eval)
Evaluates this input up until some step.
-
#source : String
The source code for this Input.
-
#timetable : Machine::Timetable | Nil
This Input's timetable.
- #to_s(io)
Constructor Detail
Class Method Detail
Returns the class-level (aka common, super-Input)
context hub (see Context::Hub
).
Makes an instance of Input
, runs it up to step and
returns the result.
puts Input.run("foo", "2 + 2") # 4 : Num
Instance Method Detail
Evaluates this input up until some step.
Raises if step is not a valid step.
a = Input.new("a", "1 + 1")
a.run(:read) # -> Quotes
a.run(:compile) # -> Chunks
a.run(:optimize) # -> Chunks
a.run(:eval) # -> Model