Skip to content

Grammars with complex identifiers #803

Discussion options

You must be logged in to vote

Ok, defining all those ranges as arrays seems to work:

const PN_CHARS_BASE = [
      /[A-Z]/,
      /[a-z]/,
      // /[\u00C0-\u00D6]/,
      // /[\u00D8-\u00F6]/,
      // /[\u00F8-\u02FF]/,
      // /[\u0370-\u037D]/,
      // /[\u037F-\u1FFF]/,
      // /[\u200C-\u200D]/,
      // /[\u2070-\u218F]/,
      // /[\u2C00-\u2FEF]/,
      // /[\u3001-\uD7FF]/,
      // /[\uF900-\uFDCF]/,
      // /[\uFDF0-\uFFFD]/,
      // /[\u{10000}-\u{EFFFF}]/u
]

    _pn_chars_u: $ => choice(
      ...PN_CHARS_BASE,
      '_'
    ),

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by GordianDziwis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant