()
| 113 | } |
| 114 | |
| 115 | function* RulesParser(): ParseGenerator<Array<CSSRule>> { |
| 116 | const rules: Array<CSSRule> = []; |
| 117 | const hasClosingParent = has(lookAhead(/}/)); |
| 118 | |
| 119 | yield whitespaceMay; |
| 120 | while (yield hasMore) { |
| 121 | if (yield hasClosingParent) break; |
| 122 | |
| 123 | rules.push(yield [RuleParser, CommentParser]); |
| 124 | yield whitespaceMay; |
| 125 | |
| 126 | // if (yield closingParent) break; |
| 127 | } |
| 128 | return rules; |
| 129 | } |
| 130 | |
| 131 | function* StylesheetParser() { |
| 132 | const elements: Array<any> = []; |