Fixing invalid pattern matching and object creation.

This commit is contained in:
Tim Jones
2010-04-26 15:54:47 +12:00
parent 2d1abd099d
commit 8950c3c4c8
8 changed files with 97 additions and 41 deletions

View File

@@ -542,6 +542,7 @@ exports.ObjectNode: class ObjectNode extends BaseNode
join: "\n" if (prop is last_noncom) or (prop instanceof CommentNode)
join: '' if i is @properties.length - 1
indent: if prop instanceof CommentNode then '' else @idt 1
prop: new AssignNode prop, prop, 'object' unless prop instanceof AssignNode
indent + prop.compile(o) + join
props: props.join('')
inner: if props then '\n' + props + '\n' + @idt() else ''