UCL-CREST / Siamese

Siamese: a scalable code clone search engine
GNU General Public License v3.0
35 stars 22 forks source link

Introducing JavaScript Extension #18

Closed MRHMisu closed 4 years ago

MRHMisu commented 4 years ago

This pull request introduces JavaScript Extension for Siamese. The extension has been developed following the Siamese Language Extension Manual provided by @tsuiwwwayne.

Four Interfaces are implemented with some additional classes. Implemented Interfaces for JavaScript can be found under the package crest.siamese.language.javascript

Additional Classes:

Two supportive Classes are required to store inside the crest.siamese.language.javascript.antlr4. These classes are provided with ANTLR4 JavaScript Grammar They will not be generated by ANTLR4; instead, the generated JavaScriptLexer and JavaScriptParser are inherited from these classes.

Apart from this, Siamese now can take multiple file extension as input, for example, in the config.properties file:

For all newly added classes, 38 unit test cases are added. The test suit has achieved almost 100% Line Coverage.

Feel free, to ask any question regarding the JavaScript extension.

MRHMisu commented 4 years ago

@cragkhit Could you please review and approve the pull request?

MRHMisu commented 4 years ago

@cragkhit Thanks for your feedback. The config.properties has been reverted to Java configuration.