def rhs_of

bolt@1.27.0.0 · src/rules/pedantic/rewalk.bend:644

import bolt@1.27.0.0/src/rules/pedantic/rewalk.bend as Rewalk
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

644# the tokens after `=`
645def rhs_of(nn: Tree.Node) -> Tree.Node:
646  match nn:
647    case Tree.NCons{Tree.Leaf{Lex.Tok{Lex.TEq{}, t, l, c}}, rest}:
648      rest
649    case Tree.NCons{h, rest}:
650      rhs_of(rest)
651    case other:
652      Tree.NNil{}

Uses (3)

Used by (1)