docs← Back to article

Markdown for LLMs

LDC-E0202 — A block the file never closes

The source Markdown for this article. Copy it into your assistant or download it as a text file.

Download this articlePlain text ↗
# LDC-E0202 — A block the file never closes

## What it means

Some declarations carry an opaque body in braces that the current language
slice does not read into — it only skips over it to the matching close.
When the file ends before that close appears, the skip has nowhere to land,
and the declaration is refused at the opening brace.

The brace itself is usually fine; what is missing is its partner. Either
close the block where it was meant to end, or remove the declaration if the
opening brace was the slip. Note that a swallowed tail is silent: everything
after the opening brace was skipped, so check that no declarations were
lost inside it.

## Example

```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";

frobnicate Widget { field 1;
```

## Fix

```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";

entity Applicant;
```

## Engine message

The engine reports this in its own wording:

```text
example.law:5:19: error LDC-E0202: unclosed `{ ... }` block
```

## Related

- [LDC-E0201](/diagnostics/LDC-E0201/) — the sentence stops where the language does not expect it.