Table.hit: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/table.bend as Table Lines 236-252 of bolt@1.27.0.0/src/rules/table.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/table.bend&start_line=236&end_line=252 import Base import bolt@1.27.0.0/src/finding.bend as F import bolt@1.27.0.0/src/syntax/tree.bend as Tree import bolt@1.27.0.0/src/rules/calls.bend as Calls # a get or a set of a fixed table at a computed index def hit( +open: Bool, +tt: String, kids: Tree.Node, +fixed: List<&2, String>, +path: String, +line: U32, +col: U32 ) -> List<&2, F.Finding>: +get = String.eq(tt, "List.get") +set = String.eq(tt, "List.set") +op = Bool.and(open, Bool.or(get, set)) +as = Calls.args(kids) +fire = Bool.and(op, Bool.and(Bool.not(literal(Calls.arg(as, 3n))), owns(Calls.arg(as, 2n), fixed))) Bool.pick(List<&2, F.Finding>, fire, [cite(get, path, line, col, U32.from_nat(String.length(tt)))], []) Uses (18): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not 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=Base/base.bend&name=String.length https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.from_nat https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/finding.bend&name=Finding https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/calls.bend&name=arg https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/calls.bend&name=args https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/table.bend&name=cite https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/table.bend&name=literal https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/table.bend&name=owns https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/tree.bend&name=Node