diff options
author | Edwin Cheng <[email protected]> | 2021-03-16 05:44:50 +0000 |
---|---|---|
committer | Edwin Cheng <[email protected]> | 2021-03-16 05:44:50 +0000 |
commit | 8e07b23b84bff16c0decc6f2b80c27862eac6df1 (patch) | |
tree | e8470eb83c1bc1283f0bb28ea01db789607a3140 /crates/parser/src/grammar.rs | |
parent | c0a2b4e826e1da20d3cfa8c279fcdffa24f32a7d (diff) |
Fix macro expansion for statements w/o semicolon
Diffstat (limited to 'crates/parser/src/grammar.rs')
-rw-r--r-- | crates/parser/src/grammar.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/parser/src/grammar.rs b/crates/parser/src/grammar.rs index 6c0e22722..cebb8f400 100644 --- a/crates/parser/src/grammar.rs +++ b/crates/parser/src/grammar.rs | |||
@@ -63,11 +63,11 @@ pub(crate) mod fragments { | |||
63 | } | 63 | } |
64 | 64 | ||
65 | pub(crate) fn stmt(p: &mut Parser) { | 65 | pub(crate) fn stmt(p: &mut Parser) { |
66 | expressions::stmt(p, expressions::StmtWithSemi::No) | 66 | expressions::stmt(p, expressions::StmtWithSemi::No, true) |
67 | } | 67 | } |
68 | 68 | ||
69 | pub(crate) fn stmt_optional_semi(p: &mut Parser) { | 69 | pub(crate) fn stmt_optional_semi(p: &mut Parser) { |
70 | expressions::stmt(p, expressions::StmtWithSemi::Optional) | 70 | expressions::stmt(p, expressions::StmtWithSemi::Optional, false) |
71 | } | 71 | } |
72 | 72 | ||
73 | pub(crate) fn opt_visibility(p: &mut Parser) { | 73 | pub(crate) fn opt_visibility(p: &mut Parser) { |
@@ -133,7 +133,7 @@ pub(crate) mod fragments { | |||
133 | continue; | 133 | continue; |
134 | } | 134 | } |
135 | 135 | ||
136 | expressions::stmt(p, expressions::StmtWithSemi::Optional); | 136 | expressions::stmt(p, expressions::StmtWithSemi::Optional, true); |
137 | } | 137 | } |
138 | 138 | ||
139 | m.complete(p, MACRO_STMTS); | 139 | m.complete(p, MACRO_STMTS); |