@Override
    public Type typeCheck(Scope<Type> scope) {
        return scope.inScope(() -> { // Ensure that we don't leak scope.
            for (Condition condition : conditions) {
                condition.typeCheck(scope);
            }
            String docs = documentation == null ? "" : String.format(" `%s`", documentation);
            return context(String.format("while typechecking%s", docs), this, () -> typecheckValue(scope));
        });
    }
Invoke the {@link RuleValueVisitor} functions for this Rule.

@param visitor the visitor to be invoked.
@param <T>     the visitor return type.
@return the return value of the visitor.
smithy-rules-engine/src/main/java/software/amazon/smithy/rulesengine/language/syntax/rule/Rule.java