The colon operatorPIL in Lua is a little syntatic sugar. It's used in object oriented Lua, to make a regular function call look more like a method call. What it does is pass the object as the self
parameter when you call a function. Take this example:
a.myFunction(a, 'foo')
It's equivalent to:
a:myFunction('foo')
In your example, the method call is omiting the parentheses because its only argument is a tablePIL, so your function call without the colon operator would be somthing like:
res.template(res, {
main = 'functionform.html',
functionjs = '_functionform.js',
functionform = '_functionform.html'
})
So as you can see, this little syntatic sugar is pretty handy