Identifiers

In Spade identifier tokens are lexed as defined by the following regular expression:

(r#)?(
  [\p{XID_Start}_]
  \p{XID_Continue}*
  (\u{3F} | \u{21} | (\u{3F}\u{21}) | \u{2048})?
)

This loosely follows the definition of identifiers as defined by the Unicode Standard Annex #31, with differences described in the Differences from UAX #31 section.

Breaking this down further:

Examples

Here is a list of a few identifiers valid in Spade:

Here is a list of some identifiers invalid in Spade:

Differences from UAX 31