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

Function processValue

packages/effect/src/cli/internal/parser.ts:926–944  ·  view source on GitHub ↗
(
  value: string,
  cursor: TokenCursor,
  context: CommandContext,
  state: ParseState
)

Source from the content-addressed store, hash-verified

924 * - Simply add value to arguments list
925 */
926const processValue = (
927 value: string,
928 cursor: TokenCursor,
929 context: CommandContext,
930 state: ParseState
931): SubcommandResult | undefined => {
932 if (state.mode._tag === "AwaitingFirstValue") {
933 const result = resolveFirstValue(value, cursor, context, state)
934
935 if (result._tag === "Subcommand") {
936 return result.result
937 }
938
939 state.mode = { _tag: "CollectingArguments" }
940 }
941
942 state.arguments.push(value)
943 return undefined
944}
945
946/* ========================================================================== */
947/* Command Level Scanning */

Callers 1

scanCommandLevelFunction · 0.85

Calls 2

resolveFirstValueFunction · 0.85
pushMethod · 0.65

Tested by

no test coverage detected