lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, Nov 22, 2013 at 10:26 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
>> code =  "return '\n' "
>> =load(code)
> nil    [string "return '..."]:1: unfinished string near '''
>

Because you didn't escape the backslash embedded in the string. It's
trying to parse this code:

return '
'

And of course that's not legal in Lua.

/s/ Adam