diff options
author | Lassi Pulkkinen <lassi@pulk.fi> | 2024-10-31 03:11:21 +0200 |
---|---|---|
committer | Lassi Pulkkinen <lassi@pulk.fi> | 2024-10-31 03:51:35 +0200 |
commit | ae44478b30d890fe0fb04022f44d474dcdcc3f9d (patch) | |
tree | 5f462459ae4b47d22114eed717d1382d08cf4dfe /encoding/json/path/path.ha |
Diffstat (limited to 'encoding/json/path/path.ha')
-rw-r--r-- | encoding/json/path/path.ha | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/encoding/json/path/path.ha b/encoding/json/path/path.ha new file mode 100644 index 0000000..819e9f5 --- /dev/null +++ b/encoding/json/path/path.ha @@ -0,0 +1,26 @@ +// A compiled JSONPath query. +export type query = []segment; + +export type segment_type = enum { + CHILD, + DESCENDANT, +}; + +export type segment = struct { + stype: segment_type, + selector: selector, +}; + +export type selector = (str | wild | index | slice | filter); + +export type wild = void; + +export type index = int; + +export type slice = struct { + start: (int | void), + end: (int | void), + step: (int | void), +}; + +export type filter = void; // TODO |