| Conditions | 2 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 33 | public static function escaped( |
||
| 34 | Parser|string $from, |
||
| 35 | Parser|string $to, |
||
| 36 | string $escape, |
||
| 37 | string $escape2 = null, |
||
| 38 | ): Parser { |
||
| 39 | return Between::these($from, $to, Join::the(Repeatable::parser(AllOrNothing::in(Either::of( |
||
| 40 | Map::the(($escape2 ?: $escape) . $escape, fn() => $escape), // escaped escape |
||
| 41 | Join::the(Sequence::of(Ignore::the($escape), $to)), // escaped end |
||
| 42 | Except::for($to, Any::symbol()), // anything else |
||
| 43 | ))))); |
||
| 46 |