lua-users home
lua-l archive

Lua DSL for configuration

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


There is a configuration file I deal with that has a syntax like so:
VARIABLE "MyVar" = "Hello"
I thought that, perhaps, Lua could read it directly. Having a function called VARIABLE that works with Lua's simplified single parameter string syntax will solve the VARIABLE "MyVar" portion:
function VARIABLE(name)
 --
end
At this point, I am uncertain what I would have VARIABLE() return that would allow me to pick up the right side (= "Hello") of the configuration line.
Any thoughts? Is it possible?
Thanks.
Josh

AltStyle によって変換されたページ (->オリジナル) /