homunculus
Advanced tools
Comparing version 0.4.4 to 0.4.5
{ | ||
"name": "homunculus", | ||
"version": "0.4.4", | ||
"version": "0.4.5", | ||
"description": "A lexer&parser by Javascript", | ||
@@ -5,0 +5,0 @@ "maintainers": [ |
@@ -22,2 +22,3 @@ var Lexer = require('./Lexer'); | ||
this.var = false; | ||
this.cvar = false; | ||
this.page = false; | ||
@@ -152,2 +153,3 @@ this.kf = false; | ||
this.var = false; | ||
this.cvar = true; | ||
} | ||
@@ -163,3 +165,7 @@ else if(this.supports) { | ||
else if(this.value) { | ||
if(this.rule.colors().hasOwnProperty(s)) { | ||
if(this.cvar && this.rule.keyWords().hasOwnProperty(s)) { | ||
token.type(Token.KEYWORD); | ||
this.cvar = false; | ||
} | ||
else if(this.rule.colors().hasOwnProperty(s)) { | ||
token.type(Token.COLOR); | ||
@@ -290,2 +296,3 @@ this.url = false; | ||
this.var = false; | ||
this.cvar = false; | ||
break; | ||
@@ -301,2 +308,3 @@ case '{': | ||
this.supports = false; | ||
this.cvar = false; | ||
break; | ||
@@ -311,2 +319,3 @@ case '}': | ||
this.var = false; | ||
this.cvar = false; | ||
break; | ||
@@ -384,2 +393,3 @@ case '*': | ||
this.doc = false; | ||
this.cvar = true; | ||
break; | ||
@@ -386,0 +396,0 @@ } |
@@ -23,2 +23,3 @@ define(function(require, exports, module) { | ||
this.var = false; | ||
this.cvar = false; | ||
this.page = false; | ||
@@ -153,2 +154,3 @@ this.kf = false; | ||
this.var = false; | ||
this.cvar = true; | ||
} | ||
@@ -164,3 +166,7 @@ else if(this.supports) { | ||
else if(this.value) { | ||
if(this.rule.colors().hasOwnProperty(s)) { | ||
if(this.cvar && this.rule.keyWords().hasOwnProperty(s)) { | ||
token.type(Token.KEYWORD); | ||
this.cvar = false; | ||
} | ||
else if(this.rule.colors().hasOwnProperty(s)) { | ||
token.type(Token.COLOR); | ||
@@ -291,2 +297,3 @@ this.url = false; | ||
this.var = false; | ||
this.cvar = false; | ||
break; | ||
@@ -302,2 +309,3 @@ case '{': | ||
this.supports = false; | ||
this.cvar = false; | ||
break; | ||
@@ -312,2 +320,3 @@ case '}': | ||
this.var = false; | ||
this.cvar = false; | ||
break; | ||
@@ -385,2 +394,3 @@ case '*': | ||
this.doc = false; | ||
this.cvar = true; | ||
break; | ||
@@ -387,0 +397,0 @@ } |
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
510777
14915