Crate dotrain

source ·
Expand description

.rain to rainlang composer written in rust and made available for NodeJs and broswers through wasm-bindgen in Typescript/Javascript.

  • Dotrain specs can be found here
  • Rainlang specs can be found here

The primary goal of the Rain language is to make smart contract development accessible for as many people as possible. This is fundamentally grounded in our belief that accessibility is the difference between theoretical and practical decentralisation. There are many people who would like to participate in authoring and auditing crypto code but currently cannot. When someone wants/needs to do something but cannot, then they delegate to someone who can, this is by definition centralisation. Fast and easy queue abstraction.

§Features

Includes 3 features:

  • cli A clap based module (CLI app) for functionalities of this library, this features is required for building/installing the binary
  • js-api includes wrappers around main structs and functionalities to provide an API through wasm_bindgen

Re-exports§

Modules§

  • A clap based module to produce a CLI app
  • Wrappers around main structs and functionalities to provide javascript/typescript API through wasm_bindgen, enabled by js-api feature
  • All data types of RainDocument/RainlangDocument parse tree and RegExp patterns used in parsing process

Structs§

Functions§

  • Parses a string by extracting the strings outside of matches
  • Fills a poistion in a text with whitespaces by keeping line structure intact
  • Fills a text with whitespaces excluding a position by keeping line structure intact
  • Parses an string by extracting matching strings.
  • Calculates the line number of the given position in the given text
  • Trims a text (removing start/end whitespaces) with reporting the number of deletions