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

Projects
None yet
4 participants
@felixmulder
Contributor

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 changed the title from [WIP] Syntax highlighting for REPL using ammonite as base instead of JLine to Syntax highlighting for REPL using ammonite as base instead of JLine Apr 27, 2016

@felixmulder

This comment has been minimized.

Contributor

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*

felixmulder added some commits Apr 22, 2016

Initial implementation featuring two different highlighters
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.
Revert Scanners and Tokens to their original form
Since we decided to go with the non dotty-scanner approach these are
unnecessary to have altered, might just as well revert them.
Fix stdin/out for repl launched by SBT
Launching the repl with: `runMain dotty.tools.dotc.repl.Main` is now
working correctly
@odersky

This comment has been minimized.

Contributor

odersky commented Apr 28, 2016

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

felixmulder added some commits Apr 28, 2016

Fix keywords sometimes not highlighted in multiln
When enter pressed immediately after keyword, the highlighting would be
aborted
@felixmulder

This comment has been minimized.

Contributor

felixmulder commented Apr 29, 2016

@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

This comment has been minimized.

Member

DarkDimius commented May 8, 2016

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

@odersky

This comment has been minimized.

Contributor

odersky commented May 8, 2016

LGTM, thanks!

@dotty-bot dotty-bot added the reviewed label May 8, 2016

@DarkDimius DarkDimius merged commit 134ad7a into lampepfl:master May 10, 2016

4 checks passed

validate-junit [1398] SUCCESS. Took 18 min.
Details
validate-main [1411] SUCCESS. Took 25 min.
Details
validate-partest [1400] SUCCESS. Took 15 min.
Details
validate-partest-bootstrapped [492] SUCCESS. Took 25 min.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment