mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 19:34:27 -05:00
making inner comments work within class definitions
This commit is contained in:
@@ -538,13 +538,14 @@ ClassNode: exports.ClassNode: inherit BaseNode, {
|
||||
ret: del o, 'returns'
|
||||
|
||||
for prop in @properties
|
||||
if prop.variable.base.value is 'constructor'
|
||||
if prop.variable and prop.variable.base.value is 'constructor'
|
||||
func: prop.value
|
||||
func.body.push(new ReturnNode(new LiteralNode('this')))
|
||||
constructor: new AssignNode(@variable, func)
|
||||
else
|
||||
val: new ValueNode(@variable, [new AccessorNode(prop.variable, 'prototype')])
|
||||
prop: new AssignNode(val, prop.value)
|
||||
if prop.variable
|
||||
val: new ValueNode(@variable, [new AccessorNode(prop.variable, 'prototype')])
|
||||
prop: new AssignNode(val, prop.value)
|
||||
props.push prop
|
||||
|
||||
constructor: new AssignNode(@variable, new CodeNode()) unless constructor
|
||||
|
||||
Reference in New Issue
Block a user