@@ -42,7 +42,7 @@ function parser:transform_expression_list(node)
4242 for i = 1 , # list do
4343 output [# output + 1 ] = self :transform (list [i ])
4444 end
45- return table.concat (output , " ," )
45+ return table.concat (output , " , " )
4646end
4747
4848--- Convert a variable_list to a transformed list of variable names.
@@ -53,7 +53,7 @@ function parser:transform_variable_list(node)
5353 for i = 1 , # list do
5454 output [# output + 1 ] = self :transform (list [i ])
5555 end
56- return table.concat (output , " ," )
56+ return table.concat (output , " , " )
5757end
5858
5959local _tablegen_level = 0
@@ -489,7 +489,14 @@ handlers['assignment'] = function(self, node)
489489 if node .is_local then
490490 output [1 ] = " local "
491491 end
492- if node .variable_list .is_destructuring then
492+ if node .is_nil then
493+ local names = {}
494+ for i , v in ipairs (node ) do -- luacheck: ignore 213
495+ table.insert (names , self :transform (v ))
496+ end
497+ table.insert (output , table.concat (names , " , " ))
498+ return table.concat (output )
499+ elseif node .variable_list .is_destructuring then
493500 local expression = self :transform (node .expression_list [1 ])
494501 local name
495502 if node .expression_list [1 ].type == " variable" and
0 commit comments