@matklad any opinions on https://github.com/rust-analyzer/ungrammar/pull/14? I'd like to clean up how we handle macros, and this would be a useful step towards that.
I guess, it makes sense, even if I don't like it from purity perspective :D
@Jonas Schievink feel free to merge (to also check that you have perms)
Thanks! Merging seems to work
Hmm, what kind of version bump does this need? Just minor?
Ah I'm not a crate owner anyways https://crates.io/crates/ungrammar
@Jonas Schievink there's CI job for continious publishing
but I prob should add a team
minod bump would be ok
thread 'main' panicked at 'not yet implemented: Rep(Seq([Token(Token(14)), Node(Node(39))]))', xtask/src/codegen/gen_syntax.rs:585:13
xtask codegen dislikes
(';' MacroArm)*, although it has no problems with
(',' GenericArg)* in
Yeah, there's a special-casing special-case in there
although, it should be generic over
Perhaps you need
() around the comma list?
yeah, looks like it. although macro rules aren't optional.
that needs to be a validation error I think
Hmm, this generates the wrong API for
MacroArm = TokenTree '=>' TokenTree
MacroArm type only has a single
fn token_tree(&self) -> Option<TokenTree>
I think you need
MacroArm = pattern:TokenTree '=>' template:TokenTree
I think I'll roll back the addition of
MacroArm, it requires too many changes in mbe