private @NonNull CompletableFuture<SuggestionContext<C, ?>> addArgumentSuggestions(
            final @NonNull SuggestionContext<C, ?> context,
            final @NonNull CommandNode<C> node,
            final @NonNull CommandInput input,
            final @NonNull Executor executor
    ) {
        final CommandComponent<C> component = Objects.requireNonNull(node.component());
        return this.addArgumentSuggestions(context, component, input, executor).thenCompose(ctx -> {
            // When suggesting a flag, potentially suggest following nodes too
            final boolean isParsingFlag = component.type() == CommandComponent.ComponentType.FLAG
                    && !node.children().isEmpty() // Has children
                    && !(input.hasRemainingInput() && input.peek() == '-') // Not a flag
                    && !context.commandContext().optional(CommandFlagParser.FLAG_META_KEY).isPresent();

            if (!isParsingFlag) {
                return CompletableFuture.completedFuture(ctx);
            }

            return CompletableFuture.allOf(
                    node.children()
                            .stream()
                            .map(child -> this.addArgumentSuggestions(
                                    context, Objects.requireNonNull(child.component()), input, executor))
                            .toArray(CompletableFuture[]::new)
            ).thenApply(v -> ctx);
        });
    }
Adds the suggestions for the given {@code node} to the given {@code context}. If the {@code node} contains
a flag, then all children of the {@code node} will contribute with suggestions as well

@param context  the suggestion context
@param node     the node containing the argument to get suggestions from
@param input    the input from the sender
@param executor executor to schedule further suggestion logic to
@return the context
cloud-core/src/main/java/org/incendo/cloud/CommandTree.java