public static ParseResult parseCST(Node node, ParseContext context) {
        if (node == null) {
            return ParseResult.parsingFailed(new ArrayList<>());
        }
        SchemaNode CST = new SchemaNode(node);
        ArrayList<Diagnostic> errors = new ArrayList<>();
        try {
            traverseCST(CST, context, errors);
        } catch(Exception ex) {
            context.logger().error(ex);
        }
        return new ParseResult(errors, Optional.of(CST));
    }
SchemaDocument parses and represents .sd files
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/schemadocument/SchemaDocument.java