I'm trying to match self.member.method1().method2(), it's important that I distinguish the members and methods as I will have to treat those differently in the macro body.
For simplicity's sake, let's say I'm not trying to match any args inside parenthesis:
macro_rules! foo {
( $($member:ident).* $($method:ident()).* ) => {
("ok")
}
}
doesn't work. I get ambiguous match error.
I guess it's bc method1() could match both $($member:ident).* and $($method:ident())*.
Any way to avoid this?