Skip to content

Commit

Permalink
fix parsing of private identifier, fixes sebastienros#354
Browse files Browse the repository at this point in the history
  • Loading branch information
jogibear9988 committed Dec 25, 2022
1 parent a583ccd commit 53ac844
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Esprima/Character.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public static partial class Character
// see test case CanGenerateMasks
private static ReadOnlySpan<byte> _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,
Expand Down
1 change: 1 addition & 0 deletions src/Esprima/Scanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,7 @@ private Token ScanPunctuator()

break;

case '#':
case ')':
case ';':
case ',':
Expand Down
1 change: 0 additions & 1 deletion test/Esprima.Tests/CharMaskGeneratorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit 53ac844

Please sign in to comment.