homunculus
Advanced tools
Comparing version 0.8.8 to 0.8.9
{ | ||
"name": "homunculus", | ||
"version": "0.8.8", | ||
"version": "0.8.9", | ||
"description": "A lexer&parser by Javascript", | ||
@@ -5,0 +5,0 @@ "maintainers": [ |
@@ -464,3 +464,3 @@ var Lexer = require('./Lexer'); | ||
case '~': | ||
if(!this.value && ['"', "'"].indexOf(this.code.charAt(this.index)) == -1) { | ||
if(!this.value && ['"', "'", '@', '$'].indexOf(this.code.charAt(this.index)) == -1) { | ||
token.type(Token.HACK); | ||
@@ -467,0 +467,0 @@ } |
@@ -440,3 +440,3 @@ var IParser = require('../Parser'); | ||
&& this.tokens[this.index] | ||
&& this.tokens[this.index].type() == Token.STRING) { | ||
&& [Token.VARS, Token.STRING].indexOf(this.tokens[this.index].type()) > -1) { | ||
node.add(this.unbox()); | ||
@@ -555,3 +555,3 @@ } | ||
&& this.tokens[this.index] | ||
&& this.tokens[this.index].type() == Token.STRING) { | ||
&& [Token.VARS, Token.STRING].indexOf(this.tokens[this.index].type()) > -1) { | ||
node.add(this.unbox()); | ||
@@ -833,2 +833,8 @@ } | ||
} | ||
else if(s == '~' | ||
&& this.tokens[this.index] | ||
&& [Token.VARS, Token.STRING].indexOf(this.tokens[this.index].type()) > -1) { | ||
node.add(this.unbox()); | ||
break; | ||
} | ||
//LL2确定是否是fncall | ||
@@ -971,2 +977,8 @@ var fncall = false; | ||
} | ||
else if(s == '~' | ||
&& this.tokens[this.index] | ||
&& [Token.VARS, Token.STRING].indexOf(this.tokens[this.index].type()) > -1) { | ||
node.add(this.unbox()); | ||
break; | ||
} | ||
//LL2确定是否是fncall | ||
@@ -1747,3 +1759,3 @@ var fncall = false; | ||
this.match('~'), | ||
this.match(Token.STRING) | ||
this.match([Token.VARS, Token.STRING]) | ||
); | ||
@@ -1750,0 +1762,0 @@ return node; |
@@ -464,3 +464,3 @@ define(function(require, exports, module) {var Lexer = require('./Lexer'); | ||
case '~': | ||
if(!this.value && ['"', "'"].indexOf(this.code.charAt(this.index)) == -1) { | ||
if(!this.value && ['"', "'", '@', '$'].indexOf(this.code.charAt(this.index)) == -1) { | ||
token.type(Token.HACK); | ||
@@ -467,0 +467,0 @@ } |
@@ -440,3 +440,3 @@ define(function(require, exports, module) {var IParser = require('../Parser'); | ||
&& this.tokens[this.index] | ||
&& this.tokens[this.index].type() == Token.STRING) { | ||
&& [Token.VARS, Token.STRING].indexOf(this.tokens[this.index].type()) > -1) { | ||
node.add(this.unbox()); | ||
@@ -555,3 +555,3 @@ } | ||
&& this.tokens[this.index] | ||
&& this.tokens[this.index].type() == Token.STRING) { | ||
&& [Token.VARS, Token.STRING].indexOf(this.tokens[this.index].type()) > -1) { | ||
node.add(this.unbox()); | ||
@@ -833,2 +833,8 @@ } | ||
} | ||
else if(s == '~' | ||
&& this.tokens[this.index] | ||
&& [Token.VARS, Token.STRING].indexOf(this.tokens[this.index].type()) > -1) { | ||
node.add(this.unbox()); | ||
break; | ||
} | ||
//LL2确定是否是fncall | ||
@@ -971,2 +977,8 @@ var fncall = false; | ||
} | ||
else if(s == '~' | ||
&& this.tokens[this.index] | ||
&& [Token.VARS, Token.STRING].indexOf(this.tokens[this.index].type()) > -1) { | ||
node.add(this.unbox()); | ||
break; | ||
} | ||
//LL2确定是否是fncall | ||
@@ -1747,3 +1759,3 @@ var fncall = false; | ||
this.match('~'), | ||
this.match(Token.STRING) | ||
this.match([Token.VARS, Token.STRING]) | ||
); | ||
@@ -1750,0 +1762,0 @@ return node; |
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
1249536
18115