JS Flux parser in Rust
npm install @qxip/wasmy_flux
get_tree
to parse to AST treeget_syntax_error
to check for parsing error
const { get_syntax_error, get_tree } = require("@qxip/wasmy_flux");
const source = 'from(bucket:"telegraf/aaa") |> limit(limit:100, offset:10)';
if (get_syntax_error(source) == "" ){
console.log(get_tree(source));
} else { console.log(err) }
Based on wasmy_rust