* Parse selector.
()
| 192 | */ |
| 193 | |
| 194 | function selector() { |
| 195 | var m = match(/^([^{]+)/); |
| 196 | if (!m) return; |
| 197 | /* @fix Remove all comments from selectors |
| 198 | * http://ostermiller.org/findcomment.html */ |
| 199 | return trim(m[0]) |
| 200 | .replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g, '') |
| 201 | .replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g, function (m) { |
| 202 | return m.replace(/,/g, '\u200C'); |
| 203 | }) |
| 204 | .split(/\s*(?![^(]*\)),\s*/) |
| 205 | .map(function (s) { |
| 206 | return s.replace(/\u200C/g, ','); |
| 207 | }); |
| 208 | } |
| 209 | |
| 210 | /** |
| 211 | * Parse declaration. |