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

Add Scala frontend #570

Merged
merged 21 commits into from
Aug 8, 2022
Merged

Add Scala frontend #570

merged 21 commits into from
Aug 8, 2022

Conversation

robinmaisch
Copy link
Contributor

@robinmaisch robinmaisch commented Aug 6, 2022

This PR adds a Scala frontend to JPlag. It comes with some test files and a README which explains various design choices that can be considered for maintenance.
The frontend only supports Scala 2.12 so far. Maybe it can be upgraded to Scala 3 easily in a collective effort, I certainly failed to do it! In that case, a few more token types might be necessary.

Besides the difficulties with the syntax discussed in the README, the token set and the abstraction are designed along the lines of other frontends.

As the parser takes a different approach that reduces code repetition, it should be considered if the parser mechanism is redesigned in the future.

Addressing #345, #568

@tsaglam tsaglam added enhancement Issue/PR that involves features, improvements and other changes minor Minor issue/feature/contribution/change language PR / Issue deals (partly) with new and/or existing languages for JPlag labels Aug 6, 2022
@tsaglam tsaglam added this to the v4.0.0 milestone Aug 6, 2022
@tsaglam tsaglam requested review from SuyDesignz, a team and sebinside August 6, 2022 14:57
Copy link
Member

@dfuchss dfuchss left a comment

Choose a reason for hiding this comment

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

Some first comments.

jplag.frontend.scala/pom.xml Outdated Show resolved Hide resolved
jplag.frontend.scala/pom.xml Outdated Show resolved Hide resolved
@robinmaisch
Copy link
Contributor Author

It turns out the IDE settings kept me from successfully upgrading to Scala 2.13, which I now succeeded in doing. Scalameta, the parser library used here, is in development for Scala 3, but not released yet, so it seems that we have to wait for that until Scala 3 can be fully supported.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 8, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

73.1% 73.1% Coverage
1.6% 1.6% Duplication

@tsaglam tsaglam merged commit f654065 into jplag:master Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue/PR that involves features, improvements and other changes language PR / Issue deals (partly) with new and/or existing languages for JPlag minor Minor issue/feature/contribution/change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants