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.lua | |
| 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.lua')
| -rw-r--r-- | syntax_tree.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/syntax_tree.lua b/syntax_tree.lua index a091e86..2365681 100644 --- a/syntax_tree.lua +++ b/syntax_tree.lua @@ -185,6 +185,14 @@ do stub_bits[#stub_bits] = nil end return concat(stub_bits, " ") + end, + as_var = function(self) + assert(self.type == "Var") + if type(self[1]) == 'string' then + return self[1] + else + return self[1]:get_stub() + end end } _base_0.__index = _base_0 |
