()
| 2691 | } |
| 2692 | |
| 2693 | function createStyleRule() { |
| 2694 | return lop.rules.sequence( |
| 2695 | lop.rules.sequence.capture(documentMatcherRule()), |
| 2696 | lop.rules.tokenOfType("whitespace"), |
| 2697 | lop.rules.tokenOfType("arrow"), |
| 2698 | lop.rules.sequence.capture(lop.rules.optional(lop.rules.sequence( |
| 2699 | lop.rules.tokenOfType("whitespace"), |
| 2700 | lop.rules.sequence.capture(htmlPathRule()) |
| 2701 | ).head())), |
| 2702 | lop.rules.tokenOfType("end") |
| 2703 | ).map(function(documentMatcher, htmlPath) { |
| 2704 | return { |
| 2705 | from: documentMatcher, |
| 2706 | to: htmlPath.valueOrElse(htmlPaths.empty) |
| 2707 | }; |
| 2708 | }); |
| 2709 | } |
| 2710 | |
| 2711 | function readDocumentMatcher(string) { |
| 2712 | return parseString(documentMatcherRule(), string); |
no test coverage detected