Closed
Description
As noted in #2 (comment),
watt::sym::token_stream_parse
is me being too lazy to implement a Rust syntax tokenizer in wasm (aka copy it fromproc-macro2
), but we could likely optimize that slightly by running that in wasm as well.
We'll need to import something like https://github.com/alexcrichton/proc-macro2/blob/1.0.6/src/strnom.rs and use that to implement token stream parsing rather than calling out to a host func.
It's possible we can simplify the implementation from proc-macro2 by omitting the parts that deal with parsing comments, as those won't appear in our use case.