Inject global variables from global table

This enhance the existing inject_global_value rule to be able to inline the value when it's indexed from _G.

Before, darklua could only inline global variables that were used like this:

if GLOBAL then --[[ ... ]] end

This PR makes it possible to inline globals indexed from _G:

if _G.GLOBAL then --[[ ... ]] end

Closes #33 (closed)

Edited by jeparlefrancais

Merge request reports

Loading