rbx_rsml/lib.rs
1mod lexer;
2pub use lexer::{lex_rsml, Token};
3
4mod parser;
5pub use parser::{parse_rsml, TreeNode, TreeNodes};
6
7mod string_clip {
8 pub trait StringClip {
9 fn clip<'a>(&'a self, start: usize, end: usize) -> &'a str;
10 }
11
12 impl StringClip for str {
13 fn clip<'a>(&'a self, start: usize, end: usize) -> &'a str {
14 &self[start..self.len() - end]
15 }
16 }
17}