mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
minor: simplify
This commit is contained in:
parent
77e8421d0f
commit
329b01ca67
@ -415,9 +415,7 @@ fn macro_def(p: &mut Parser, m: Marker) {
|
|||||||
// test macro_def_curly
|
// test macro_def_curly
|
||||||
// macro m { ($i:ident) => {} }
|
// macro m { ($i:ident) => {} }
|
||||||
token_tree(p);
|
token_tree(p);
|
||||||
} else if !p.at(T!['(']) {
|
} else if p.at(T!['(']) {
|
||||||
p.error("unmatched `(`");
|
|
||||||
} else {
|
|
||||||
let m = p.start();
|
let m = p.start();
|
||||||
token_tree(p);
|
token_tree(p);
|
||||||
match p.current() {
|
match p.current() {
|
||||||
@ -425,6 +423,8 @@ fn macro_def(p: &mut Parser, m: Marker) {
|
|||||||
_ => p.error("expected `{`, `[`, `(`"),
|
_ => p.error("expected `{`, `[`, `(`"),
|
||||||
}
|
}
|
||||||
m.complete(p, TOKEN_TREE);
|
m.complete(p, TOKEN_TREE);
|
||||||
|
} else {
|
||||||
|
p.error("unmatched `(`");
|
||||||
}
|
}
|
||||||
|
|
||||||
m.complete(p, MACRO_DEF);
|
m.complete(p, MACRO_DEF);
|
||||||
|
Loading…
Reference in New Issue
Block a user