parsing - How to handle unknown initializer functions in lua? -


i want load data written in variant of lua (eyeonscript). however, data peppered references initialization functions not in plain lua:

redden = brightnesscontrast {     inputs = {         red = input {             value = 0,         },     }, } 

standard lua gives "attempt call nil value" or "unexpected symbol" errors. there way catch these , pass sort of generic initializer?

i want wind nested table data structure.

thanks!

set __index metamethod table of globals. instance, undefined functions behave identity:

setmetatable(_g,{__index=function (n)                            return function (x) return x end                          end}) 

Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -