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;
        }
    }
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;
        }
    }
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 ; } }
Lexes an expression that is delimited with tags

@param string $closeDelimiter The close delimiter
Lexes an expression that is delimited with tags