-
Notifications
You must be signed in to change notification settings - Fork 2
Play with explicit AST #20
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,25 +11,25 @@ use serde_json::Value; | |
/// For example, the JSONPath `$.foo.bar` yields this AST: | ||
/// | ||
/// ```text | ||
/// * | ||
/// ^ | ||
/// / \ | ||
/// * \___ DotName("bar") | ||
/// ^ \___ DotName("bar") | ||
/// / \ | ||
/// * \___ DotName("foo") | ||
/// ^ \___ DotName("foo") | ||
/// / | ||
/// Root ___/ | ||
/// ``` | ||
/// | ||
/// A more complicated example: `$.foo[1,2]["bar"]`: | ||
/// | ||
/// ```text | ||
/// * | ||
/// ^ | ||
/// / \ | ||
/// * \___ Union | ||
/// ^ \___ Union | ||
/// / \ \ | ||
/// * \___ Union \ | ||
/// ^ \___ Union \ | ||
/// / \ [Field("bar")] | ||
/// * \ | ||
/// ^ \ | ||
/// / \ [Number(1), Number(2)] | ||
/// / \ | ||
/// Root ___/ \___ DotName("foo") | ||
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The two diagrams still seem inconsistent. I'd expect the part of the tree nearest the root to be identical in both cases since There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's because the expressions have right to left precedence There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still don't get it.
and
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Uh :brainfart:; fixed |
||
|
Uh oh!
There was an error while loading. Please reload this page.