Expand description

Syntax tree that backs a path. If you just want to use paths, you shouldn’t touch this. This is exposed for users who want to provide things like syntax highlighting of paths or similar.

Structs

A boolean literal, such as true or false

A quote-delimite string

A filter selector inside of brackets, ?(...)

A raw identifier, the foo in .foo

An integer literal, such as -3

A non-zero integer literal, any integer not 0

A null literal, the keyword null

A compiled JSON path. Can be used to match against items any number of times, preventing recompilation of the same pattern many times.

A range for selecting keys from an array from a start to an end key

An apostrophe-delimited string

Spanspanned

A source span in a path. Can be used to reference the source location of tokens or syntax structures.

A range for selecting keys from an array from a start to an end key, with an extra parameter to select every Nth key

A sub-path, such as in a filter or as a bracket selector. Can be based off the root or the current location

Enums

A binary operator in an expression

A literal selector inside of brackets, 0 or 'a'

The inside of a bracket selector segment

A literal inside an expression

An expression inside a filter directive, or any sub-expression in that tree

The kind of a sub-path. Either root-based or relative

The raw selector following a dot

The optional selector following a recursive selector

A single segement selector in a path

Any string literal, whether single or double quote delimited

An unary operator in an expression

A component of a bracket union selector

Traits

Spannedspanned

Trait for any item that has a retrievable source span