mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Special-case try macro_rules
This commit is contained in:
parent
fec1e7c8e1
commit
45c4f620b1
3 changed files with 39 additions and 0 deletions
|
@ -415,6 +415,17 @@ pub(super) fn macro_call_after_excl(p: &mut Parser) -> BlockLike {
|
|||
if p.at(IDENT) {
|
||||
name(p);
|
||||
}
|
||||
// Special-case `macro_rules! try`.
|
||||
// This is a hack until we do proper edition support
|
||||
|
||||
// test try_macro_rules
|
||||
// macro_rules! try { () => {} }
|
||||
if p.at(T![try]) {
|
||||
let m = p.start();
|
||||
p.bump_remap(IDENT);
|
||||
m.complete(p, NAME);
|
||||
}
|
||||
|
||||
match p.current() {
|
||||
T!['{'] => {
|
||||
token_tree(p);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue