change how values are passed to compiled template, require a buffer pos if passing buffer

This commit is contained in:
leaf corcoran
2014-02-06 20:10:12 -08:00
parent 443f4ad8e6
commit 3c68088308
3 changed files with 12 additions and 8 deletions

View File

@@ -138,8 +138,8 @@ first_fn = parser:load(parser:compile_to_lua("Hello "))
second_fn = parser:load(parser:compile_to_lua("World"))
buffer = {}
parser:run(first_fn, nil, buffer)
parser:run(second_fn, nil, buffer)
parser:run(first_fn, nil, buffer, #buffer)
parser:run(second_fn, nil, buffer, #buffer)
print(table.concat(buffer)) -- print 'Hello World'
```