Skip to content

Instantly share code, notes, and snippets.

@LI7XI
LI7XI / ConfigParser.md
Last active January 25, 2021 00:53
Pure Lua Configuration files Parser, Converts ini to Lua Tables

Hi! This is a Pure Lua Implementation to Convert .ini Configuration Files to lua Tables.

The Conversion Mainly Depends on String Pattern Match.

function MakeConfigTable(ConfigPath)
  local Config = {}
  local Section, Key, Value

  for l in io.lines(ConfigPath) do