Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Currently, Esprima uses large script-generated regular expression patterns to match identifier characters correctly:
esprima/src/character.ts
Lines 1 to 8 in 24eb7ed
Now that Unicode RegExp property escapes are now part of the language, we could use
\p{ID_Start}and\p{ID_Continue}instead to massively simplify the Esprima source code and get rid of separate script + manual updating workflow.Pros:
Cons:
Thoughts?