public Optional<Symbol> schemaSymbol() {
        if (CST == null || CST.size() == 0) return Optional.empty();
        try {
            Symbol rankProfileDefinition = CST.get(0).get(1).getSymbol();
            return schemaIndex.getFirstSymbolDefinition(rankProfileDefinition.getScope());
        } catch(Exception e) {}
        return Optional.empty(); 
    }
RankProfileDocumnet parses and represents .profile files
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/schemadocument/RankProfileDocument.java