File tree 1 file changed +3
-15
lines changed
crates/parser/src/grammar
1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ pub(super) fn stmt(p: &mut Parser, with_semi: StmtWithSemi) {
67
67
attributes:: outer_attrs ( p) ;
68
68
69
69
if p. at ( T ! [ let ] ) {
70
- let_stmt ( p, m, with_semi ) ;
70
+ let_stmt ( p, m) ;
71
71
return ;
72
72
}
73
73
@@ -147,8 +147,7 @@ pub(super) fn stmt(p: &mut Parser, with_semi: StmtWithSemi) {
147
147
// let _: ! = {};
148
148
// let f = #[attr]||{};
149
149
// }
150
- fn let_stmt ( p : & mut Parser , m : Marker , with_semi : StmtWithSemi ) {
151
- assert ! ( p. at( T ![ let ] ) ) ;
150
+ fn let_stmt ( p : & mut Parser , m : Marker ) {
152
151
p. bump ( T ! [ let ] ) ;
153
152
patterns:: pattern ( p) ;
154
153
if p. at ( T ! [ : ] ) {
@@ -157,18 +156,7 @@ pub(super) fn stmt(p: &mut Parser, with_semi: StmtWithSemi) {
157
156
if p. eat ( T ! [ =] ) {
158
157
expressions:: expr_with_attrs ( p) ;
159
158
}
160
-
161
- match with_semi {
162
- StmtWithSemi :: Yes => {
163
- p. expect ( T ! [ ; ] ) ;
164
- }
165
- StmtWithSemi :: No => { }
166
- StmtWithSemi :: Optional => {
167
- if p. at ( T ! [ ; ] ) {
168
- p. eat ( T ! [ ; ] ) ;
169
- }
170
- }
171
- }
159
+ p. expect ( T ! [ ; ] ) ;
172
160
m. complete ( p, LET_STMT ) ;
173
161
}
174
162
}
You can’t perform that action at this time.
0 commit comments