The project can be imported into IntelliJ IDEA. There are two default run configurations:
-
lexer parser
Regenerates the lexer and the parser -
Run IntelliJ
Recompiles the plugin ands starts an IDE with the plugin, can be used for debugging.
To work on grammar, the Grammar-Kit plugin needs to be installed. The grammar for the parser is defined in solidity.bnf, and the corresponding lexer is defined in _SolidityLexer.flex.
When working on grammar, it’s convenient to use the Live Preview
and Structure view
, see the usage instructions for the Grammar-Kit.
It’s important to remember that running the tests from IDE doesn’t regenerate the grammar, so every time the lexer or parser are changed, lexer parser
run configuration needs to be run.
The implementation of the formatter aims to follow the official style guide by default, but also to be configurable to step away from the conventions when needed.
The formatting rules are defined in src/main/kotlin/me/serce/solidity/ide/formatting
, with the corresponding tests in src/test/kotlin/me/serce/solidity/ide/formatting
. The official JetBrains documentation can be used as a reference.
User-reported errors are collected by Sentry. If you’re a contributor and would like to have an account, please contact @SerCeMan.