|
|
пре 3 година | |
|---|---|---|
| .. | ||
| src | пре 3 година | |
| README.md | пре 4 година | |
| pom.xml | пре 4 година | |
The JPlag Go frontend allows the use of JPlag with submissions in Go.
It is based on the Golang ANTLR4 grammar, licensed under BSD-3.
The underlying grammar definition does not specify which version of Go it is built on. This is what we know:
If the grammar is updated to a more recent1 syntax definition, this module should surely be updated as well.
The choice of tokens is intended to be similar to the Java or C# frontends. Specifically, among others, it includes a range of nesting structures (class and method declarations, control flow expressions) as well as variable declaration, object creation, assignment, and control flow altering keywords.
Blocks are distinguished by their context, i.e. there are separate TokenTypes for if blocks, for blocks, class bodies, method bodies, array constructors, and the like.
More syntactic elements of Go may turn out to be helpful to include in the future, especially those that are newly introduced.
To use the Go frontend, add the -l golang flag in the CLI, or use a JPlagOption object set to LanguageOption.GO_LANG in the Java API as described in the usage information in the readme of the main project and in the wiki.