@@ -515,13 +515,13 @@ private function consumeWhiteSpace() {
515
515
516
516
private function consumeComment () {
517
517
if ($ this ->comes ('/* ' )) {
518
- $ this ->consume (2 );
519
- while ($ this ->consumeUntil ('* ' , false , true )) {
520
- if ($ this ->comes ('/ ' )) {
521
- $ this ->consume (1 );
522
- return true ;
523
- }
524
- }
518
+ $ this ->consume (2 );
519
+ while ($ this ->consumeUntil ('* ' , false , true )) {
520
+ if ($ this ->comes ('/ ' )) {
521
+ $ this ->consume (1 );
522
+ return true ;
523
+ }
524
+ }
525
525
}
526
526
return false ;
527
527
}
@@ -532,22 +532,22 @@ private function isEnd() {
532
532
533
533
private function consumeUntil ($ aEnd , $ bIncludeEnd = false , $ consumeEnd = false ) {
534
534
$ aEnd = is_array ($ aEnd ) ? $ aEnd : array ($ aEnd );
535
- $ out = '' ;
536
- $ start = $ this ->iCurrentPosition ;
537
-
538
- while (($ char = $ this ->consume (1 )) !== '' ) {
539
- if (in_array ($ char , $ aEnd )) {
540
- if ($ bIncludeEnd ) {
541
- $ out .= $ char ;
542
- } elseif (!$ consumeEnd ) {
543
- $ this ->iCurrentPosition -= $ this ->strlen ($ char );
544
- }
545
- return $ out ;
546
- }
547
- $ out .= $ char ;
548
- }
549
-
550
- $ this ->iCurrentPosition = $ start ;
535
+ $ out = '' ;
536
+ $ start = $ this ->iCurrentPosition ;
537
+
538
+ while (($ char = $ this ->consume (1 )) !== '' ) {
539
+ if (in_array ($ char , $ aEnd )) {
540
+ if ($ bIncludeEnd ) {
541
+ $ out .= $ char ;
542
+ } elseif (!$ consumeEnd ) {
543
+ $ this ->iCurrentPosition -= $ this ->strlen ($ char );
544
+ }
545
+ return $ out ;
546
+ }
547
+ $ out .= $ char ;
548
+ }
549
+
550
+ $ this ->iCurrentPosition = $ start ;
551
551
throw new UnexpectedTokenException ('One of (" ' .implode ('"," ' , $ aEnd ).'") ' , $ this ->peek (5 ), 'search ' );
552
552
}
553
553
0 commit comments