Skip to main content

Module ident

Module ident 

Source
Expand description

The one identifier character class for the whole workspace (§4.1).

§4.1 allows Unicode identifiers, and the lexer, the input parser’s capture-name splitter and the debugger all have to agree about which scalars they are — so the class is stated once, here, and never re-derived.

praxis-syntax depends only on praxis-source, so every front-end crate can reach these predicates.

Functions§

ident_run_len
The length in bytes of the identifier run at the start of s, or 0 when s does not start one.
is_ident
Whether the whole of s is a well-formed identifier: non-empty, starting with is_ident_start and continuing with is_ident_continue.
is_ident_continue
Whether c may continue an identifier (§4.1).
is_ident_start
Whether c may start an identifier (§4.1).