def paren

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

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

43# is the node a group opened by `(`?
44def paren(nn: Tree.Node) -> Bool:
45  match nn:
46    case Tree.Group{Lex.Tok{_k, o, _l, _c}, _kids, _cl}:
47      String.eq(o, "(")
48    case _other:
49      False{}

Uses (4)

Used by (1)