homunculus
Advanced tools
Comparing version 0.7.7 to 0.7.8
{ | ||
"name": "homunculus", | ||
"version": "0.7.7", | ||
"version": "0.7.8", | ||
"description": "A lexer&parser by Javascript", | ||
@@ -5,0 +5,0 @@ "maintainers": [ |
@@ -296,6 +296,11 @@ var IParser = require('../Parser'); | ||
node.add(k); | ||
var first = k.first(); | ||
if(first.token().type() == Token.HACK) { | ||
first = first.next(); | ||
} | ||
var name = first.token().content().toLowerCase(); | ||
//有可能整个变量作为一个键值,无需再有:value部分 | ||
if(this.look && this.look.content() == ':') { | ||
node.add(this.match(':')); | ||
node.add(this.value()); | ||
node.add(this.value(name)); | ||
} | ||
@@ -772,3 +777,3 @@ node.add(this.match(')')); | ||
} | ||
else if(name == 'font' || name == 'border-image') { | ||
else if(name == 'font' || name == 'border-image' || name == 'device-aspect-ratio') { | ||
node.add(this.addexpr(undefined, null, true)); | ||
@@ -886,3 +891,3 @@ } | ||
} | ||
else if(name == 'font' || name == 'border-image') { | ||
else if(name == 'font' || name == 'border-image' || name == 'device-aspect-ratio') { | ||
node.add(this.addexpr(undefined, null, true)); | ||
@@ -889,0 +894,0 @@ } |
@@ -296,6 +296,11 @@ define(function(require, exports, module) {var IParser = require('../Parser'); | ||
node.add(k); | ||
var first = k.first(); | ||
if(first.token().type() == Token.HACK) { | ||
first = first.next(); | ||
} | ||
var name = first.token().content().toLowerCase(); | ||
//有可能整个变量作为一个键值,无需再有:value部分 | ||
if(this.look && this.look.content() == ':') { | ||
node.add(this.match(':')); | ||
node.add(this.value()); | ||
node.add(this.value(name)); | ||
} | ||
@@ -772,3 +777,3 @@ node.add(this.match(')')); | ||
} | ||
else if(name == 'font' || name == 'border-image') { | ||
else if(name == 'font' || name == 'border-image' || name == 'device-aspect-ratio') { | ||
node.add(this.addexpr(undefined, null, true)); | ||
@@ -886,3 +891,3 @@ } | ||
} | ||
else if(name == 'font' || name == 'border-image') { | ||
else if(name == 'font' || name == 'border-image' || name == 'device-aspect-ratio') { | ||
node.add(this.addexpr(undefined, null, true)); | ||
@@ -889,0 +894,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
1213892
17111