Stream: t-lang

Topic: pass literals to other macros

Roland Kuhn (May 18 2020 at 15:20, on Zulip):

Not sure whether this is the right place to ask: when expanding a declarative macro to include a proc macro invocation, literals are hidden behind an opaque token — the only way to inspect a matched literal is to match it with TokenTree type. This is quite restricting because it means that the proc macro needs to handle all the cases if I want to treat literals differently. What is the reason for this restriction?

Last update: Jun 05 2020 at 22:40UTC