aboutsummaryrefslogtreecommitdiffstats
path: root/base.moon
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-01-31 13:54:19 +0000
committers-ol <s-ol@users.noreply.github.com>2020-01-31 13:54:19 +0000
commit227c2f0ed83dda049173700ebfa39b664cc84065 (patch)
tree38057dfb393a89f7de6b8fdeb822adac8e34e222 /base.moon
parentmore types &c (diff)
downloadalive-227c2f0ed83dda049173700ebfa39b664cc84065.tar.gz
alive-227c2f0ed83dda049173700ebfa39b664cc84065.zip
comments, actual working things
Diffstat (limited to 'base.moon')
-rw-r--r--base.moon32
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
+}