Problem
At statement position, the lexer tokenizes assert as the Assert keyword. The statement parser consumes it before the generic built-in macro parser can see assert!. The existing assertStatement then begins parsing at !, so assert!(b != 0, "message") becomes logical-not applied to the parenthesized argument tuple instead of an assertion whose condition is b != 0. Type checking consequently reports Logical not requires boolean or optional operand.
This is the last failing example in the current home check examples/ baseline.
Scope
- Recognize the built-in macro spelling in
assertStatement. - Preserve the comparison as the assertion condition and the optional message as a separate expression.
- Retain the existing keyword spelling (
assert condition, message). - Cover parser shape and checker behavior.
Acceptance criteria
assert!(b != 0, "division by zero")parses toAssertStmtwith aNotEqualcondition.- The valid macro form passes type checking.
- A non-boolean macro condition is still rejected.
- Parser and assertion checker tests pass.
home check examples/reaches 39/39.