- improved CSyntax::ParseTokenOfType by restoring seek if token of different type was found
@@ -549,7 +549,11 @@ | ||
549 | 549 | return nullptr; |
550 | 550 | |
551 | 551 | if ( tokType != expectType ) |
552 | + { | |
553 | + // If we failed due to type then we must NOT pollute the parser by trashing the seek. | |
554 | + this->DecreaseSeek( tokLen ); | |
552 | 555 | return nullptr; |
556 | + } | |
553 | 557 | |
554 | 558 | *len = tokLen; |
555 | 559 | return tok; |