Skip to content
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

Syntax highlighting for REPL using ammonite as base instead of JLine #1233

Merged
merged 13 commits into from May 10, 2016

Conversation

felixmulder
Copy link
Contributor

@felixmulder felixmulder commented Apr 22, 2016

One was implemented by hand and the other by using dotty's scanner. The one
built by hand is ~short, and behaves correctly.

The scanner one is unfortunately not ready for testing - there are too
many things that are workarounds for it to be a good solution as of now

The code added from Ammonite is licensed under MIT, not sure where to
put the license - but will add it once I know.

@felixmulder felixmulder force-pushed the topic/repl-syntax-highlighting branch 5 times, most recently from 145c447 to e7cc691 Compare April 26, 2016 16:25
@felixmulder felixmulder changed the title [WIP] Syntax highlighting for REPL using ammonite as base instead of JLine Syntax highlighting for REPL using ammonite as base instead of JLine Apr 27, 2016
@felixmulder felixmulder force-pushed the topic/repl-syntax-highlighting branch 3 times, most recently from bf5f854 to 4618297 Compare April 27, 2016 13:53
@felixmulder
Copy link
Contributor Author

felixmulder commented Apr 27, 2016

Once #1238 is merged I believe this will compile under dotty.

Side note: running only one test in the tests.scala file: sbt test:test-only dotc.tests -- *repl_all*

One was implemted by hand and the other by using dotty's parser. The one
built by hand is shorter, and behaves correctly.

The scanner one is unfortunately not ready for testing - there are too
many things that are workarounds for it to be a good solution as of now

The code added from Ammonite is licensed under MIT, not sure where to
put the license - but will add it once I know.
Since we decided to go with the non dotty-scanner approach these are
unnecessary to have altered, might just as well revert them.
Launching the repl with: `runMain dotty.tools.dotc.repl.Main` is now
working correctly
@felixmulder felixmulder force-pushed the topic/repl-syntax-highlighting branch from 45d207a to 3515901 Compare April 28, 2016 09:00
@odersky
Copy link
Contributor

odersky commented Apr 28, 2016

@felixmulder You can rebase and try again. #1238 is merged.

@felixmulder felixmulder force-pushed the topic/repl-syntax-highlighting branch from 8fb9c11 to f02cfda Compare April 29, 2016 08:41
@felixmulder felixmulder force-pushed the topic/repl-syntax-highlighting branch from f02cfda to 29fc55a Compare April 29, 2016 08:42
When enter pressed immediately after keyword, the highlighting would be
aborted
@felixmulder
Copy link
Contributor Author

@odersky: there was a test that compiled dotty with -Ycheck-reentrant. This failed because some immutable structures (with internal mutable state) where not marked @sharable. So now everything seems to be working fine and this is ready for review.

@DarkDimius
Copy link
Member

@odersky, it would be nice to get this in before ScalaDays.

@odersky
Copy link
Contributor

odersky commented May 8, 2016

LGTM, thanks!

@DarkDimius DarkDimius merged commit 134ad7a into scala:master May 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants