| 1 | <?php |
||
| 14 | class TokenParser |
||
| 15 | { |
||
| 16 | const STRATEGIES = [ |
||
| 17 | WhiteSpace::class, |
||
| 18 | Operand::class, |
||
| 19 | ToOperatorStack::class, |
||
| 20 | ClosingBracket::class |
||
| 21 | ]; |
||
| 22 | |||
| 23 | const FALLBACK_STRATEGY = DefaultStrategy::class; |
||
| 24 | |||
| 25 | /** @var ParseStrategyInterface[] */ |
||
| 26 | private $strategies; |
||
| 27 | /** @var ParseStrategyInterface */ |
||
| 28 | private $fallbackStrategy; |
||
| 29 | |||
| 30 | public function __construct() |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param TokenParserParameter $parameter |
||
| 42 | */ |
||
| 43 | 17 | public function parseToken(TokenParserParameter $parameter) |
|
| 56 | } |
||
| 57 |