private function lexDelimitedExpressionStatement(
        string $openTokenType,
        string $openDelimiter,
        string $closeTokenType,
        string $closeDelimiter,
        bool $closeDelimiterOptional
    ) {
        $this->flushExpressionBuffer();
        $this->tokens[] = new Token($openTokenType, $openDelimiter, $this->line);
        $this->lexDelimitedExpression($closeDelimiter);

        if (!$this->matches($closeDelimiter) && !$closeDelimiterOptional) {
            throw new RuntimeException(
                sprintf(
                    'Expected %s, found %s on line %d',
                    $closeDelimiter,
                    $this->getStream($this->cursor, strlen($closeDelimiter)),
                    $this->line
                )
            );
        }

        $this->tokens[] = new Token($closeTokenType, $closeDelimiter, $this->line);
    }