@Override
	public ArrayList<Diagnostic> identify(SchemaNode node) {
        ArrayList<Diagnostic> ret = new ArrayList<>();

        if (!node.isSchemaASTInstance(identifierStr.class)) return ret;
        if (node.getParent() == null) return ret;
        if (!node.getParent().getSchemaNode().isSchemaASTInstance(rootSchema.class)) return ret;
        if (node.getPreviousSibling() == null) return ret;
        if (node.getPreviousSibling().getSchemaNode().getSchemaType() != TokenType.INHERITS) return ret;

        if (!node.hasSymbol()) {
            return ret;
        }

        context.setInheritsSchemaNode(node);

        return ret;
	}
IdentifySchemaInheritance identifies if a schema inherits from another schema, and add it to the context to resolve the inheritance later
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/schemadocument/parser/schema/IdentifySchemaInheritance.java