simple_ir_transformer 0.0.3

SITER - SImple Ir TransformER
Documentation
use simple_ir_transformer::{IR, Value};

fn main() {
    let ir_json = r#"
    {
        "imports": ["sys", "os"],
        "var:my_variable": {
            "value": "hello world"
        },
        "var:count": {
            "value": 42
        },
        "var:is_active": {
            "value": true
        },
        "call:echo": {
    "args": ["Hello", "@my_variable"]
}
    }
    "#;

    let ir = IR::new(ir_json.to_string());

    for lang in ["Python", "JavaScript", "Lua"] {
        println!("=== {} ===", lang);
        match ir.transpile(lang) {
            Ok(code) => println!("{}", code),
            Err(e)   => eprintln!("Ошибка: {}", e),
        }
    }
}