f1r3fly-tree-sitter-rholang

Crates.iof1r3fly-tree-sitter-rholang
lib.rsf1r3fly-tree-sitter-rholang
version0.1.0
created_at2025-07-28 22:04:13.166995+00
updated_at2025-07-28 22:04:13.166995+00
descriptionF1r3fly Rholang grammar for tree-sitter - incremental parsing for Rholang smart contracts
homepagehttps://f1r3fly.io
repositoryhttps://github.com/F1R3FLY-io/f1r3fly
max_upload_size
id1771636
size2,763,561
Stephen Preston (spreston8)

documentation

https://docs.rs/f1r3fly-tree-sitter-rholang

README

f1r3fly-tree-sitter-rholang

F1r3fly Rholang grammar for tree-sitter - incremental parsing for Rholang smart contracts.

Overview

This crate provides a tree-sitter grammar for the Rholang programming language, enabling fast incremental parsing for editors, IDEs, and development tools.

Tree-sitter is a parser generator tool and an incremental parsing library that creates concrete syntax trees for source files and efficiently updates them as the source file is edited.

Features

  • Incremental Parsing: Fast, incremental parsing of Rholang source code
  • Editor Integration: Support for syntax highlighting and code analysis
  • Rust Bindings: Native Rust integration for F1r3fly ecosystem
  • Grammar Definition: Complete Rholang language grammar

Usage

Add to your Cargo.toml:

[dependencies]
f1r3fly-tree-sitter-rholang = "0.1.0"

Basic usage:

use tree_sitter::Parser;
use f1r3fly_tree_sitter_rholang::language;

let mut parser = Parser::new();
parser.set_language(language()).expect("Error loading Rholang grammar");

let source_code = "new stdout(`rho:io:stdout`) in { stdout!(\"Hello, Rholang!\") }";
let tree = parser.parse(source_code, None).unwrap();

Building

cargo build --release

Testing

cargo test

License

Licensed under the MIT License.

Commit count: 204

cargo fmt