private function lexDelimitedExpression(string $closeDelimiter)
    {
        $expressionBuffer = '';
        $newLinesAfterExpression = 0;

        while (!$this->matches($closeDelimiter, false) && !$this->atEof()) {
            $currentChar = $this->getCurrentChar();

            if ($currentChar === "\n") {
                if (trim($expressionBuffer) === '') {
                    $this->line++;
                } else {
                    $newLinesAfterExpression++;
                }
            }

            $expressionBuffer .= $currentChar;
            $this->cursor++;
        }

        $expressionBuffer = trim($expressionBuffer);

        if ($expressionBuffer !== '') {
            $this->tokens[] = new Token(
                TokenTypes::T_EXPRESSION,
                $this->replaceViewFunctionCalls($expressionBuffer),
                $this->line
            );
            $this->line += $newLinesAfterExpression;
        }
    }