Move keyword recognition out of the Markdown mapper and into the single expression/statement parser: - add parse_payload_statement + PayloadStatement for if/else/while/end/ return/params/ordinary; keyword matching uses complete tokens, requires whitespace before a control expression, rejects trailing tokens/colons and reserves the statement words in expression positions - keep expression spans payload-relative so the frontend can rewrite them onto the file; malformed params(...) interiors stay owned by the signature parser (one sem.syntax diagnostic, not a duplicate) - simplify the frontend mapper to control-stack lowering and mapped semantic diagnostics only - emit sem.no_entry_function from run when no Exec H2 main exists - add else-under-while, params-in-quote, Knowledge-inertness and no-entry tests; update the corpus counts - make the EBNF parameter type annotation optional (params(n) is valid) Verified: cargo fmt --check, cargo clippy -D warnings and cargo test --workspace --locked: 501 passed, 0 failed, 2 ignored.
6 lines
46 B
JSON
6 lines
46 B
JSON
{
|
|
"codes": [
|
|
"sem.unmatched_else"
|
|
]
|
|
}
|