diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-02-03 10:59:10 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-02-03 11:00:32 +0000 |
| commit | 1b6da2babfc65c4b8f6f7ac8644c0498e094bab7 (patch) | |
| tree | 61ef0fc20c511cd8936e6af2d889a2ffddab9211 /base.moon | |
| parent | fix error handling again (diff) | |
| download | alive-1b6da2babfc65c4b8f6f7ac8644c0498e094bab7.tar.gz alive-1b6da2babfc65c4b8f6f7ac8644c0498e094bab7.zip | |
Forward references
Diffstat (limited to 'base.moon')
| -rw-r--r-- | base.moon | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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 } |
