homunculus
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "homunculus", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "A lexer&parser by Javascript", | ||
@@ -5,0 +5,0 @@ "maintainers": [ |
@@ -320,3 +320,3 @@ var IParser = require('../Parser'); | ||
case 'switch': | ||
return this.swchstmt(yYield); | ||
return this.swchstmt(yYield, isConstructor); | ||
case 'throw': | ||
@@ -850,3 +850,3 @@ return this.thrstmt(yYield); | ||
}, | ||
swchstmt: function(yYield) { | ||
swchstmt: function(yYield, isConstructor) { | ||
var node = new Node(Node.SWCHSTMT); | ||
@@ -858,7 +858,7 @@ node.add( | ||
this.match(')'), | ||
this.caseblock(yYield) | ||
this.caseblock(yYield, isConstructor) | ||
); | ||
return node; | ||
}, | ||
caseblock: function(yYield) { | ||
caseblock: function(yYield, isConstructor) { | ||
var node = new Node(Node.CASEBLOCK); | ||
@@ -868,6 +868,6 @@ node.add(this.match('{')); | ||
if(this.look.content() == 'case') { | ||
node.add(this.caseclause(yYield)); | ||
node.add(this.caseclause(yYield, isConstructor)); | ||
} | ||
else if(this.look.content() == 'default') { | ||
node.add(this.dftclause(yYield)); | ||
node.add(this.dftclause(yYield, isConstructor)); | ||
} | ||
@@ -881,3 +881,3 @@ else { | ||
}, | ||
caseclause: function(yYield) { | ||
caseclause: function(yYield, isConstructor) { | ||
var node = new Node(Node.CASECLAUSE); | ||
@@ -893,7 +893,7 @@ node.add( | ||
&& this.look.content() != '}') { | ||
node.add(this.stmt(yYield)); | ||
node.add(this.stmtlitem(yYield, isConstructor)); | ||
} | ||
return node; | ||
}, | ||
dftclause: function(yYield) { | ||
dftclause: function(yYield, isConstructor) { | ||
var node = new Node(Node.DFTCLAUSE); | ||
@@ -912,3 +912,3 @@ node.add( | ||
while(this.look && this.look.content() != '}') { | ||
node.add(this.stmt(yYield)); | ||
node.add(this.stmtlitem(yYield, isConstructor)); | ||
} | ||
@@ -915,0 +915,0 @@ return node; |
@@ -320,3 +320,3 @@ define(function(require, exports, module) {var IParser = require('../Parser'); | ||
case 'switch': | ||
return this.swchstmt(yYield); | ||
return this.swchstmt(yYield, isConstructor); | ||
case 'throw': | ||
@@ -850,3 +850,3 @@ return this.thrstmt(yYield); | ||
}, | ||
swchstmt: function(yYield) { | ||
swchstmt: function(yYield, isConstructor) { | ||
var node = new Node(Node.SWCHSTMT); | ||
@@ -858,7 +858,7 @@ node.add( | ||
this.match(')'), | ||
this.caseblock(yYield) | ||
this.caseblock(yYield, isConstructor) | ||
); | ||
return node; | ||
}, | ||
caseblock: function(yYield) { | ||
caseblock: function(yYield, isConstructor) { | ||
var node = new Node(Node.CASEBLOCK); | ||
@@ -868,6 +868,6 @@ node.add(this.match('{')); | ||
if(this.look.content() == 'case') { | ||
node.add(this.caseclause(yYield)); | ||
node.add(this.caseclause(yYield, isConstructor)); | ||
} | ||
else if(this.look.content() == 'default') { | ||
node.add(this.dftclause(yYield)); | ||
node.add(this.dftclause(yYield, isConstructor)); | ||
} | ||
@@ -881,3 +881,3 @@ else { | ||
}, | ||
caseclause: function(yYield) { | ||
caseclause: function(yYield, isConstructor) { | ||
var node = new Node(Node.CASECLAUSE); | ||
@@ -893,7 +893,7 @@ node.add( | ||
&& this.look.content() != '}') { | ||
node.add(this.stmt(yYield)); | ||
node.add(this.stmtlitem(yYield, isConstructor)); | ||
} | ||
return node; | ||
}, | ||
dftclause: function(yYield) { | ||
dftclause: function(yYield, isConstructor) { | ||
var node = new Node(Node.DFTCLAUSE); | ||
@@ -912,3 +912,3 @@ node.add( | ||
while(this.look && this.look.content() != '}') { | ||
node.add(this.stmt(yYield)); | ||
node.add(this.stmtlitem(yYield, isConstructor)); | ||
} | ||
@@ -915,0 +915,0 @@ return node; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
643324
87