public static List<Diagnostic> resolveRankExpression(SchemaNode schemaNode, ParseContext context) {
        List<Diagnostic> diagnostics = new ArrayList<>();

        List<RankNode> rankNodes = RankNode.createTree(schemaNode);

        for (RankNode node : rankNodes) {
            diagnostics.addAll(traverseRankExpressionTree(node, context));
        }

        return diagnostics;
    }
Resolves rank expression references in the tree

@param node        The schema node to resolve the rank expression references in.
@param context     The parse context.
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/schemadocument/resolvers/RankExpressionSymbolResolver.java