onescript-preprocessor 0.1.0

Preprocessor for OneScript language
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use onescript_preprocessor::preprocessor::Preprocessor;

#[test]
fn test_remove_directive() {
    let example = "#region Test\nProcedure Test()\nEndProcedure\n#EndRegion";

    let expected = " \nProcedure Test()\nEndProcedure\n ";

    let preprocessor = Preprocessor::new();
    let result = preprocessor.preprocess(example);
    assert_eq!(expected, result);
}