gss / parser

Constraint Cascading Style Sheets compiler
MIT License
48 stars 6 forks source link

Empty ruleset throws exception #28

Open jonnor opened 9 years ago

jonnor commented 9 years ago
#parameterSection {

}

When #parameterSection selector matches

Throws RangeError: Invalid array length at args = Array(length); inside Command.prototype.descend Inspection shows length is -1

cbchouinard commented 9 years ago

Need to look into this but FYI we already have a test for this:

parse """
          article.featured > img {

          }
          """
        ,
          {
            commands: [
              ['rule',
                ["tag",[">",['.',['tag','article'],'featured']],"img"]
                []
              ]
            ]
          }

Should we then lower the restriction in the error inspector?

paulyoung commented 9 years ago

These are probably handled differently since the spec relies on plural bindings vs the original example which uses an ID.