aboutsummaryrefslogtreecommitdiff
path: root/code_obj.moon
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-08-27 13:38:58 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-08-27 13:39:22 -0700
commit930d522fbc3ab57faa926ed85f0d35d661722402 (patch)
tree8c91c71728b43b4e1817ed182c39bf991cb4b2a9 /code_obj.moon
parentc6a7b0be9ebdddb58a03749705987cb3058060d3 (diff)
Bunch of miscellaneous changes. Paved the way a little bit for having
different compiler domains.
Diffstat (limited to 'code_obj.moon')
-rw-r--r--code_obj.moon6
1 files changed, 4 insertions, 2 deletions
diff --git a/code_obj.moon b/code_obj.moon
index 996a228..7752de6 100644
--- a/code_obj.moon
+++ b/code_obj.moon
@@ -86,10 +86,10 @@ class Code
assert(b, "code bit is nil")
assert(not Source\is_instance(b), "code bit is a Source")
if b == '' then continue
- bits[#bits+1] = b
b.dirty = error if b.is_code
if type(b) != 'string' and not (type(b) == 'table' and b.is_code)
b = repr(b)
+ bits[#bits+1] = b
@dirty!
trailing_line_len: =>
@@ -141,8 +141,10 @@ class Code
bits[i] = bits[i-n]
for i=1,n
b = select(i, ...)
- bits[i] = b
b.dirty = error if b.is_code
+ if type(b) != 'string' and not (type(b) == 'table' and b.is_code)
+ b = repr(b)
+ bits[i] = b
@dirty!
parenthesize: =>