robinpath 0.1.0

RobinPath - A lightweight, fast scripting language interpreter for automation and data processing
Documentation

robinpath

A lightweight, fast scripting language interpreter for automation and data processing — written in Rust.

RobinPath is a domain-specific language designed for data transformation, text processing, and task automation. This crate provides the core interpreter that can be embedded in any Rust application.

Usage

Add to your Cargo.toml:

[dependencies]
robinpath = "0.1"

Execute code

use robinpath::RobinPath;

fn main() {
    let mut rp = RobinPath::new();
    rp.execute(r#"
        set $name = "world"
        print "Hello, " + $name + "!"
    "#).unwrap();

    for line in rp.output() {
        println!("{}", line);
    }
}

Parse to AST

use robinpath::RobinPath;

fn main() {
    let ast = RobinPath::parse(r#"set $x = 1 + 2"#).unwrap();
    println!("{:#?}", ast);
}

Features

  • Variables, expressions, and control flow (if/else, for, while)
  • First-class functions (define/enddef)
  • Built-in modules: Math, String, Array, Map, Type, Json, File, Http
  • JSON and map/array data structures
  • String interpolation and formatting
  • Error handling with try/catch

Repository

github.com/wiredwp/robinpath-rs

License

MIT