private static void traverse(ParseContext context, SchemaNode currentNode, List<Diagnostic> diagnostics, boolean insideRankExpression) {

        if (currentNode.getLanguageType() == LanguageType.RANK_EXPRESSION && !insideRankExpression) {
            RankExpressionSymbolResolver.resolveRankExpression(currentNode, context);
        }

        if (currentNode.hasSymbol() && currentNode.getSymbol().getStatus() == SymbolStatus.UNRESOLVED) {
            SymbolReferenceResolver.resolveSymbolReference(currentNode, context, diagnostics);
        }

        if (currentNode.containsOtherLanguageData(LanguageType.INDEXING)) {
            IndexingLanguageResolver.resolveIndexingLanguage(context, currentNode, diagnostics);
        }

        for (Node child : currentNode) {
            traverse(context, child.getSchemaNode(), diagnostics, insideRankExpression || currentNode.getLanguageType() == LanguageType.RANK_EXPRESSION);
        }

        // Some things need run after the children has run.
        // If it becomes a lot, put into its own file
        // TODO: solution for field in struct
        if (currentNode.isASTInstance(fieldElm.class)) {
            ValidateFieldSettings.validateFieldSettings(context, currentNode, diagnostics);
        }
    }
ResolverTraversal
Traversing the CST after initial parsing step and inheritance has been resolved to resolve symbol references etc.
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/schemadocument/resolvers/ResolverTraversal.java