Skip to content

improvement: Highlight using directives without double quote #257

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

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

jkciesluk
Copy link
Contributor

connected to VirtusLab/scala-cli#2178
Adds support for using directives without " like //> using dep some::dependency:1.0.0

@jkciesluk jkciesluk force-pushed the fix-using-directive branch from 2f522ce to 812efe0 Compare July 11, 2023 13:22
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! I think we could add a couple of cases still if that is alright.

Also, could sign the CLA to be in the clear CI wise?

@@ -3,6 +3,7 @@

//> using packaging.version "1.0.0"
//> using scala 2.13
//> using dep org.scala-lang::toolkit:0.2.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add cases like:

 using deps org.scala-lang::toolkit:0.2.0,org.scala-lang::toolkit:0.2.1
 using numbers 123, 111
 using strings "asdf", bfds 

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added more tests. There is still an issue with case like

//> using negative -10

as mentioned here #253, because #constants doesn't include negative numbers, but changing the order of patterns allowed correct highlighting of booleans

Adds support for using directives without `"` like
//> using dep some::dependency:1.0.0
@jkciesluk jkciesluk force-pushed the fix-using-directive branch from 812efe0 to ffeefb2 Compare July 11, 2023 17:01
@jkciesluk jkciesluk requested a review from tgodzik July 11, 2023 17:03
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tgodzik tgodzik merged commit cca0543 into scala:main Jul 12, 2023
@jkciesluk jkciesluk deleted the fix-using-directive branch July 12, 2023 16:41
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.

2 participants