aboutsummaryrefslogtreecommitdiffstats
path: root/base.moon
diff options
context:
space:
mode:
Diffstat (limited to 'base.moon')
-rw-r--r--base.moon9
1 files changed, 8 insertions, 1 deletions
diff --git a/base.moon b/base.moon
index fc9f885..0404e3d 100644
--- a/base.moon
+++ b/base.moon
@@ -34,6 +34,12 @@ class Macro
__tostring: => "<macro: #{@@__name}>"
__inherited: (cls) => cls.__base.__tostring = @__tostring
+class Forward
+ new: (@node) =>
+
+ get: => (assert @node.value, "node never patched!")\get!
+ getc: => (assert @node.value, "node never patched!")\getc!
+
class Const
types = {
sym: true
@@ -78,7 +84,7 @@ class Const
switch ancestor klass
when Op then 'op'
when Scope then 'scope'
- when Const
+ when Const, Forward
return val
else
error "#{name}: cannot wrap '#{klass.__name}' instance"
@@ -93,5 +99,6 @@ class Const
{
:Op
:Macro
+ :Forward
:Const
}