def calls
bolt@1.27.0.0 · src/rules/correctness/put.bend:62
import bolt@1.27.0.0/src/rules/correctness/put.bend as Put
import Base
import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy
import bolt@1.27.0.0/src/finding.bend as F
import bolt@1.27.0.0/src/syntax/lex.bend as Lex
62
63def calls(toks: List<&2, Lex.Tok>, +path: String) -> List<&2, F.Finding>:
64 match toks:
65 case Con{Lex.Tok{k, +t, +l, +c}, +rest}:
66 match rest:
67 case Con{Lex.Tok{k2, +o, l2, c2}, r2}:
68 Lazy.either(List<&2, F.Finding>, Bool.and(calls.dotted(k), Lex.is_open(k2)), _u => calls.one(t, o, l, c, path,
69 calls(r2, path)), _v => calls(rest, path))
70 case Nil{}:
71 Nil{}
72 case Nil{}:
73 Nil{}