Skip to content

Write ASTs out as straw proposal text format #4

Open
@fitzgen

Description

@fitzgen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions