def built_call

bolt@1.27.0.0 · src/rules/table.bend:70

import bolt@1.27.0.0/src/rules/table.bend as Table
import Base
import bolt@1.27.0.0/src/syntax/tree.bend as Tree
import bolt@1.27.0.0/src/rules/calls.bend as Calls

70# a constant-size constructor, not a length taken from the data
71def built_call(+tt: String, kids: Tree.Node) -> Bool:
72  +as = Calls.args(kids)
73  +rep = Bool.or(String.eq(tt, "List.replicate"), String.eq(tt, "Array.new"))
74  Bool.or(Bool.and(rep, lone_num(Calls.arg(as, 2n))), Bool.and(String.eq(tt, "List.range"), range_count(as)))

Uses (10)

Used by (1)