Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
22 | public function parse(string $input): Result |
||
23 | { |
||
24 | $parser = $this->lazy->factory($this->name)(); |
||
25 | |||
26 | if (!$parser instanceof Parser) { |
||
27 | throw new RuntimeException("Missing the lazy parser `{$this->name}` for input `$input`"); |
||
28 | } |
||
29 | |||
30 | return $parser->parse($input); |
||
31 | } |
||
33 |