RuleFile.AaFile.is_path: def of bend-osdev-apparmor@0.1.0.0 Import: import bend-osdev-apparmor@0.1.0.0/rule_file.bend as RuleFile Lines 303-316 of bend-osdev-apparmor@0.1.0.0/rule_file.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-apparmor@0.1.0.0/rule_file.bend&start_line=303&end_line=316 import Base import bend-osdev-apparmor@0.1.0.0/text.bend as X import bend-osdev-apparmor@0.1.0.0/token.bend as T # a term that is a pattern: a quoted string, or a word starting with '/' or # '{' (after variable expansion) def AaFile.is_path(t: T.AaTerm) -> Bool: match t: case T.AaTmWord{+w}: Bool.or(U32.is_eq(X.AaText.head(w), 47), U32.is_eq(X.AaText.head(w), 123)) case T.AaTmQuoted{q}: True{} case T.AaTmList{xs}: False{} case T.AaTmCond{k, v}: False{} case T.AaTmArrow{}: False{} Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=bend-osdev-apparmor@0.1.0.0/text.bend&name=AaText.head https://jend.leeeet.dev/definition.txt?path=bend-osdev-apparmor@0.1.0.0/token.bend&name=AaTerm