protected function expectChar(string $string, int &$pos, string $char): void
    {
        if ($char !== $this->nextChar($string, $pos)) {
            throw TypeConversionException::parsingFailed($this, "'{$char}'", $string, $pos);
        }
        $pos++;
    }