- Syntax assistance with specified language grammar that facilitates navigation, completion and highlighting;
- Development tools integration that includes: Vyper compiler, SmartCheck static analyzer, MythX with projection onto editor;
- Fast function testing with Vyper-debug/Vyper-run
- Docker so you basically need only IDEA and Docker :) ;
- Nevertheless, pre-alpha.
See demo on youtube.
To build and run the project, open it in IntelliJ IDEA. Then, run the "Run Plugin" configuration, which is already set up in the project.
Alternatively, use the buildPlugin
task to build it.
After that, locate the created .zip
in /bild/distributions
folder and add it as external plugin ("Install Plguin from Disk... ").
To test the plugin without installation you might run runIde
task in gradle, which will execute an IDEA instance with the plugin installed.
To generate files for the plugin we use the Grammar Kit plugin. To generate the files, you should have the plugin installed.
- Run the
Generate Parser Code
task in theVyper.bnf
file. That generatesVyperParser.java
andpsi
files.- However, the generator is not fully Kotlin compatible.
We need to add a
Companion
call toparseLight
(line 24) manually. - If some grammar elements are removed, old
psi
files may be left in the project. They should be removed manually.
- However, the generator is not fully Kotlin compatible.
We need to add a
- Run the
Generate JFlex Lexer
task in theVyper.bnf
file. That generates_VyperLexer.flex
file. - Run the
Run JFlex Generator
task in the_VyperLexer.flex
file. That generatesVyperLexer.java
file.
More documentation: Grammar-Kit.