Rholang plugin for the IntelliJ Platform
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea
docs
resources/META-INF
src
test/coop/rchain
testData
.editorconfig
.gitignore
CONTRIBUTING.md
LICENSE
README.md

README.md

Rholang IntelliJ IDEA language plugin

beta

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 Process 🌀 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. 🍭

Configure custom colors on the settings page

Maybe you want to set color for Bind parameter which has no default value.

Idea settings page

Install

From JetBrains Plugins Repository searchable inside the editor.

Or download rholang-idea.jar from the latest release and install through File > Settings > Plugins menu.

Contributing

Any feedback, suggestions, bugs, testing, pull-requests, issues are very welcome. 😄

Development

  • 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

Test

IntelliJ has provided testing framework. This framework simplifies verification. For more details, you can read IntelliJ Platform SDK DevGuide.

How to use

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'.

Deployment

TODO

Release Notes

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.

0.0.3

  • Syntax: Contracts as processes (recursive).
  • Syntax: Fix arithmetic operators.
  • New file icon.

0.0.2

  • Contributing info, plugin name change.

0.0.1

  • Initial release. Syntax highlighting.

License

The MIT License (MIT)