class

Ven::Machine

Inherits Ven::Visitor / Reference / Object

Constants

MAX_TRACE = 500

Maximum amount of traces before we die of recursion

Constructors

Class methods

from(tree : Quotes, scope : Context)
Source

Instance methods

binary(operator, left : Model, right : Model)

The gateway to binary operations machinery.

Source
compute(operator, left : Model, right : Model)

Interpret the binary operations.

Source
die(message : String, scope : Context)
Source
false?(model : Model) : Bool

false? is the helper identity contexts and statements use to check if a thing is falsey. Note that it returns Crystal's bool, not Ven's.

Source
normalize!(operator, left : Model, right : Model)

Return a tuple {left, right} where left, right are normalized left, right (i.e., converted according to the specification, which can be found in normalize?)

Source
normalize?(operator, left : Model, right : Model)

True if left and right need normalization to be used with operator

Source
str2num(str : String)
Source
unary(operator, operand : Model)
Source
visit!(q : QSymbol, scope)
Source
visit!(q : QNumber, scope)
Source
visit!(q : QString, scope)
Source
visit!(q : QVector, scope)
Source
visit!(q : QUnary, scope)
Source
visit!(q : QBinary, scope)
Source
visit!(q : QIntoBool, scope)
Source
visit!(q : QBinarySpread, scope)
Source
visit!(q : QLambdaSpread, scope)
Source
visit!(q : QInlineWhen, scope)
Source
visit!(q : QAssign, scope)
Source
visit!(q : QBasicFun, scope)
Source
visit!(q : QCall, scope)
Source

Macros

die(message)
Source