Logic · rule
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 with `return`. next: Loop over a list with `for`, or narrow it first with `list.filter` (agent) rule: syntax.expected_statement help: https://jadpo.dev/docs/errors/syntax.expected_statementcheck failed: 1 error, 1 file
Markdown for agents: /docs/errors/syntax.expected_statement.md.Built from Jadpo main at a707efb.