public List<Diagnostic> identify(T node) {
        List<Diagnostic> ret = new ArrayList<>();

        if (
            node.getIsDirty() &&
            node.isLeaf()
        ) {
            ret.add(new SchemaDiagnostic.Builder()
                .setRange(node.getRange())
                .setMessage("Invalid syntax.")
                .setSeverity(DiagnosticSeverity.Error)
                .build());
        }

        return ret;
    }
Mark all dirty nodes as Syntax error
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/schemadocument/parser/IdentifyDirtyNodes.java