summaryrefslogtreecommitdiffstats
path: root/third_party/rust/fluent-syntax/benches/parser_iai.rs
blob: f2eed5e5b13c68f20935ca28ed08e59c956c12b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use fluent_syntax::parser::parse_runtime;

fn iai_parse_ctx_runtime() {
    let files = &[
        include_str!("contexts/browser/appmenu.ftl"),
        include_str!("contexts/browser/browser.ftl"),
        include_str!("contexts/browser/menubar.ftl"),
        include_str!("contexts/preferences/preferences.ftl"),
    ];
    for source in files {
        parse_runtime(*source).expect("Parsing of the FTL failed.");
    }
}

iai::main!(iai_parse_ctx_runtime);