61206120
61216121 elseif nodeType == " declaration" then
61226122 local decl = node
6123+ if not decl .names [1 ] then
6124+ addValidationError (path , errors , " Missing name(s)." )
6125+ end
61236126 for i , ident in ipairs (decl .names ) do
61246127 if ident .type ~= " identifier" then
61256128 addValidationError (path , errors , " Name %d is not an identifier. (It is '%s')" , i , ident .type )
@@ -6137,13 +6140,19 @@ do
61376140
61386141 elseif nodeType == " assignment" then
61396142 local assignment = node
6143+ if not assignment .targets [1 ] then
6144+ addValidationError (path , errors , " Missing target expression(s)." )
6145+ end
61406146 for i , expr in ipairs (assignment .targets ) do
61416147 if not (expr .type == " identifier" or expr .type == " lookup" ) then
61426148 addValidationError (path , errors , " Target %d is not an identifier or lookup. (It is '%s')" , i , expr .type )
61436149 else
61446150 validateNode (expr , path , errors , " target" .. i )
61456151 end
61466152 end
6153+ if not assignment .values [1 ] then
6154+ addValidationError (path , errors , " Missing value(s)." )
6155+ end
61476156 for i , expr in ipairs (assignment .values ) do
61486157 if not EXPRESSION_NODES [expr .type ] then
61496158 addValidationError (path , errors , " Value %d is not an expression. (It is '%s')" , i , expr .type )
0 commit comments