|
370 | 370 | elseif "string" == _exp_0 then |
371 | 371 | real_name = name |
372 | 372 | end |
373 | | - if not (is_local or real_name and not self:has_name(real_name)) then |
| 373 | + if not (is_local or real_name and not self:has_name(real_name, true)) then |
| 374 | + _continue_0 = true |
| 375 | + break |
| 376 | + end |
| 377 | + self:put_name(real_name) |
| 378 | + if self:name_exported(real_name) then |
374 | 379 | _continue_0 = true |
375 | 380 | break |
376 | 381 | end |
|
385 | 390 | end |
386 | 391 | return _accum_0 |
387 | 392 | end)() |
388 | | - local _list_0 = undeclared |
389 | | - for _index_0 = 1, #_list_0 do |
390 | | - local name = _list_0[_index_0] |
391 | | - self:put_name(name) |
392 | | - end |
393 | 393 | return undeclared |
394 | 394 | end, |
395 | 395 | whitelist_names = function(self, names) |
396 | 396 | self._name_whitelist = Set(names) |
397 | 397 | end, |
| 398 | + name_exported = function(self, name) |
| 399 | + if self.export_all then |
| 400 | + return true |
| 401 | + end |
| 402 | + if self.export_proper and name:match("^%u") then |
| 403 | + return true |
| 404 | + end |
| 405 | + end, |
398 | 406 | put_name = function(self, name, ...) |
399 | 407 | local value = ... |
400 | 408 | if select("#", ...) == 0 then |
|
406 | 414 | self._names[name] = value |
407 | 415 | end, |
408 | 416 | has_name = function(self, name, skip_exports) |
409 | | - if not skip_exports then |
410 | | - if self.export_all then |
411 | | - return true |
412 | | - end |
413 | | - if self.export_proper and name:match("^%u") then |
414 | | - return true |
415 | | - end |
| 417 | + if not skip_exports and self:name_exported(name) then |
| 418 | + return true |
416 | 419 | end |
417 | 420 | local yes = self._names[name] |
418 | 421 | if yes == nil and self.parent then |
|
0 commit comments