@Override
    protected Type typecheckValue(Scope<Type> scope) {
        if (rules.isEmpty()) {
            throw new SourceException("Tree rule contains no rules.", getSourceLocation());
        }
        for (Rule rule : rules) {
            RuleError.context("while checking nested rule in tree rule",
                    () -> scope.inScope(() -> rule.typeCheck(scope)));
        }
        return Type.endpointType();
    }
Gets the rules contained within this tree.

@return the rules within this tree.
smithy-rules-engine/src/main/java/software/amazon/smithy/rulesengine/language/syntax/rule/TreeRule.java