Skip to content
This repository
Browse code

Remove optional stack argument from parser

  • Loading branch information...
commit 7bc13006eea4addff4fa1bd6c17301d0541ce1a7 1 parent 085cb38
authored April 03, 2012

Showing 1 changed file with 8 additions and 9 deletions. Show diff stats Hide diff stats

  1. 17  Source/Properties/Styles.js
17  Source/Properties/Styles.js
@@ -519,7 +519,7 @@ LSD.Styles.Parser = new LSD.RegExp({
519 519
   string_token: '([^$,\s\/()]+)',
520 520
   string: '<string_single>|<string_double>|<string_token>'
521 521
 }, {
522  
-  fn: function(name, args, scope) {
  522
+  fn: function(name, args) {
523 523
     var parsed = this.exec(args, true);
524 524
     for (var j = 0, bit; bit = parsed[j]; j++) if (bit && bit.length == 1) parsed[j] = bit[0];
525 525
     //switch (name) {
@@ -536,7 +536,7 @@ LSD.Styles.Parser = new LSD.RegExp({
536 536
         return obj;
537 537
     //}
538 538
   },
539  
-  length: function(number, unit, scope) {
  539
+  length: function(number, unit) {
540 540
     if (this.memo && scope.length) {
541 541
       var chr = number.charAt(0)
542 542
       switch (chr) {
@@ -558,16 +558,15 @@ LSD.Styles.Parser = new LSD.RegExp({
558 558
     obj[found[type]] = /* path.match(Value.string) ? path.substr(1, path.length - 2) : */ path
559 559
     return obj;
560 560
   },
561  
-  separator: function(character, scope, result) {
  561
+  separator: function(character) {
562 562
     switch (character) {
563 563
       case ',':
564  
-        result.push((this.scope = []));
  564
+        return (this.scope = []));
565 565
         break;
566  
-      default:
567  
-        if (this.memo) return;
568  
-        var length = scope.length;
569  
-        if ((scope == result) && !scope[length - 1].push)
570  
-          this.scope = scope[length - 1] = [scope[length - 1]];
  566
+      //default:
  567
+      //  if (this.memo || this.scope !== this.result) return;
  568
+      //  var scope = this.scope, length = scope.length, last = scope[length - 1]
  569
+      //  if (last.push) this.scope = this.scope[length - 1] = [last];
571 570
     }
572 571
   },
573 572
   operator: function(operator) {

0 notes on commit 7bc1300

Please sign in to comment.
Something went wrong with that request. Please try again.