File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,7 @@ module.exports = grammar({
165165 stmt : $ => $ . _stmt ,
166166 _stmt : $ => choice (
167167 $ . expr_stmt ,
168+ $ . _expr_ending_with_block ,
168169 $ . _global_stmt ,
169170 ) ,
170171
@@ -180,13 +181,10 @@ module.exports = grammar({
180181 ) ,
181182
182183 expr_stmt : $ => $ . _expr_stmt ,
183- _expr_stmt : $ => choice (
184- seq ( $ . _expr , ';' ) ,
185- prec ( 1 , $ . _expr_ending_with_block ) ,
186- ) ,
184+ _expr_stmt : $ => seq ( $ . _expr , ';' ) ,
187185
188186 expr : $ => $ . _expr ,
189- _expr : $ => choice (
187+ _expr : $ => prec ( 1 , choice (
190188 $ . ident ,
191189 $ . assign_expr ,
192190 $ . call_expr ,
@@ -195,7 +193,7 @@ module.exports = grammar({
195193 $ . break_expr ,
196194 $ . cont_expr ,
197195 $ . _expr_ending_with_block ,
198- ) ,
196+ ) ) ,
199197
200198 assign_expr : $ => $ . _assign_expr ,
201199 _assign_expr : $ => prec . left ( PREC . assign , seq (
You can’t perform that action at this time.
0 commit comments