Closed stamourv closed 4 years ago
I don't think I do have syntax error tests…
Is it necessarily wrong to end with a definition? Instead of improving this error message, maybe we should make the result None
in that case.
Is there a non-mistake situation where you have definitions, but no expression in the body? I'd imagine that that error would catch a lot of oversights, e.g., missing recursing starting point.
It’s never ultimately useful, but there are definitely cases where you could temporarily have a definition last in a block. And notably, Python allows it.
Alright, either way works for me. The more time-sensitive PR is the other one anyway. Any ETA on that one?
So it turns out it wasn’t just def
that did this—let
-with-no-RHS, struct
, class
, and interface
did as well. I implemented my solution on a branch, block-end-fix. If you’re happy with that then I’ll merge it.
That looks fine, I'm happy with that. No tests?
Yeah, okay, a couple tests.
Currently, this program:
raises an error in terms of the Racket expansion.
The PR catches these kinds of errors, and produces a slightly nicer error message.
Two issues that remain: