mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
(cosmetic) removing occasional extra linebreaks in JS generated from class definitions.
This commit is contained in:
parent
534e2a25de
commit
c3410e722e
2 changed files with 8 additions and 8 deletions
|
@ -771,10 +771,10 @@
|
|||
}
|
||||
construct = this.idt() + (new AssignNode(this.variable, constructor)).compile(merge(o, {
|
||||
sharedScope: constScope
|
||||
})) + ';\n';
|
||||
props = props.empty() ? '' : props.compile(o) + '\n';
|
||||
extension = extension ? this.idt() + extension.compile(o) + ';\n' : '';
|
||||
returns = this.returns ? new ReturnNode(this.variable).compile(o) : '';
|
||||
})) + ';';
|
||||
props = !props.empty() ? '\n' + props.compile(o) : '';
|
||||
extension = extension ? '\n' + this.idt() + extension.compile(o) + ';' : '';
|
||||
returns = this.returns ? '\n' + new ReturnNode(this.variable).compile(o) : '';
|
||||
return "" + construct + extension + props + returns;
|
||||
};
|
||||
return ClassNode;
|
||||
|
|
|
@ -710,10 +710,10 @@ exports.ClassNode: class ClassNode extends BaseNode
|
|||
props.push prop
|
||||
|
||||
constructor.body.unshift literal "$me = this" if me
|
||||
construct: @idt() + (new AssignNode(@variable, constructor)).compile(merge o, {sharedScope: constScope}) + ';\n'
|
||||
props: if props.empty() then '' else props.compile(o) + '\n'
|
||||
extension: if extension then @idt() + extension.compile(o) + ';\n' else ''
|
||||
returns: if @returns then new ReturnNode(@variable).compile(o) else ''
|
||||
construct: @idt() + (new AssignNode(@variable, constructor)).compile(merge o, {sharedScope: constScope}) + ';'
|
||||
props: if !props.empty() then '\n' + props.compile(o) else ''
|
||||
extension: if extension then '\n' + @idt() + extension.compile(o) + ';' else ''
|
||||
returns: if @returns then '\n' + new ReturnNode(@variable).compile(o) else ''
|
||||
"$construct$extension$props$returns"
|
||||
|
||||
#### AssignNode
|
||||
|
|
Loading…
Add table
Reference in a new issue