private @NonNull CompletableFuture<ArgumentParseResult<?>> parseArgument(
            final @NonNull CommandContext<C> commandContext,
            final @NonNull CommandNode<C> node,
            final @NonNull CommandInput commandInput,
            final @NonNull Executor executor
    ) {
        final ParsingContext<C> parsingContext = commandContext.createParsingContext(node.component());
        parsingContext.markStart();

        final ArgumentParseResult<Boolean> preParseResult = node.component().preprocess(commandContext, commandInput);

        if (preParseResult.failure().isPresent() || !preParseResult.parsedValue().orElse(false)) {
            parsingContext.markEnd();
            parsingContext.success(false);
            if (preParseResult.failure().isPresent()) {
                return CompletableFutures.failedFuture(
                        this.argumentParseException(commandContext, node, preParseResult)
                );
            }
            return CompletableFuture.completedFuture(preParseResult);
        }

        // Skip a single space (argument delimiter)
        commandInput.skipWhitespace(1);
        // Copy the current queue so that we can deduce the captured input.
        final CommandInput currentInput = commandInput.copy();

        return node.component().parser()
                .parseFuture(commandContext, commandInput)
                .thenComposeAsync(result -> {
                    parsingContext.consumedInput(currentInput, commandInput);
                    parsingContext.markEnd();
                    parsingContext.success(false);

                    if (result.failure().isPresent()) {
                        commandInput.cursor(currentInput.cursor());
                        return CompletableFutures.failedFuture(
                                this.argumentParseException(commandContext, node, result)
                        );
                    } else {
                        return CompletableFuture.completedFuture(result);
                    }
                }, executor);
    }
Attempts to parse a command from the provided input.

@param commandContext  command context instance
@param commandInput    command input
@param parsingExecutor executor to schedule parsing logic on
@return parsed command, if one could be found
cloud-core/src/main/java/org/incendo/cloud/CommandTree.java