You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
407 B
15 lines
407 B
use pest::Parser; |
|
use pest_derive::Parser; |
|
|
|
#[derive(Parser)] |
|
#[grammar = "foam.pest"] |
|
pub struct Foam; |
|
|
|
fn main() { |
|
let parse = Foam::parse(Rule::multi_comment, "/* this is comment */"); |
|
println!("{:?}", parse); |
|
let parse = Foam::parse(Rule::single_comment, "// this is comment"); |
|
println!("{:?}", parse); |
|
let parse = Foam::parse(Rule::field, "-273.15"); |
|
println!("{:?}", parse); |
|
}
|
|
|