[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: unexpected syntax error
- From: Matthias Kluwe <mkluwe@...>
- Date: Wed, 28 Nov 2012 17:17:28 +0100
Hi!
I played around trying to create a small DSL and stumbled upon an unexpected behaviour. This is a small example:
local function f()
return setmetatable( {}, {
__div = function( t, arg )
print( arg )
end } )
end
f{} / 'a'
I get the error message "unexpected symbol near '/'".
Surprisingly, the following prints 'a':
(function() end)( f{} / 'a' )
Regards,
Matthias