mirror of
https://github.com/cerbero90/json-parser.git
synced 2025-01-16 20:48:15 +01:00
Simplify conditions
This commit is contained in:
parent
627458cb69
commit
4f172a0fc6
@ -56,8 +56,8 @@ final class Lexer implements IteratorAggregate
|
||||
|
||||
foreach ($this->source as $chunk) {
|
||||
for ($i = 0, $size = strlen($chunk); $i < $size; $i++, $this->position++) {
|
||||
$isQuote = '"' == $character = $chunk[$i];
|
||||
$inString = $isQuote != $inString || $isEscaping;
|
||||
$character = $chunk[$i];
|
||||
$inString = ($character == '"') != $inString || $isEscaping;
|
||||
$isEscaping = $character == '\\' && !$isEscaping;
|
||||
$shouldBuffer = $inString || !isset(Tokens::BOUNDARIES[$character]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user