def AaGTok.piece

bend-osdev-apparmor@0.1.0.0 · glob.bend:240

import bend-osdev-apparmor@0.1.0.0/glob.bend as Glob
import Base

240# the piece p matches the token
241def AaGTok.piece(tok: AaGTok, +p: List<&2, U32>) -> Bool:
242  match tok:
243    case AaGChar{c}:
244      AaGPiece.one(U32.is_eq(AaGPiece.first(p), c), p)
245    case AaGAny{}:
246      AaGPiece.one(U32.is_ne(AaGPiece.first(p), 47), p)
247    case AaGClass{neg, rs}:
248      AaGPiece.one(AaGClass.has(neg, rs, AaGPiece.first(p)), p)
249    case AaGStar{}:
250      AaGPiece.no_slash(p)
251    case AaGStar2{}:
252      True{}

Uses (10)

Used by (1)