Liking cljdoc? Tell your friends :D

com.blockether.vis.ext.language-clojure.paren-repair

Pure-Clojure delimiter repair for Clojure source the model hand-wrote.

Ported from bhauman/clojure-mcp-light (clojure-mcp-light.delimiter-repair, Apache-2.0): detect a real delimiter error with edamame, then repair via parinferish indent-mode — parinfer trusts the INDENTATION to place the missing / extra ( [ {, which matches how the model intended the code to nest. The parinfer-rust shell path + stats/json bits from upstream are dropped; this is the pure JVM path only.

fix-delimiters is the entry point used by the clj_paren_repair tool.

Pure-Clojure delimiter repair for Clojure source the model hand-wrote.

Ported from bhauman/clojure-mcp-light (`clojure-mcp-light.delimiter-repair`,
Apache-2.0): detect a real delimiter error with edamame, then repair via
parinferish indent-mode — parinfer trusts the INDENTATION to place the missing
/ extra `( [ {`, which matches how the model intended the code to nest. The
parinfer-rust shell path + stats/json bits from upstream are dropped; this is
the pure JVM path only.

`fix-delimiters` is the entry point used by the `clj_paren_repair` tool.
raw docstring

delimiter-error?clj

(delimiter-error? s)

True when s fails to read specifically because of an unbalanced delimiter (edamame reports :edamame/opened-delimiter). A non-delimiter read failure still returns true — running parinfer is benign and may fix a hidden imbalance — while clean source returns false.

True when `s` fails to read specifically because of an unbalanced delimiter
(edamame reports `:edamame/opened-delimiter`). A non-delimiter read failure
still returns true — running parinfer is benign and may fix a hidden
imbalance — while clean source returns false.
sourceraw docstring

fix-delimitersclj

(fix-delimiters s)

Repair the delimiters of Clojure source s:

  • no delimiter error → s unchanged
  • repairable → the repaired string (which now parses clean)
  • unrepairable → nil Pure; never throws on a normal failure.
Repair the delimiters of Clojure source `s`:
  - no delimiter error → `s` unchanged
  - repairable          → the repaired string (which now parses clean)
  - unrepairable        → nil
Pure; never throws on a normal failure.
sourceraw docstring

parinferish-repairclj

(parinferish-repair s)

Repair s with parinferish indent-mode. Returns {:success bool :text S? :error msg?}.

Repair `s` with parinferish indent-mode. Returns `{:success bool :text S?
:error msg?}`.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close