が来たら数値トークン⽣成メソッドを呼ぶ public function getNextToken(): Token { // (snip) return match ($ch) { // (snip) '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' => $this->getNumberToken($ch), default => throw new LexerException('Invalid character ' . $ch), }; } 29