def args

bolt@1.27.0.0 · src/rules/style/transcong.bend:111

import bolt@1.27.0.0/src/rules/style/transcong.bend as Transcong
import Base
import bolt@1.27.0.0/src/syntax/lex.bend as Lex
import bolt@1.27.0.0/src/syntax/tree.bend as Tree

111# past the `Equal.trans` leaf: a `(` group of that shape
112def args(nn: Tree.Node) -> Bool:
113  match nn:
114    case Tree.NCons{Tree.Group{Lex.Tok{_k, o, _l, _c}, kids, _cl}, _after}:
115      Bool.and(String.eq(o, "("), shape(kids))
116    case _other:
117      False{}

Uses (6)

Used by (1)