def plan.named

bolt@1.27.0.0 · src/syntax/bind.bend:387

import bolt@1.27.0.0/src/syntax/bind.bend as Bind
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

387# does the chain start with a name (lower or upper case)?
388def plan.named(rest: Tree.Node) -> Bool:
389  match rest:
390    case Tree.NCons{Tree.Leaf{Lex.Tok{Lex.TName{}, _t, _l, _c}}, _r}:
391      True{}
392    case Tree.NCons{Tree.Leaf{Lex.Tok{Lex.TUpper{}, _t, _l, _c}}, _r}:
393      True{}
394    case _other:
395      False{}

Uses (4)

Used by (2)