public boolean isASTInstance(Class<?> astClass) {
        if (language == LanguageType.CUSTOM && astClass == simulatedSchemaClass) return true;
        if (language == LanguageType.SCHEMA) return astClass.isInstance(originalSchemaNode);
        if (language == LanguageType.RANK_EXPRESSION) return astClass.isInstance(originalRankExpressionNode);
        if (language == LanguageType.INDEXING) return astClass.isInstance(originalIndexingNode);
        return false;
    }
SchemaNode represents a node in the AST of a file the language server parses.
The node exposes a general interface to handle different AST from different parsers.
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/tree/SchemaNode.java