syntax.expected_statement
Expected a statement.
Area 3, Logic; not declinable; the next step is usually the agent's.
There is no while loop; for over a list is the only one:
type Count = Int { min: 0}function first(count: Count) -> Count { while (count > 0) { return count } return count}
error Jadpo has no while loop
--> main.jadpo:6:5
|6 | while (count > 0) { | ^^^^^ not a Jadpo statement
- reason
- The only loop is
for item in items, which always ends after its list; stop early withreturn. - next
- Loop over a list with
for, or narrow it first withlist.filter(agent) - rule
- syntax.
expected_ statement - help
- https://jadpo.
dev/docs/errors/syntax. expected_ statement
Markdown for agents: /docs/errors/syntax.expected_statement.md.Built from Jadpo main at aee2e8f.