diff options
Diffstat (limited to 'base.moon')
| -rw-r--r-- | base.moon | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/base.moon b/base.moon new file mode 100644 index 0000000..4fc2c98 --- /dev/null +++ b/base.moon @@ -0,0 +1,32 @@ +class Constant + new: (@value) => + get: => @value + getc: => @value + + __tostring: => "<const: #{@value}>" + +class OP + new: (@node) => + @setup @node\tail! + + patch: (next) => + @node = next + @setup @node\tail! + + update: (dt) => + + get: => @value + getc: => + print "WARN: stream to constant", debug.traceback! + @value + + destroy: => + + __tostring: => "<op: #{@@__name}>" + __inherited: (cls) => + cls.__base.__tostring = @__tostring + +{ + :Constant + :OP +} |
