MCPcopy Create free account
hub / github.com/Effect-TS/effect / getSelectedCommandTokens

Function getSelectedCommandTokens

packages/effect/src/cli/internal/parser.ts:94–100  ·  view source on GitHub ↗
(
  tokens: ReadonlyArray<Token>,
  command: Command.Any
)

Source from the content-addressed store, hash-verified

92 * @internal
93 */
94export const getSelectedCommandTokens = (
95 tokens: ReadonlyArray<Token>,
96 command: Command.Any
97): ReadonlyArray<Token> => {
98 const result = scanCommandLevel(tokens, makeCommandContext(command, []))
99 return result._tag === "Leaf" ? tokens : getSelectedCommandTokens(result.childTokens, result.sub)
100}
101
102/* ========================================================================== */
103/* Types */

Callers

nothing calls this directly

Calls 2

scanCommandLevelFunction · 0.85
makeCommandContextFunction · 0.85

Tested by

no test coverage detected