-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 'let' to top level definitions; infer breaks using top-level keywords #85
Add 'let' to top level definitions; infer breaks using top-level keywords #85
Conversation
Seems to be getting stuck on the common test stage... Seems to be hanging for me locally unless it's just really slow? |
Travis-CI is killing the |
@lepoetemaudit the number of tests |
@j14159 thanks, I actually tried setting it to 1 (!) locally and same effect, so I can only assume I broke it somehow. I'll investigate :) |
Oh, maybe |
Yes, I think that's it - I had a quick stab at adding the let but I'm not very familiar with quickcheck et al. Will figure it out and update in due course. |
Fixed - it turns out removing the sanitization fix I put in a while for tabs in-between newlines caused the scanner to hang in some corner cases. I'm not entirely sure why, though. |
Thanks for this! I know it's a bit of a slog to walk through fixing all of those tests. Before I merge, do you think it's worth expanding the definition of |
Amending all the lets was a nifty way of getting familiar with all the tests so it wasn't so bad :) I think it would be better to fix the scan as you suggest, it's a bit of a smell otherwise. It's possible to cause infinite loops in Lecc with non-greedy matches which is what I think is happening here. I'll see what I can figure out. @yurriq this whitespace issue was caught by proper, as added by @YPAC - it's very clever stuff which I'm looking forward to getting more familiar with! |
Oh, cool! I guess I missed that. |
Per discussion with @lepoetemaudit in IRC I'll merge this now with discussed scan fixes to come later. Fixes #82 |
This PR represents a small shift in how we lex/parse statements at the top level.
Previously, all top level statements had to terminate with at least two new lines, i.e.
\n\n
. This meant encountering situations such as this: #82To remedy this, and following discussions with @j14159 and @ypaq on IRC, this proposed PR includes the following changes:
I also made it aware of the up-coming 'import' keyword so hopefully integrating that will be smooth.