@@ -349,12 +349,7 @@ public static function parse(Parser $parser, TokensList $list, array $options =
349349 }
350350 } elseif (! self ::checkIfTokenQuotedSymbol ($ token )) {
351351 if (! empty (Parser::$ STATEMENT_PARSERS [$ token ->value ])) {
352- // We want to get the next non-comment and non-space token after $token
353- // therefore, the first getNext call will start with the current $idx which's $token,
354- // will return it and increase $idx by 1, which's not guaranteed to be non-comment
355- // and non-space, that's why we're calling getNext again.
356-
357- $ list ->getNext ();
352+ $ list ->idx ++; // Ignore the current token
358353 $ nextToken = $ list ->getNext ();
359354
360355 if ($ token ->value === 'SET ' && $ nextToken !== null && $ nextToken ->value === '( ' ) {
@@ -387,12 +382,7 @@ public static function parse(Parser $parser, TokensList $list, array $options =
387382 $ ret ->unknown [] = $ token ;
388383 } elseif ($ state === 3 ) {
389384 if ($ partitionState === 0 ) {
390- // We want to get the next non-comment and non-space token after $token
391- // therefore, the first getNext call will start with the current $idx which's $token,
392- // will return it and increase $idx by 1, which's not guaranteed to be non-comment
393- // and non-space, that's why we're calling getNext again.
394-
395- $ list ->getNext ();
385+ $ list ->idx ++; // Ignore the current token
396386 $ nextToken = $ list ->getNext ();
397387 if (
398388 ($ token ->type === Token::TYPE_KEYWORD )
0 commit comments