Open
Description
We can parse the straw proposal text format into an AST (see src/ast.rs
and src/grammar.lalrpop
).
We should also support taking an AST and writing it out into the straw proposal text format.
I'd define a trait like
trait Unparse {
fn unparse<W>(&self, output: &mut W) -> std::io::Result<()>
where W: std::io::Write;
}
and implement it for all of our AST types, and expose a top level helper utility that takes a whole ast::WebidlBindingsSection
and recursively unparses the whole thing.