def scope_args

cli@0.2.0.0 · cli.bend:4346

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

4346# The args in scope at path (§8.1), as parse orders them: globals first.
4347def scope_args(path: List<&2, String>, +items: List<&2, Item>,
4348    globals: List<&2, Item>) -> List<&2, Item>:
4349  match path:
4350    case Nil{}: List.append(&2, Item, globals, items)
4351    case name <> tail:
4352      scope_args(tail, sub_items(find_sub(items, name)),
4353        List.append(&2, Item, global_items(items), globals))

Uses (7)

Used by (2)