Browse Source

Fixing escape sequence parsing in identifier

Sebastien Ros 12 years ago
parent
commit
a19ba37d49
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Jint/Parser/JavascriptParser.cs

+ 2 - 2
Jint/Parser/JavascriptParser.cs

@@ -399,7 +399,7 @@ namespace Jint.Parser
                 }
                 }
                 ++_index;
                 ++_index;
 
 
-                if (ScanHexEscape('u', out ch) || ch == '\\' || !IsIdentifierStart(ch))
+                if (!ScanHexEscape('u', out ch) || ch == '\\' || !IsIdentifierStart(ch))
                 {
                 {
                     ThrowError(null, Messages.UnexpectedToken, "ILLEGAL");
                     ThrowError(null, Messages.UnexpectedToken, "ILLEGAL");
                 }
                 }
@@ -426,7 +426,7 @@ namespace Jint.Parser
                     }
                     }
                     ++_index;
                     ++_index;
 
 
-                    if (ScanHexEscape('u', out ch) || ch == '\\' || !IsIdentifierPart(ch))
+                    if (!ScanHexEscape('u', out ch) || ch == '\\' || !IsIdentifierPart(ch))
                     {
                     {
                         ThrowError(null, Messages.UnexpectedToken, "ILLEGAL");
                         ThrowError(null, Messages.UnexpectedToken, "ILLEGAL");
                     }
                     }