logos.lang.writ.pat
Module lang · package logos-lang
Functions
fnwrit_pat_array_len_eq
fn writ_pat_array_len_eq(node: *const WAny, n: u64) -> bool
Returns true if the slot is an array with length exactly n.
fnwrit_pat_array_len_ge
fn writ_pat_array_len_ge(node: *const WAny, n: u64) -> bool
Returns true if the slot is an array with length at least n.
fnwrit_pat_array_slot
fn writ_pat_array_slot(node: *const WAny, idx: u64) -> WAny
Returns the child WAny at idx in the slot’s array, or the null sentinel
if the slot is not an array.
fnwrit_pat_eq_bool
fn writ_pat_eq_bool(node: *const WAny, b: bool) -> bool
Returns true if the slot holds a bool equal to b.
fnwrit_pat_eq_i24
fn writ_pat_eq_i24(node: *const WAny, v: i32) -> bool
Returns true if the slot holds an int whose value equals v (widened to i64).
fnwrit_pat_eq_str
fn writ_pat_eq_str(node: *const WAny, s: &[u8]) -> bool
Returns true if the slot holds a string equal to s.
fnwrit_pat_has_type_code
fn writ_pat_has_type_code(node: *const WAny, tc: u64) -> bool
Returns true if the slot is a ref whose resolved type code equals tc.
fnwrit_pat_is_map
fn writ_pat_is_map(node: *const WAny) -> bool
Returns true if the slot holds a map.
fnwrit_pat_is_null
fn writ_pat_is_null(node: *const WAny) -> bool
Returns true if the slot at node is the null/absent sentinel.
fnwrit_pat_is_present
fn writ_pat_is_present(node: *const WAny) -> bool
Returns true if the slot is a real value, not the null/absent sentinel.
fnwrit_pat_map_slot
fn writ_pat_map_slot(node: *const WAny, key: &[u8]) -> WAny
Returns the child WAny at key in the slot’s map, or the null sentinel
if the slot is absent or not a map.
fnwrit_pat_root
fn writ_pat_root(view: &WritStatic) -> WAny
Returns root WAny of a WritStatic @-literal scrutinee — the matcher’s entry point.
Reads inline (the DocumentHeader’s self-relative word at ptr+0) so the result
borrows the ¶m’s blob, not a local WView2 (borrow-checker).
fnwrit_pat_root_rc
fn writ_pat_root_rc(c: &Rc<Writ>) -> WAny
Returns root WAny of a runtime Rc<Writ> scrutinee (capture/comprehension results).