|
|
hace 3 años | |
|---|---|---|
| .. | ||
| src | hace 3 años | |
| README.md | hace 4 años | |
| pom.xml | hace 4 años | |
The JPlag Kotlin module allows the use of JPlag with submissions in Kotlin.
It is based on the Kotlin ANTLR4 grammar, licensed under the Apache 2.0.
The underlying grammar definition does not specify which version of Kotlin it is built on, but the presence of the inline keyword and the lack of support for trailing commas in argument lists indicate that it complies with Kotlin 1.3, released in late 2018.
The grammar in this repo contains a fix and some modifications to allow for easier token generation, see the comment in the KotlinParser.
If there are any major updates or fixes to the grammar1, they should surely be applied to this module as well.
The choice of tokens is intended to be similar to the Java or C# modules. It includes a range of nesting structures (class, method, control flow expressions) as well as variable declaration, object creation, assignment, and control flow altering keywords.
More syntactic elements of Kotlin may turn out to be helpful to include in the future.
To use the Kotlin module, add the -l kotlin flag in the CLI, or use a JPlagOption object set to LanguageOption.KOTLIN in the Java API as described in the usage information in the readme of the main project and in the wiki.