Parse.AaParse.expand0: def of bend-osdev-apparmor@0.1.0.0 Import: import bend-osdev-apparmor@0.1.0.0/parse.bend as Parse Lines 404-422 of bend-osdev-apparmor@0.1.0.0/parse.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-apparmor@0.1.0.0/parse.bend&start_line=404&end_line=422 import Base import bend-osdev-apparmor@0.1.0.0/error.bend as E # includes nested too deep def AaParse.expand0(items: List<&2, AaItem>, +scopes: List<&2, List<&2, List<&2, U32>>>, +acc: List<&2, AaItem>) -> AaExpOut: match items: case Nil{}: AaExpOut{AaItem.rev_onto(acc, Nil{}), scopes} case Con{it, rest}: match it: case AaIOpen{ts, src}: AaParse.expand0(rest, Con{Nil{}, scopes}, Con{AaIOpen{ts, src}, acc}) case AaIClose{src}: AaParse.expand0(rest, AaParse.pop(scopes), Con{AaIClose{src}, acc}) case AaIInclude{+name, opt, src}: AaParse.expand0(rest, scopes, Bool.pick(List<&2, AaItem>, AaParse.seen(scopes, name), acc, Con{AaIError{E.AaSrc.include_depth(src)}, acc})) case AaIStmt{ts, src}: AaParse.expand0(rest, scopes, Con{AaIStmt{ts, src}, acc}) case AaIVar{ts, src}: AaParse.expand0(rest, scopes, Con{AaIVar{ts, src}, acc}) case AaIError{e}: AaParse.expand0(rest, scopes, Con{AaIError{e}, acc}) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-osdev-apparmor@0.1.0.0/error.bend&name=AaSrc.include_depth https://jend.leeeet.dev/definition.txt?path=bend-osdev-apparmor@0.1.0.0/parse.bend&name=AaExpOut https://jend.leeeet.dev/definition.txt?path=bend-osdev-apparmor@0.1.0.0/parse.bend&name=AaItem https://jend.leeeet.dev/definition.txt?path=bend-osdev-apparmor@0.1.0.0/parse.bend&name=AaItem.rev_onto https://jend.leeeet.dev/definition.txt?path=bend-osdev-apparmor@0.1.0.0/parse.bend&name=AaParse.pop https://jend.leeeet.dev/definition.txt?path=bend-osdev-apparmor@0.1.0.0/parse.bend&name=AaParse.seen