fdf28b76 |
1 | module Mal |
2 | class Symbol |
3 | property :val |
4 | def initialize(@val) |
5 | end |
6 | end |
7 | |
afc3a8d5 |
8 | class List < Array(Type) |
9 | end |
10 | |
11 | class Vector < Array(Type) |
12 | end |
13 | |
14 | class HashMap < Hash(String, Type) |
15 | end |
16 | |
eec5fc4f |
17 | alias Type = Nil | Bool | Int32 | String | Symbol | List | Vector | HashMap | Proc(Array(Type), Type) |
18 | |
19 | alias Func = Proc(Array(Type), Type) |
afc3a8d5 |
20 | |
21 | class ParseException < Exception |
22 | end |
eec5fc4f |
23 | |
24 | class EvalException < Exception |
25 | end |
fdf28b76 |
26 | end |