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§
- BoolLit
- A boolean literal, such as
true
orfalse
- Double
String Lit - A quote-delimite string
- Filter
- A filter selector inside of brackets,
?(...)
- Ident
- A raw identifier, the
foo
in.foo
- IntLit
- An integer literal, such as
-3
- NonZero
IntLit - A non-zero integer literal, any integer not
0
- NullLit
- A null literal, the keyword
null
- Parse
Fail - A single parse failure error
- Path
- A compiled JSON path. Can be used to match against items any number of times, preventing recompilation of the same pattern many times.
- Range
- A range for selecting keys from an array from a start to an end key
- Single
String Lit - An apostrophe-delimited string
- Span
- A source span in a path. Can be used to reference the source location of tokens or syntax structures.
- Step
Range - A range for selecting keys from an array from a start to an end key, with an extra parameter to select every Nth key
- SubPath
- A sub-path, such as in a filter or as a bracket selector. Can be based off the root or the current location
Enums§
- BinOp
- A binary operator in an expression
- Bracket
Lit - A literal selector inside of brackets,
0
or'a'
- Bracket
Selector - The inside of a bracket selector segment
- ExprLit
- A literal inside an expression
- Fail
Reason - The cause of a parse failure
- Filter
Expr - An expression inside a filter directive, or any sub-expression in that tree
- Path
Kind - The kind of a sub-path. Either root-based or relative
- RawSelector
- The raw selector following a dot
- Segment
- A single segement selector in a path
- String
Lit - Any string literal, whether single or double quote delimited
- UnOp
- An unary operator in an expression
- Union
Component - A component of a bracket union selector
Traits§
- Spanned
spanned
- Trait for any item that has a retrievable source span