Bind.aliases: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/syntax/bind.bend as Bind Lines 172-181 of bolt@1.27.0.0/src/syntax/bind.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/syntax/bind.bend&start_line=172&end_line=181 import Base import bolt@1.27.0.0/src/syntax/tree.bend as Tree # the import aliases of a source: the last token of each `import .. as X` def aliases(root: Tree.Node, +acc: List<&2, String>) -> List<&2, String>: match root: case Tree.NCons{Tree.Stmt{Tree.SImport{}, kids, body}, rest}: +last = last_text(kids) aliases(rest, Bool.pick(List<&2, String>, Bool.or(String.eq(last, "Base"), String.eq(last, "import")), acc, last <> acc)) case Tree.NCons{other, rest}: aliases(rest, acc) case other: acc Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or 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=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/bind.bend&name=last_text https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/tree.bend&name=Node https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/tree.bend&name=StmtKind