@@ -146,7 +146,7 @@ public function parseIdentifier($bIgnoreCase = true)
146146 }
147147 $ result = $ this ->parseCharacter (true );
148148 if ($ result === null ) {
149- throw new UnexpectedTokenException ($ result , $ this ->peek (5 ), 'identifier ' , $ this ->lineNumber );
149+ throw new UnexpectedTokenException ('' , $ this ->peek (5 ), 'identifier ' , $ this ->lineNumber );
150150 }
151151 $ sCharacter = null ;
152152 while (!$ this ->isEnd () && ($ sCharacter = $ this ->parseCharacter (true )) !== null ) {
@@ -294,14 +294,19 @@ public function consume($mValue = 1): string
294294 $ iLineCount = \substr_count ($ mValue , "\n" );
295295 $ iLength = $ this ->strlen ($ mValue );
296296 if (!$ this ->streql ($ this ->substr ($ this ->iCurrentPosition , $ iLength ), $ mValue )) {
297- throw new UnexpectedTokenException ($ mValue , $ this ->peek (\max ($ iLength , 5 )), $ this ->lineNumber );
297+ throw new UnexpectedTokenException (
298+ $ mValue ,
299+ $ this ->peek (\max ($ iLength , 5 )),
300+ 'literal ' ,
301+ $ this ->lineNumber
302+ );
298303 }
299304 $ this ->lineNumber += $ iLineCount ;
300305 $ this ->iCurrentPosition += $ this ->strlen ($ mValue );
301306 return $ mValue ;
302307 } else {
303308 if ($ this ->iCurrentPosition + $ mValue > $ this ->iLength ) {
304- throw new UnexpectedEOFException ($ mValue , $ this ->peek (5 ), 'count ' , $ this ->lineNumber );
309+ throw new UnexpectedEOFException (( string ) $ mValue , $ this ->peek (5 ), 'count ' , $ this ->lineNumber );
305310 }
306311 $ result = $ this ->substr ($ this ->iCurrentPosition , $ mValue );
307312 $ iLineCount = \substr_count ($ result , "\n" );
0 commit comments