From 3e89092833a6d407e711fe4ae5f44474ff34cf64 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 1 Jan 2019 17:15:51 -0800 Subject: Some changes to the error API, a fix for statement block parsing, and replacing ((foo 1 baz)'s meaning) with $(foo 1 baz). --- syntax_tree.moon | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'syntax_tree.moon') 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 -- cgit v1.2.3