module Crisp

Extended Modules

Defined in:

crisp/core.cr
crisp/env.cr
crisp/error.cr
crisp/evaluator.cr
crisp/expr.cr
crisp/interpreter.cr
crisp/printer.cr
crisp/reader.cr

Constant Summary

NameSpace = {"+" => calc_op(:+), "-" => calc_op(:-), "*" => calc_op(:*), "/" => calc_op(://), "list" => func(:list), "list?" => func(:"list?"), "empty?" => func(:"empty?"), "count" => func(:count), "=" => rel_op(:==), "<" => rel_op(:<), ">" => rel_op(:>), "<=" => rel_op(:<=), ">=" => rel_op(:>=), "pr-str" => func(:pr_str), "str" => func(:str), "prn" => func(:prn), "println" => func(:println), "read-string" => func(:read_string), "slurp" => func(:slurp), "cons" => func(:cons), "concat" => func(:concat), "nth" => func(:nth), "first" => func(:first), "rest" => func(:rest), "throw" => ->(args : Array(Crisp::Expr)) do raise(Crisp::RuntimeException.new(args[0])) end, "apply" => func(:apply), "map" => func(:map), "nil?" => func(:"nil_value?"), "true?" => func(:"true?"), "false?" => func(:"false?"), "symbol?" => func(:"symbol?"), "symbol" => func(:symbol), "keyword" => func(:keyword), "keyword?" => func(:"keyword?"), "vector" => func(:vector), "vector?" => func(:"vector?"), "hash-map" => func(:hash_map), "map?" => func(:"map?"), "assoc" => func(:assoc), "dissoc" => func(:dissoc), "get" => func(:get), "contains?" => func(:"contains?"), "keys" => func(:keys), "vals" => func(:vals), "sequential?" => func(:"sequential?"), "readline" => func(:readline), "meta" => func(:meta), "with-meta" => func(:with_meta), "atom" => func(:atom), "atom?" => func(:"atom?"), "deref" => func(:deref), "deref" => func(:deref), "reset!" => func(:"reset!"), "swap!" => func(:"swap!"), "conj" => func(:conj), "time-ms" => func(:time_ms)} of String => Crisp::Func

Instance Method Summary

Macro Summary

Instance Method Detail

def apply(args) #

[View source]
def assoc(args) #

[View source]
def atom(args) #

[View source]
def atom?(args) #

[View source]
def concat(args) #

[View source]
def conj(args) #

[View source]
def cons(args) #

[View source]
def contains?(args) #

[View source]
def count(args) #

[View source]
def deref(args) #

[View source]
def dissoc(args) #

[View source]
def empty?(args) #

[View source]
def eval_error(msg) #

[View source]
def false?(args) #

[View source]
def first(args) #

[View source]
def get(args) #

[View source]
def hash_map(args) #

[View source]
def keys(args) #

[View source]
def keyword(args) #

[View source]
def keyword?(args) #

[View source]
def list(args) #

[View source]
def list?(args) #

[View source]
def map(args) #

[View source]
def map?(args) #

[View source]
def meta(args) #

[View source]
def nil_value?(args) #

[View source]
def nth(args) #

[View source]
def parse_error(msg) #

[View source]
def pr_str(args) #

[View source]
def println(args) #

[View source]
def prn(args) #

[View source]
def read_str(str) #

[View source]
def read_string(args) #

[View source]
def readline(args) #

[View source]
def reset!(args) #

[View source]
def rest(args) #

[View source]
def sequential?(args) #

[View source]
def slurp(args) #

[View source]
def str(args) #

[View source]
def swap!(args) #

[View source]
def symbol(args) #

[View source]
def symbol?(args) #

[View source]
def time_ms(args) #

[View source]
def tokenize(str) #

[View source]
def true?(args) #

[View source]
def vals(args) #

[View source]
def vector(args) #

[View source]
def vector?(args) #

[View source]
def with_meta(args) #

[View source]

Macro Detail

macro calc_op(op) #

[View source]
macro func(name) #

Note: Simply using ->self.some_func doesn't work


[View source]
macro rel_op(op) #

[View source]