dsntk-feel-parser 0.2.0

dsntk | DecisionToolkit | FEEL parser
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use dsntk_feel_grammar::lalr_rust_tables;
use std::process::Command;

fn main() {
  if std::env::var("CARGO_FEATURE_PARSING_TABLES").is_ok() {
    // generate new LALR parsing tables for FEEL grammar
    // when executed with --features=parsing-tables
    lalr_rust_tables("./src/lalr.rs");
    // reformat the generated code
    let status = Command::new("cargo")
      .args(["+nightly", "fmt", "-p", "dsntk-feel-parser"])
      .status()
      .expect("failed to run code formatter");
    if !status.success() {
      panic!("code formatter failed");
    }
  }
}