diff --git a/src/Parsing/ParserState.php b/src/Parsing/ParserState.php index 5663e221..f0b6ca62 100644 --- a/src/Parsing/ParserState.php +++ b/src/Parsing/ParserState.php @@ -131,12 +131,12 @@ public function parseIdentifier($ignoreCase = true) if ($result === null) { throw new UnexpectedTokenException('', $this->peek(5), 'identifier', $this->lineNumber); } - $sCharacter = null; - while (!$this->isEnd() && ($sCharacter = $this->parseCharacter(true)) !== null) { - if (\preg_match('/[a-zA-Z0-9\\x{00A0}-\\x{FFFF}_-]/Sux', $sCharacter)) { - $result .= $sCharacter; + $character = null; + while (!$this->isEnd() && ($character = $this->parseCharacter(true)) !== null) { + if (\preg_match('/[a-zA-Z0-9\\x{00A0}-\\x{FFFF}_-]/Sux', $character)) { + $result .= $character; } else { - $result .= '\\' . $sCharacter; + $result .= '\\' . $character; } } if ($ignoreCase) {