# wxml-parser
[wean-wxml](https://github.com/ctripcorp/wean/tree/master/wxml) rust version, compile wxml source to [fre](https://github.com/yisar/fre) jsx code.
- [Playground](https://yisar.github.io/wxml-parser/)
### Usage
```rust
pub mod lexer;
pub mod parser;
pub mod generator;
fn main() {
let mut parser = parser::Parser::new("
hello {{item}}!
a
b
");
let ast = parser.parse_all().unwrap();
let mut gen = generator::Generator::new(ast);
let code = gen.generate_fre();
println!("{:#?}", code)
// <>{list.map((item)=>hello {item}!{a?a:b?b:ture?:null})}>
}
```