mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-19 03:44:23 -05:00
fixing object/comment printing
This commit is contained in:
@@ -456,5 +456,5 @@ js: parser.generate()
|
||||
# puts parser.generate()
|
||||
posix: require 'posix'
|
||||
parser_path: 'lib/coffee_script/parser.js'
|
||||
posix.open(parser_path, process.O_CREAT | process.O_WRONLY | process.O_TRUNC, 0755).addCallback (fd) ->
|
||||
posix.open(parser_path, process.O_CREAT | process.O_WRONLY | process.O_TRUNC, parseInt('0755', 8)).addCallback (fd) ->
|
||||
posix.write(fd, js)
|
||||
|
||||
@@ -511,8 +511,8 @@ ObjectNode: exports.ObjectNode: inherit Node, {
|
||||
last_noncom: non_comments[non_comments.length - 1]
|
||||
props: for prop, i in @properties
|
||||
join: ",\n"
|
||||
join: "\n" if prop is last_noncom or prop instanceof CommentNode
|
||||
join: '' if i is non_comments.length - 1
|
||||
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)
|
||||
indent + prop.compile(o) + join
|
||||
props: props.join('')
|
||||
|
||||
Reference in New Issue
Block a user