public function expect(string $char): void
    {
        $this->latestExpectations = [$char];

        $taken = $this->take();

        if ($taken !== $char) {
            $this->lastTaken = null;

            throw new UnexpectedChar($this, [$char]);
        }
    }