Comparing version 0.44.0-beta to 0.44.0-beta2
@@ -74,3 +74,3 @@ /** | ||
FSCache.fromJSON = function(key, val) { | ||
if (val.__type) { | ||
if (val && val.__type) { | ||
val.__proto__ = nodes[val.__type].prototype; | ||
@@ -77,0 +77,0 @@ } |
@@ -413,3 +413,2 @@ | ||
* | 'and' | ||
* | 'only' | ||
* | 'or' | ||
@@ -426,3 +425,3 @@ * | 'is' | ||
, tok; | ||
if (captures = /^(not|and|only|or|is a|is defined|isnt|is not|is)(?!-)\b([ \t]*)/.exec(this.str)) { | ||
if (captures = /^(not|and|or|is a|is defined|isnt|is not|is)(?!-)\b([ \t]*)/.exec(this.str)) { | ||
var op = captures[1]; | ||
@@ -429,0 +428,0 @@ this.skip(captures); |
@@ -65,1 +65,5 @@ | ||
QueryExpr.prototype.toJSON = function(){ | ||
this.__type = 'QueryExpr'; | ||
return this; | ||
}; |
@@ -72,1 +72,5 @@ | ||
QueryList.prototype.toJSON = function(){ | ||
this.__type = 'QueryList'; | ||
return this; | ||
}; |
@@ -76,1 +76,5 @@ | ||
Query.prototype.toJSON = function(){ | ||
this.__type = 'Query'; | ||
return this; | ||
}; |
@@ -157,2 +157,3 @@ | ||
this.hash = Parser.cache.key(str, options); | ||
this.lexer = {}; | ||
if (!Parser.cache.has(this.hash)) { | ||
@@ -950,3 +951,3 @@ this.lexer = new Lexer(str, options); | ||
/** | ||
* ('only' | 'not')? ident ('and' queryExpr)* | ||
* (ident | 'not')? ident ('and' queryExpr)* | ||
* | queryExpr ('and' queryExpr)* | ||
@@ -956,4 +957,3 @@ */ | ||
query: function() { | ||
this.skipSpacesAndComments(); | ||
var pred = this.accept('only') || this.accept('not') | ||
var pred | ||
, id | ||
@@ -963,17 +963,22 @@ , query; | ||
this.skipSpacesAndComments(); | ||
if (id = this.accept('ident')) { | ||
query = new nodes.Query(new nodes.QueryExpr([id.val])); | ||
} else { | ||
query = new nodes.Query(this.queryExpr()); | ||
} | ||
if (pred = this.accept('ident') || this.accept('not')) { | ||
pred = new nodes.Literal(pred.val.string || pred.val); | ||
if (pred) query.predicate = new nodes.Literal(pred.val); | ||
this.skipSpacesAndComments(); | ||
this.skipSpacesAndComments(); | ||
if (id = this.accept('ident')) { | ||
query = new nodes.Query(new nodes.QueryExpr([id.val])); | ||
query.predicate = pred; | ||
} else { | ||
query = new nodes.Query(new nodes.QueryExpr([pred])); | ||
} | ||
this.skipSpacesAndComments(); | ||
if (this.accept('&&')) { | ||
do { | ||
query.push(this.queryExpr()); | ||
} while(this.accept('&&')); | ||
if (!this.accept('&&')) return query; | ||
} | ||
query = query || new nodes.Query; | ||
do { | ||
query.push(this.queryExpr()); | ||
} while(this.accept('&&')); | ||
return query; | ||
@@ -980,0 +985,0 @@ }, |
{ | ||
"name": "stylus", | ||
"description": "Robust, expressive, and feature-rich CSS superset", | ||
"version": "0.44.0-beta", | ||
"version": "0.44.0-beta2", | ||
"author": "TJ Holowaychuk <tj@vision-media.ca>", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
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
294212
11139