Unnamed repository; edit this file 'description' to name the repository.
minor: simplify
Aleksey Kladov 2021-09-18
parent 77e8421 · commit 329b01c
-rw-r--r--crates/parser/src/grammar/items.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/parser/src/grammar/items.rs b/crates/parser/src/grammar/items.rs
index 0c52d5aadb..e0b740a815 100644
--- a/crates/parser/src/grammar/items.rs
+++ b/crates/parser/src/grammar/items.rs
@@ -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);