def long_tips

cli@0.2.0.0 · cli.bend:5963

import cli@0.2.0.0/cli.bend as Cli
import Base

5963# T1, T2 and T3, for E01 on a long; --name=value looks up --name.
5964def long_tips(is_long: Bool, +token: String, root: String,
5965    path: List<&2, String>, +items: List<&2, Item>,
5966    root_items: List<&2, Item>, here: String) ->
5967    List<&2, List<&2, Segment>>:
5968  match is_long:
5969    case False{}: Nil{}
5970    case True{}:
5971      +long = before_eq(token)
5972      +name = String.drop(long, 2n)
5973      List.concat(&2, List<&2, Segment>, [
5974        maybe_tip(owner(path, root_items, root, token, long, None{})),
5975        belongs(descendant(items, here, long, None{}), token),
5976        sub_exists(find_sub(items, name), name),
5977      ])

Uses (15)

Used by (1)