Skip to main content

Module ast

Module ast 

Source
Expand description

Syntax tree produced by the dialect parsers.

Invariants: spans are half-open ranges of Unicode scalar offsets into the original pattern text. Code points are u32 (not char) because ECMAScript without the Unicode flag can name lone surrogates such as \uD83D.

Structs§

Class
A bracketed class, or a lone shorthand outside brackets.
FlagDelta
Scoped inline flag changes, (?i-m:...).
Node
A node with its source span.
PropertyRef
A resolved \p{...} / \P{...} reference: the name is already validated against the pinned Unicode data.
Span
Half-open range [start, end) in scalar-value offsets.

Enums§

Assertion
Zero-width assertions.
ClassExpr
A Rust bracketed class with nesting and set operations.
ClassItem
One member of a character class.
NodeKind
Node shape.
PropKind
Which Unicode property family a \p{...} refers to.
SetOp
Set operators of Rust character classes.
Shorthand
\d, \w, \s and negations. Their meaning is per dialect and alphabet.