diff options
| author | Joel Martin <github@martintribe.org> | 2015-02-10 01:34:56 -0600 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2015-02-10 01:34:56 -0600 |
| commit | 53942f889aa103e5ea298b92b7a4fc7d7a133d1a (patch) | |
| tree | a6d2b54452b04dd9ed6185fa1427ab57a078456b /matlab/+types/Function.m | |
| parent | 6a572dff25a95f460d1b3c1b259c7a0a1f10c2d0 (diff) | |
| download | mal-53942f889aa103e5ea298b92b7a4fc7d7a133d1a.tar.gz mal-53942f889aa103e5ea298b92b7a4fc7d7a133d1a.zip | |
matlab: add metadata and atom support.
Diffstat (limited to 'matlab/+types/Function.m')
| -rw-r--r-- | matlab/+types/Function.m | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/matlab/+types/Function.m b/matlab/+types/Function.m index 2f28368..9270ed1 100644 --- a/matlab/+types/Function.m +++ b/matlab/+types/Function.m @@ -5,6 +5,7 @@ classdef Function < handle env params is_macro = false + meta = types.nil; end methods function f = Function(fn, ast, env, params) @@ -13,5 +14,11 @@ classdef Function < handle f.env = env; f.params = params; end + + function ret = clone(obj) + ret = types.Function(obj.fn, obj.ast, obj.env, obj.params); + ret.is_macro = obj.is_macro; + ret.meta = obj.meta; + end end end |
