stylus-source 0.21.1 → 0.21.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/vendor/History.md +5 -0
- data/vendor/lib/middleware.js +1 -1
- data/vendor/lib/parser.js +2 -0
- data/vendor/lib/stylus.js +1 -1
- data/vendor/lib/visitor/evaluator.js +15 -21
- data/vendor/package.json +1 -1
- data/vendor/test/cases/regression.432.css +5 -0
- data/vendor/test/cases/regression.432.styl +4 -0
- data/vendor/testing/test.styl +4 -10
- metadata +4 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.21.
|
1
|
+
0.21.2
|
data/vendor/History.md
CHANGED
data/vendor/lib/middleware.js
CHANGED
@@ -131,7 +131,7 @@ module.exports = function(options){
|
|
131
131
|
|
132
132
|
// Compile to cssPath
|
133
133
|
function compile() {
|
134
|
-
if (debug) log('read',
|
134
|
+
if (debug) log('read', cssPath);
|
135
135
|
fs.readFile(stylusPath, 'utf8', function(err, str){
|
136
136
|
if (err) return error(err);
|
137
137
|
var style = options.compile(str, stylusPath);
|
data/vendor/lib/parser.js
CHANGED
@@ -1158,8 +1158,10 @@ Parser.prototype = {
|
|
1158
1158
|
if ('url' == this.peek().val.name) return this.url();
|
1159
1159
|
var name = this.expect('function').val.name;
|
1160
1160
|
this.state.push('function arguments');
|
1161
|
+
this.parens++;
|
1161
1162
|
var args = this.args();
|
1162
1163
|
this.expect(')');
|
1164
|
+
this.parens--;
|
1163
1165
|
this.state.pop();
|
1164
1166
|
return new nodes.Call(name, args);
|
1165
1167
|
},
|
data/vendor/lib/stylus.js
CHANGED
@@ -51,6 +51,7 @@ var Evaluator = module.exports = function Evaluator(root, options) {
|
|
51
51
|
this.options = options;
|
52
52
|
this.calling = []; // TODO: remove, use stack
|
53
53
|
this.importStack = [];
|
54
|
+
this.return = 0;
|
54
55
|
};
|
55
56
|
|
56
57
|
/**
|
@@ -252,8 +253,7 @@ Evaluator.prototype.visitFunction = function(fn){
|
|
252
253
|
*/
|
253
254
|
|
254
255
|
Evaluator.prototype.visitEach = function(each){
|
255
|
-
|
256
|
-
this.return = true;
|
256
|
+
this.return++;
|
257
257
|
var expr = utils.unwrap(this.visit(utils.unwrap(each.expr)))
|
258
258
|
, len = expr.nodes.length
|
259
259
|
, val = new nodes.Ident(each.val)
|
@@ -262,7 +262,7 @@ Evaluator.prototype.visitEach = function(each){
|
|
262
262
|
, block = this.currentBlock
|
263
263
|
, vals = []
|
264
264
|
, body;
|
265
|
-
this.return
|
265
|
+
this.return--;
|
266
266
|
|
267
267
|
each.block.scope = false;
|
268
268
|
for (var i = 0; i < len; ++i) {
|
@@ -317,13 +317,12 @@ Evaluator.prototype.visitCall = function(call){
|
|
317
317
|
if ('expression' == fn.nodeName) fn = fn.first;
|
318
318
|
|
319
319
|
// Evaluate arguments
|
320
|
-
|
321
|
-
this.return = true;
|
320
|
+
this.return++;
|
322
321
|
var args = this.visit(call.args);
|
323
322
|
for (var key in call.args.map) {
|
324
323
|
call.args.map[key] = this.visit(call.args.map[key]);
|
325
324
|
}
|
326
|
-
this.return
|
325
|
+
this.return--;
|
327
326
|
|
328
327
|
// Built-in
|
329
328
|
if (fn.fn) {
|
@@ -356,10 +355,9 @@ Evaluator.prototype.visitIdent = function(ident){
|
|
356
355
|
return val ? this.visit(val) : ident;
|
357
356
|
// Assign
|
358
357
|
} else {
|
359
|
-
|
360
|
-
this.return = true;
|
358
|
+
this.return++;
|
361
359
|
ident.val = this.visit(ident.val);
|
362
|
-
this.return
|
360
|
+
this.return--;
|
363
361
|
this.currentScope.add(ident);
|
364
362
|
return ident.val;
|
365
363
|
}
|
@@ -373,13 +371,12 @@ Evaluator.prototype.visitBinOp = function(binop){
|
|
373
371
|
// Special-case "is defined" pseudo binop
|
374
372
|
if ('is defined' == binop.op) return this.isDefined(binop.left);
|
375
373
|
|
376
|
-
|
377
|
-
this.return = true;
|
374
|
+
this.return++;
|
378
375
|
// Visit operands
|
379
376
|
var op = binop.op
|
380
377
|
, left = this.visit(binop.left)
|
381
378
|
, right = this.visit(binop.right);
|
382
|
-
this.return
|
379
|
+
this.return--;
|
383
380
|
|
384
381
|
// HACK: ternary
|
385
382
|
var val = binop.val
|
@@ -485,14 +482,13 @@ Evaluator.prototype.visitProperty = function(prop){
|
|
485
482
|
return ret;
|
486
483
|
// Regular property
|
487
484
|
} else {
|
488
|
-
|
489
|
-
this.return = true;
|
485
|
+
this.return++;
|
490
486
|
prop.name = name;
|
491
487
|
prop.literal = true;
|
492
488
|
this.property = prop;
|
493
489
|
prop.expr = this.visit(prop.expr);
|
494
490
|
delete this.property;
|
495
|
-
this.return
|
491
|
+
this.return--;
|
496
492
|
return prop;
|
497
493
|
}
|
498
494
|
};
|
@@ -542,13 +538,12 @@ Evaluator.prototype.visitBlock = function(block){
|
|
542
538
|
|
543
539
|
Evaluator.prototype.visitIf = function(node){
|
544
540
|
var ret
|
545
|
-
, _ = this.return
|
546
541
|
, block = this.currentBlock
|
547
542
|
, negate = node.negate;
|
548
543
|
|
549
|
-
this.return
|
544
|
+
this.return++;
|
550
545
|
var ok = this.visit(node.cond).first.toBoolean();
|
551
|
-
this.return
|
546
|
+
this.return--;
|
552
547
|
|
553
548
|
// Evaluate body
|
554
549
|
if (negate) {
|
@@ -593,8 +588,7 @@ Evaluator.prototype.visitIf = function(node){
|
|
593
588
|
*/
|
594
589
|
|
595
590
|
Evaluator.prototype.visitImport = function(imported){
|
596
|
-
|
597
|
-
this.return = true;
|
591
|
+
this.return++;
|
598
592
|
|
599
593
|
var root = this.root
|
600
594
|
, Parser = require('../parser')
|
@@ -603,7 +597,7 @@ Evaluator.prototype.visitImport = function(imported){
|
|
603
597
|
, found
|
604
598
|
, literal;
|
605
599
|
|
606
|
-
this.return
|
600
|
+
this.return--;
|
607
601
|
|
608
602
|
// url() passed
|
609
603
|
if ('url' == path.name) return imported;
|
data/vendor/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{ "name": "stylus"
|
2
2
|
, "description": "Robust, expressive, and feature-rich CSS superset"
|
3
|
-
, "version": "0.21.
|
3
|
+
, "version": "0.21.2"
|
4
4
|
, "author": "TJ Holowaychuk <tj@vision-media.ca>"
|
5
5
|
, "keywords": ["css", "parser", "style", "stylesheets", "jade", "language"]
|
6
6
|
, "repository": "git://github.com/learnboost/stylus"
|
data/vendor/testing/test.styl
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stylus-source
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.21.
|
4
|
+
version: 0.21.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-12-
|
12
|
+
date: 2011-12-30 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Robust, expressive, and feature-rich CSS superset. This gem packages
|
15
15
|
up stylus for use with the stylus gem.
|
@@ -560,6 +560,8 @@ files:
|
|
560
560
|
- vendor/test/cases/regression.415.styl
|
561
561
|
- vendor/test/cases/regression.420.css
|
562
562
|
- vendor/test/cases/regression.420.styl
|
563
|
+
- vendor/test/cases/regression.432.css
|
564
|
+
- vendor/test/cases/regression.432.styl
|
563
565
|
- vendor/test/cases/regression.440.css
|
564
566
|
- vendor/test/cases/regression.440.styl
|
565
567
|
- vendor/test/cases/regression.449.css
|