syntax_pos: Introduce a helper for checking whether a span comes from expansion
This commit is contained in:
parent
f7af19c279
commit
dfcbe75900
12 changed files with 25 additions and 20 deletions
|
|
@ -1101,7 +1101,7 @@ impl<'a> Parser<'a> {
|
|||
|
||||
crate fn process_potential_macro_variable(&mut self) {
|
||||
self.token = match self.token.kind {
|
||||
token::Dollar if self.token.span.ctxt() != SyntaxContext::empty() &&
|
||||
token::Dollar if self.token.span.from_expansion() &&
|
||||
self.look_ahead(1, |t| t.is_ident()) => {
|
||||
self.bump();
|
||||
let name = match self.token.kind {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue