Inheritance 通过在coffeescript中定义类继承来使用super,在编译时会出现解析错误

Inheritance 通过在coffeescript中定义类继承来使用super,在编译时会出现解析错误,inheritance,coffeescript,super,parse-error,Inheritance,Coffeescript,Super,Parse Error,我试图在coffeescript中定义一个继承自另一个基类的类,但在编译时遇到了解析错误。Exyctly:第6行上的分析错误:意外',' 我的代码如下所示: class MedVisGraphNode constructor : (@nodeId, @nodeLabel) -> class MedVisGenericContainerNode extends MedVisGraphNode constructor : (groupId, groupLabel, @groupType, @

我试图在coffeescript中定义一个继承自另一个基类的类,但在编译时遇到了解析错误。Exyctly:第6行上的分析错误:意外',' 我的代码如下所示:

class MedVisGraphNode
constructor : (@nodeId, @nodeLabel) ->

class MedVisGenericContainerNode extends MedVisGraphNode
constructor : (groupId, groupLabel, @groupType, @outerGroupNode) ->
    super (groupId, groupLabel)

# method which determines if the actual group-node group lies in an another or sist on top of the hierarchy
isOnTopOfHierarchy = () ->
    return @outerGroupNode == 'undefined'
奇怪的是,当我试图编译一个类似的代码时,它来自于网络:


我得到了相同的解析错误。我现在很困惑,因为我找不到哪里出了问题,请有人给我一个小提示好吗?

或者不要使用括号,或者确保它和
super
之间没有空格:

super 'canine', true
// or
super('canine', true)

你让我开心,非常感谢。没有括号,它的工作没有问题,再次感谢!
super 'canine', true
// or
super('canine', true)