On Wed, Jan 11, 2012 at 12:52 PM, Alexander Gladysh
<agladysh@gmail.com> wrote:
> That seems like a valid error message - LuaJIT is more strict. Better
> to throw up your hands than continue to be wrong!
Note also that, AFAIR, Metalua fails on that as well
It does, it seemed to be The Right Thing (tm). If you disagree, look at function unesc_letter() in lexer.lua, and replace "return t[x] or error 'blah blah blah'" with "return t[x] or x" :)
I believe it's The Right Thing because when such a thing happens:
- either the writer mistakenly thought that the character was special, and it's helpful to inform him that it isn't;
- or he did a typo, e.g. he wrote "\y" instead of "\t", and that's a nasty bug which you'd better pinpoint for him.
In any case, a piece of code is always better off without faulty escape sequences.