mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +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
|
||||
// macro m { ($i:ident) => {} }
|
||||
token_tree(p);
|
||||
} else if !p.at(T!['(']) {
|
||||
p.error("unmatched `(`");
|
||||
} else {
|
||||
} else if p.at(T!['(']) {
|
||||
let m = p.start();
|
||||
token_tree(p);
|
||||
match p.current() {
|
||||
@ -425,6 +423,8 @@ fn macro_def(p: &mut Parser, m: Marker) {
|
||||
_ => p.error("expected `{`, `[`, `(`"),
|
||||
}
|
||||
m.complete(p, TOKEN_TREE);
|
||||
} else {
|
||||
p.error("unmatched `(`");
|
||||
}
|
||||
|
||||
m.complete(p, MACRO_DEF);
|
||||
|
Loading…
Reference in New Issue
Block a user