Bind.plan.lmode: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/syntax/bind.bend as Bind Lines 456-488 of bolt@1.27.0.0/src/syntax/bind.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/syntax/bind.bend&start_line=456&end_line=488 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 # the mode the rest is read in after a leaf of kind k def plan.lmode(mode: Mode, kk: Lex.TokKind, +rest: Tree.Node) -> Mode: match mode kk: case MHead{} Lex.TKey{}: MName{} case MTele{+kind} Lex.TOp{}: Bool.pick(Mode, plan.named(rest), MSkip{MTele{kind}}, MTele{kind}) case MTele{kind} Lex.TColon{}: MTeleType{kind} case MTeleType{kind} Lex.TComma{}: MTele{kind} case MTeleType{+kind} Lex.TAll{}: Bool.pick(Mode, plan.typed(rest, False{}), MSkip{MTeleType{kind}}, MTeleType{kind}) case MLhs{+outer, kind} Lex.TUpper{}: Bool.pick(Mode, plan.group(rest), MLhs{outer, KPat{}}, MLhs{outer, kind}) case MLhs{+outer, kind} Lex.TDotted{}: Bool.pick(Mode, plan.group(rest), MLhs{outer, KPat{}}, MLhs{outer, kind}) case MLhs{outer, _kind} Lex.TColon{}: MLhsType{outer} case MLhs{_outer, _kind} Lex.TEq{}: MTerm{} case MLhs{_outer, _kind} Lex.TBind{}: MTerm{} case MLhsType{_outer} Lex.TEq{}: MTerm{} case MLhsType{_outer} Lex.TBind{}: MTerm{} case MTerm{} Lex.TAll{}: Bool.pick(Mode, plan.typed(rest, True{}), MSkip{MTerm{}}, MTerm{}) case MTerm{} Lex.TAmp{}: Bool.pick(Mode, plan.typed(rest, False{}), MSkip{MTerm{}}, MTerm{}) case other _k: plan.skip(other) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/bind.bend&name=BindKind https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/bind.bend&name=Mode https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/bind.bend&name=plan.group https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/bind.bend&name=plan.named https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/bind.bend&name=plan.skip https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/bind.bend&name=plan.typed https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/lex.bend&name=TokKind https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/tree.bend&name=Node