diff options
Diffstat (limited to 'examples/config-passthru.lua')
-rw-r--r-- | examples/config-passthru.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/examples/config-passthru.lua b/examples/config-passthru.lua new file mode 100644 index 0000000..83c2769 --- /dev/null +++ b/examples/config-passthru.lua @@ -0,0 +1,21 @@ +-- examples/config-passthru.lua +-- +-- Demonstration of re-serialising a configuration in Clod +-- +-- Copyright 2012 Daniel Silverstone <dsilvers@digital-scurf.org> +-- + +clod = require "clod" + +local input_config = [[ +something "here" + +other.thing "there" +]] + +conf, err = clod.parse(input_config) +if not conf then + error(err) +end + +io.stdout:write(conf:serialise()) |