diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-04-25 16:04:46 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-04-25 16:04:55 -0700 |
| commit | 50a092e4b5cb82131c0c8f6f46c7d21a42198858 (patch) | |
| tree | 2ed0726076e7cd7b8170b139cc3ab07808d763db /lua_obj.moon | |
| parent | cb28f52b410f3fbcb01bcc8ef8668de46d8aba68 (diff) | |
Got nomsu codegen working again.
Diffstat (limited to 'lua_obj.moon')
| -rw-r--r-- | lua_obj.moon | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lua_obj.moon b/lua_obj.moon index 2afe13d..9df218c 100644 --- a/lua_obj.moon +++ b/lua_obj.moon @@ -95,6 +95,7 @@ class Code bits = @bits for i=1,n b = select(i, ...) + assert(b != self, "No recursion please.") bits[#bits+1] = b if type(b) == 'string' if spaces = b\match("\n([ ]*)[^\n]*$") @@ -112,6 +113,7 @@ class Code bits[i] = select(i, ...) @current_indent = 0 for i,b in ipairs(bits) + assert(b != self, "No recursion please.") if type(b) == 'string' if spaces = b\match("\n([ ]*)[^\n]*$") @current_indent = #spaces @@ -245,4 +247,8 @@ class Nomsu extends Code __len: => #tostring(self) + parenthesize: => + @prepend "(" + @append ")" + return {:Code, :Nomsu, :Lua, :Source} |
