This is the early stage of editor support for Rholang. 😄
For now, it has only support for syntax highlighting. I tried to make parser more forgiving so it can highlight wider range of correct programs. With more context information from compiler it could be much more precise.
Rholang is a fully featured, general purpose, Turing-complete programming language built from the rho-calculus. It is a behaviorally typed, r-eflective, h-igher o-rder process language and the official smart contracting language of RChain. Its purpose is to concretize fine-grained, programmatic concurrency. RChain Architecture
Rholang is currently in active development and syntax can slightly change. Current version of plugin follows this version of Rho grammar and available examples.
I found interesting that many grammar rules have a strong gravity towards Proc
ess 🌀 but that should not be strange for π-calculus, λ-expression is not the main actor here. Mobile process calculi for programming the new blockchain
Programmers in concurrent languages such as Erlang/Elixir say that one of the hardest problems is to coordinate the names (locations) of processes. It seems that Rholang with Namespace logic looks like a great solution for coordination of resources.
With all this sweet superpowers, that comes with the Rholang compiler and type checker, it will be a pleasure to write smart contracts. 🍭
Maybe you want to set color for Bind parameter which has no default value.
From JetBrains Plugins Repository searchable inside the editor.
Or download rholang-idea.jar from the latest release and install through File > Settings > Plugins menu.
Any feedback, suggestions, bugs, testing, pull-requests, issues are very welcome. 😄
- setup IntelliJ dev-plugin prerequisites
- generate Java parser from
Rho.bnf
through the file context menu Generate Parser Code - generate Java lexer from
Rho.flex
through the file context menu Run JFlex Generator (choose out folder or any folder outside the project where jflex.jar will be downloaded) - build the project (choose IntelliJ SDK and language level 8)
- create new Plugin Run configuration with default setup
- run/debug in a separate editor
- optionally, to keep formatting consistent install plugin for EditorConfig
IntelliJ has provided testing framework. This framework simplifies verification. For more details, you can read IntelliJ Platform SDK DevGuide.
Just as using JUnit, there is a 'run' button on the left of the class or test case. You can click this button to run or debug. Also, right-click on the test
folder has option to Run/Debug 'All Tests'.
- generate jar file through the project root context menu Prepare Plugin Module ... For Deployment (in
.idea
folder) - upload jar to JetBrains Plugins Repository
- write more tests and configure CI
- write Completion Contributor
- write Reference Contributor
- add plugin actions
- connect with the compiler (get semantic info)
- ...
0.2.0 @AbnerZheng
- Updated grammar for Rholang Mercury release.
0.1.0 @AbnerZheng
- Implemented formatting feature.
- Updated grammar (quick fix before Mercury) @tgrospic.
0.0.4 @AbnerZheng
- Implemented folding feature.
- Added initial tests.
- Syntax: Contracts as processes (recursive).
- Syntax: Fix arithmetic operators.
- New file icon.
- Contributing info, plugin name change.
- Initial release. Syntax highlighting.