diff --git a/src/Esprima/Character.Generated.cs b/src/Esprima/Character.Generated.cs index d0dfd3fb..10975cda 100644 --- a/src/Esprima/Character.Generated.cs +++ b/src/Esprima/Character.Generated.cs @@ -5,7 +5,7 @@ public static partial class Character // see test case CanGenerateMasks private static ReadOnlySpan _characterData => new byte[] { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 6, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 6, 0, 0, 6, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/src/Esprima/Scanner.cs b/src/Esprima/Scanner.cs index 72074560..28952be0 100644 --- a/src/Esprima/Scanner.cs +++ b/src/Esprima/Scanner.cs @@ -874,6 +874,7 @@ private Token ScanPunctuator() break; + case '#': case ')': case ';': case ',': diff --git a/test/Esprima.Tests/CharMaskGeneratorTest.cs b/test/Esprima.Tests/CharMaskGeneratorTest.cs index 062c84cd..f40e02e3 100644 --- a/test/Esprima.Tests/CharMaskGeneratorTest.cs +++ b/test/Esprima.Tests/CharMaskGeneratorTest.cs @@ -87,7 +87,6 @@ public static bool IsIdentifierStart(char ch) ch >= 'A' && ch <= 'Z' || ch >= 'a' && ch <= 'z' || ch == '\\' || - ch == '#' || ch >= 0x80 && NonAsciiIdentifierStart.IsMatch(ParserExtensions.CharToString(ch)); }