Commit | Line | Data |
---|---|---|
674e1c56 VS |
1 | public class Func extends MalObject |
2 | { | |
3 | "func" => type; | |
4 | Env env; | |
5 | string args[]; | |
6 | MalObject ast; | |
65634b37 | 7 | int isMacro; |
674e1c56 | 8 | |
65634b37 | 9 | fun void init(Env env, string args[], MalObject ast) |
674e1c56 | 10 | { |
65634b37 VS |
11 | env @=> this.env; |
12 | args @=> this.args; | |
13 | ast @=> this.ast; | |
674e1c56 VS |
14 | } |
15 | ||
65634b37 | 16 | fun static Func create(Env env, string args[], MalObject ast) |
674e1c56 VS |
17 | { |
18 | Func func; | |
65634b37 | 19 | func.init(env, args, ast); |
674e1c56 VS |
20 | return func; |
21 | } | |
beb35311 VS |
22 | |
23 | fun MalObject clone() | |
24 | { | |
25 | Func value; | |
26 | ||
27 | this.type => value.type; | |
28 | this.env @=> value.env; | |
29 | this.args @=> value.args; | |
30 | this.ast @=> value.ast; | |
31 | this.isMacro @=> value.isMacro; | |
32 | ||
33 | return value; | |
34 | } | |
674e1c56 | 35 | } |