summaryrefslogtreecommitdiff
path: root/examples/config-passthru.lua
blob: 83c2769ada26a7c5dffd4128f2fad3c7b38e2207 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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())