homunculus
Advanced tools
Comparing version 0.5.1 to 0.5.2
{ | ||
"name": "homunculus", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "A lexer&parser by Javascript", | ||
@@ -5,0 +5,0 @@ "maintainers": [ |
@@ -1011,5 +1011,2 @@ var IParser = require('../Parser'); | ||
}, | ||
sfnparams: function() { | ||
return this.fmparams(); | ||
}, | ||
fmparams: function() { | ||
@@ -1020,11 +1017,16 @@ var node = new Node(Node.FMPARAMS); | ||
} | ||
while(this.look && this.look.content() != ')') { | ||
if(this.look.content() == '...') { | ||
break; | ||
} | ||
else { | ||
node.add(this.bindelem(true)); | ||
if(this.look && this.look.content() == ',') { | ||
node.add(this.match()); | ||
if(this.look.content() != ')') { | ||
while(this.look) { | ||
if(this.look.content() == '...') { | ||
break; | ||
} | ||
else { | ||
node.add(this.bindelem(true)); | ||
if(this.look && this.look.content() == ')') { | ||
break; | ||
} | ||
if(this.look && this.look.content() == ',') { | ||
node.add(this.match()); | ||
} | ||
} | ||
} | ||
@@ -2136,12 +2138,17 @@ } | ||
} | ||
else { | ||
while(this.look && this.look.content() != ')') { | ||
else if(this.look && this.look.content() != ')') { | ||
while(this.look) { | ||
node.add(this.assignexpr()); | ||
if(this.look && this.look.content() == ',') { | ||
node.add(this.match()); | ||
if(this.look && this.look.content() == '...') { | ||
node.add( | ||
this.match(), | ||
this.assignexpr() | ||
); | ||
if(this.look) { | ||
if(this.look.content() == ',') { | ||
node.add(this.match()); | ||
if(this.look && this.look.content() == '...') { | ||
node.add( | ||
this.match(), | ||
this.assignexpr() | ||
); | ||
break; | ||
} | ||
} | ||
else if(this.look.content() == ')') { | ||
break; | ||
@@ -2148,0 +2155,0 @@ } |
@@ -522,6 +522,11 @@ var IParser = require('../Parser'); | ||
var node = new Node(Node.FNPARAMS); | ||
while(this.look && this.look.content() != ')') { | ||
while(this.look) { | ||
node.add(this.match(Token.ID, 'missing formal parameter')); | ||
if(this.look && this.look.content() == ',') { | ||
node.add(this.match()); | ||
if(this.look) { | ||
if(this.look.content() == ',') { | ||
node.add(this.match()); | ||
} | ||
else if(this.look.content() == ')') { | ||
break; | ||
} | ||
} | ||
@@ -1125,6 +1130,11 @@ } | ||
var node = new Node(Node.ARGLIST); | ||
while(this.look && this.look.content() != ')') { | ||
while(this.look) { | ||
node.add(this.assignexpr()); | ||
if(this.look && this.look.content() == ',') { | ||
node.add(this.match()); | ||
if(this.look) { | ||
if(this.look.content() == ',') { | ||
node.add(this.match()); | ||
} | ||
else if(this.look.content() == ')') { | ||
break; | ||
} | ||
} | ||
@@ -1131,0 +1141,0 @@ } |
@@ -1011,5 +1011,2 @@ define(function(require, exports, module) {var IParser = require('../Parser'); | ||
}, | ||
sfnparams: function() { | ||
return this.fmparams(); | ||
}, | ||
fmparams: function() { | ||
@@ -1020,11 +1017,16 @@ var node = new Node(Node.FMPARAMS); | ||
} | ||
while(this.look && this.look.content() != ')') { | ||
if(this.look.content() == '...') { | ||
break; | ||
} | ||
else { | ||
node.add(this.bindelem(true)); | ||
if(this.look && this.look.content() == ',') { | ||
node.add(this.match()); | ||
if(this.look.content() != ')') { | ||
while(this.look) { | ||
if(this.look.content() == '...') { | ||
break; | ||
} | ||
else { | ||
node.add(this.bindelem(true)); | ||
if(this.look && this.look.content() == ')') { | ||
break; | ||
} | ||
if(this.look && this.look.content() == ',') { | ||
node.add(this.match()); | ||
} | ||
} | ||
} | ||
@@ -2136,12 +2138,17 @@ } | ||
} | ||
else { | ||
while(this.look && this.look.content() != ')') { | ||
else if(this.look && this.look.content() != ')') { | ||
while(this.look) { | ||
node.add(this.assignexpr()); | ||
if(this.look && this.look.content() == ',') { | ||
node.add(this.match()); | ||
if(this.look && this.look.content() == '...') { | ||
node.add( | ||
this.match(), | ||
this.assignexpr() | ||
); | ||
if(this.look) { | ||
if(this.look.content() == ',') { | ||
node.add(this.match()); | ||
if(this.look && this.look.content() == '...') { | ||
node.add( | ||
this.match(), | ||
this.assignexpr() | ||
); | ||
break; | ||
} | ||
} | ||
else if(this.look.content() == ')') { | ||
break; | ||
@@ -2148,0 +2155,0 @@ } |
@@ -522,6 +522,11 @@ define(function(require, exports, module) {var IParser = require('../Parser'); | ||
var node = new Node(Node.FNPARAMS); | ||
while(this.look && this.look.content() != ')') { | ||
while(this.look) { | ||
node.add(this.match(Token.ID, 'missing formal parameter')); | ||
if(this.look && this.look.content() == ',') { | ||
node.add(this.match()); | ||
if(this.look) { | ||
if(this.look.content() == ',') { | ||
node.add(this.match()); | ||
} | ||
else if(this.look.content() == ')') { | ||
break; | ||
} | ||
} | ||
@@ -1125,6 +1130,11 @@ } | ||
var node = new Node(Node.ARGLIST); | ||
while(this.look && this.look.content() != ')') { | ||
while(this.look) { | ||
node.add(this.assignexpr()); | ||
if(this.look && this.look.content() == ',') { | ||
node.add(this.match()); | ||
if(this.look) { | ||
if(this.look.content() == ',') { | ||
node.add(this.match()); | ||
} | ||
else if(this.look.content() == ')') { | ||
break; | ||
} | ||
} | ||
@@ -1131,0 +1141,0 @@ } |
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
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
79
15155
504445