ErrorsProject 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.
Count = Int 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,queryandentity, 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_ declaration
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):
type VatRate = Decimal { scale: 4}var vat_rate: VatRate = 0.2000
error var doesn't start a declaration
--> main.jadpo:5:1
|5 | var vat_rate: VatRate = 0.2000 | ^^^ expected a declaration
- reason
varnames a value inside a body; at the top of a file a fixed value is aconstant.- next
- Write
constant vat_rate: VatRate = 0.2000(agent) - rule
- syntax.
expected_ declaration - help
- https://jadpo.
dev/docs/errors/syntax. expected_ declaration
Markdown for agents: /docs/errors/syntax.expected_declaration.md.Built from Jadpo main at aee2e8f.