diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-01-01 15:05:58 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-01-01 15:07:10 -0800 |
| commit | b6d3cbd61cd08e39d20a569b7c5ece6bb25897dd (patch) | |
| tree | ccf3930b7a2834ffad1a10a9d91f0042542dec34 /nomsu_compiler.moon | |
| parent | 0760d4fb6495c4aa4f74038457acede5063f514a (diff) | |
Misc changes, including text indented interpolations are now indented
relative to the text, not the opening '("', code objects can now remove
all free vars, the REPL uses global vars. Error API is changing a bit.
Diffstat (limited to 'nomsu_compiler.moon')
| -rw-r--r-- | nomsu_compiler.moon | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nomsu_compiler.moon b/nomsu_compiler.moon index 12a7529..45e863d 100644 --- a/nomsu_compiler.moon +++ b/nomsu_compiler.moon @@ -234,7 +234,7 @@ compile = setmetatable({ entry_lua\add as_lua(v) if needs_comma then lua\add "," if lua\trailing_line_len! + #(entry_lua\text!\match("^[\n]*")) > MAX_LINE - lua\add "\n" + lua\add "\n " elseif needs_comma lua\add " " lua\add entry_lua @@ -322,6 +322,8 @@ compile = setmetatable({ if tree[i].type == "Comment" items_lua\add "\n" sep = '' + elseif items_lua\trailing_line_len! > MAX_LINE + sep = ',\n ' else sep = ', ' i += 1 |
