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

Function processValue

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

Source from the content-addressed store, hash-verified

889 * - Simply add value to arguments list
890 */
891const processValue = (
892 value: string,
893 cursor: TokenCursor,
894 context: CommandContext,
895 state: ParseState
896): SubcommandResult | undefined => {
897 if (state.mode._tag === "AwaitingFirstValue") {
898 const result = resolveFirstValue(value, cursor, context, state)
899
900 if (result._tag === "Subcommand") {
901 return result.result
902 }
903
904 state.mode = { _tag: "CollectingArguments" }
905 }
906
907 state.arguments.push(value)
908 return undefined
909}
910
911/* ========================================================================== */
912/* Command Level Scanning */

Callers 1

scanCommandLevelFunction · 0.85

Calls 2

resolveFirstValueFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected