bitsy-script 0.2.1

Interpreter for Bitsy scripting language
Documentation
  • Coverage
  • 25%
    18 out of 72 items documented0 out of 0 items with examples
  • Size
  • Source code size: 28.26 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 7.07 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 14s Average build duration of successful builds.
  • all releases: 14s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • orsinium-labs/bitsy-script
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • orsinium

bitsy-interpreter

Rust interpreter for the scripting language used for dialogs in Bitsy game engine.

It's far from 100% compatibility. A lot of complex nodes won't be parsed. The goal was to keep the implementation simple and the AST flat. This might change in the future implementations and we'll hopefully have a proper parser for all quirks and gimmicks of bitsy.

Installation

cargo add bitsy-script

Usage

use bitsy_script::*;
let dialog = "hello {wvy}world{/wvy}!{br}";
let mut state = State::default();
let tokenizer = Tokenizer::new(dialog);
let interpreter = Interpreter {
    tokens: tokenizer,
    state: &mut state,
};
let words: Vec<_> = interpreter.collect();