VirtusLab / using_directives

12 stars 8 forks source link

Try to avoid more obvious StackOverflowErrors in Scanner #42

Closed KacperFKorban closed 2 years ago

KacperFKorban commented 2 years ago

fixes #41

Issue #41 exposed a big mistake in rewriting the Scanner taken from lampepfl/dotty from Scala to Java. Java doesn't support TCO (Tail call optimizations) anymore and since the Scanner used quite a bit of it, some (even trivial to scan) files crashed with StackOverflowError.

In this PR I refactored some pieces of the code to factor for the more common problematic files.

Also added default.nix, since I had problems with running the project without nix.

lefou commented 2 years ago

Thanks for fixing it. Can you please create a new release containing this PR?