diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-01-01 17:15:51 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-01-01 17:17:23 -0800 |
| commit | 3e89092833a6d407e711fe4ae5f44474ff34cf64 (patch) | |
| tree | 5ffe2df86f648b604347b59999992d74f71a796c /syntax_tree.moon | |
| parent | e68eb04d690454428216a0f0f1b11399feeb7dc1 (diff) | |
Some changes to the error API, a fix for statement block parsing, and
replacing ((foo 1 baz)'s meaning) with $(foo 1 baz).
Diffstat (limited to 'syntax_tree.moon')
| -rw-r--r-- | syntax_tree.moon | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/syntax_tree.moon b/syntax_tree.moon index 2579fad..ba854e1 100644 --- a/syntax_tree.moon +++ b/syntax_tree.moon @@ -99,6 +99,13 @@ class SyntaxTree stub_bits[#stub_bits] = nil return concat stub_bits, " " + as_var: => + assert(@type == "Var") + if type(@[1]) == 'string' + return @[1] + else + return @[1]\get_stub! + @is_instance: (t)=> type(t) == 'table' and getmetatable(t) == @__base |
