Jadpo is experimental and not ready for production. These docs follow the compiler's main branch as of 30 Oct 2026. What's built · Install 0.1.0
jadpo
Reference: Project layout and modules

Project layout and modules · rule

syntax.expected_declaration

Expected a declaration.

Area 1, Project layout and modules; not declinable; the next step is usually the agent's.

example
Count = Int
text
error: `Count` doesn't start a declaration --> main.jadpo:1:1  |1 | Count = Int  | ^^^^^ expected a declaration  reason: A file holds declarations, such as `type`, `function`, `action`, `query` and `entity`, each starting a line.  next: Start the declaration with `type`: `type Count = ...` (agent)  rule: syntax.expected_declaration  help: https://jadpo.dev/docs/errors/syntax.expected_declarationcheck failed: 1 error, 1 file

A top-level var is this error too, and its next: points to constant, because at the top of a file a fixed value is a constant (area 3, Constants):

example
type VatRate = Decimal {    scale: 4}var vat_rate: VatRate = 0.2000
text
error: `var` doesn't start a declaration --> main.jadpo:5:1  |5 | var vat_rate: VatRate = 0.2000  | ^^^ expected a declaration  reason: `var` names a value inside a body; at the top of a file a fixed value is a `constant`.  next: Write `constant vat_rate: VatRate = 0.2000` (agent)  rule: syntax.expected_declaration  help: https://jadpo.dev/docs/errors/syntax.expected_declarationcheck failed: 1 error, 1 file

Markdown for agents: /docs/errors/syntax.expected_declaration.md.Built from Jadpo main at a707efb.