Refactor Lua value converter into MacroImpl.scala