chumsky icon indicating copy to clipboard operation
chumsky copied to clipboard

Allow leading underscores in idents

Open calder opened this issue 2 months ago • 0 comments

Summary

_ is not a member of XID_Start because some languages don't consider it a valid leading character (certain SQL dialects for example). In practice, leading _'s are accepted by most languages and even have a special role in many modern languages where they indicate intentionally ignored variables. Accepting them in ident() should make it more useful and less surprising.

References

  • https://www.unicode.org/reports/tr31/
  • https://www.unicode.org/reports/tr31/#NFKC_Modifications

calder avatar Apr 26 '24 15:04 calder