Credence.Syntax.FixTruncatedBinaryClose (credence v0.8.0)

Copy Markdown

Fixes truncated binary close delimiters caused by LLM output truncation.

LLMs repeatedly truncate <<...::binary>> to <<...::binary>) inside nested delimiters (e.g. inside function calls or list constructors). This regex-based fix restores the missing > character.

Bad (won't parse)

result = <<first, char, rest::binary>
[result | insert(char, <<first, rest::binary>)]

Good

result = <<first, char, rest::binary>>
[result | insert(char, <<first, rest::binary>>)]