010496294bcace57c23976846de3c7fe6efb6942
[GitHub/WoltLab/WCF.git] /
1 <?php
2
3 declare(strict_types=1);
4
5 namespace CuyZ\Valinor\Type\Parser\Lexer\Token;
6
7 use CuyZ\Valinor\Type\Parser\Exception\UnknownSymbol;
8 use CuyZ\Valinor\Type\Parser\Lexer\TokenStream;
9 use CuyZ\Valinor\Type\Type;
10
11 /** @internal */
12 final class UnknownSymbolToken implements TraversingToken
13 {
14 public function __construct(private string $symbol) {}
15
16 public function traverse(TokenStream $stream): Type
17 {
18 throw new UnknownSymbol($this->symbol);
19 }
20
21 public function symbol(): string
22 {
23 return $this->symbol;
24 }
25 }