{"id":4493,"date":"2014-03-30T11:43:10","date_gmt":"2014-03-30T11:43:10","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/using-super-by-defining-class-inheritance-in-coffeescript-gives-me-parse-error-when-compiling-collection-of-common-programming-errors\/"},"modified":"2014-03-30T11:43:10","modified_gmt":"2014-03-30T11:43:10","slug":"using-super-by-defining-class-inheritance-in-coffeescript-gives-me-parse-error-when-compiling-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/using-super-by-defining-class-inheritance-in-coffeescript-gives-me-parse-error-when-compiling-collection-of-common-programming-errors\/","title":{"rendered":"using super by defining class-inheritance in coffeescript gives me parse error when compiling-Collection of common programming errors"},"content":{"rendered":"<p>I am trying to define a class inherited from another base-class in coffeescript and I am getting parse-error when compiling. Exyctly : <em>Parse error on line 6: Unexpected &#8216;,&#8217;<\/em> My code looks like :<\/p>\n<pre><code>class MedVisGraphNode\nconstructor : (@nodeId, @nodeLabel) -&gt;\n\nclass MedVisGenericContainerNode extends MedVisGraphNode\nconstructor : (groupId, groupLabel, @groupType, @outerGroupNode) -&gt;\n    super (groupId, groupLabel)\n\n# method which determines if the actual group-node group lies in an another or sist on top of the hierarchy\nisOnTopOfHierarchy = () -&gt;\n    return @outerGroupNode == 'undefined'\n<\/code><\/pre>\n<p>The weird thing is when I try to compile a similar code taken from the web here :<\/p>\n<pre><code>class Animal\nconstructor : (@species, @isMammal=false) -&gt;\n\nclass Dog extends Animal\nconstructor : (@name) -&gt;\n    super (\"canine\",true)\n\ntoString : -&gt;\n    \"#{@name} is a #{@species}.\"\n<\/code><\/pre>\n<p>I am getting the same parse-error. I am very confused now, because i am not able to find what is going wrong, could please someone give me a small hint ?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am trying to define a class inherited from another base-class in coffeescript and I am getting parse-error when compiling. Exyctly : Parse error on line 6: Unexpected &#8216;,&#8217; My code looks like : class MedVisGraphNode constructor : (@nodeId, @nodeLabel) -&gt; class MedVisGenericContainerNode extends MedVisGraphNode constructor : (groupId, groupLabel, @groupType, @outerGroupNode) -&gt; super (groupId, groupLabel) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4493","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4493","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4493"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4493\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}