fixing object/comment printing

This commit is contained in:
Jeremy Ashkenas
2010-02-13 00:24:26 -05:00
parent c9aeae757b
commit dc9cec2611
4 changed files with 6 additions and 6 deletions

View File

@@ -558,7 +558,7 @@
// 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(function(fd) {
posix.open(parser_path, process.O_CREAT | process.O_WRONLY | process.O_TRUNC, parseInt('0755', 8)).addCallback(function(fd) {
return posix.write(fd, js);
});
})();

View File

@@ -661,10 +661,10 @@
prop = __e[i];
__d.push((function() {
join = ",\n";
if (prop === last_noncom || prop instanceof CommentNode) {
if ((prop === last_noncom) || (prop instanceof CommentNode)) {
join = "\n";
}
if (i === non_comments.length - 1) {
if (i === this.properties.length - 1) {
join = '';
}
indent = prop instanceof CommentNode ? '' : this.idt(1);