Re: Minor typo in error message
Roberto Ierusalimschy <[email protected]> Sun, 12 Jul 2026 16:27:37 -0300
| Newsgroups | gmane.comp.lang.lua.general |
|---|---|
| Message-ID | <[email protected]> |
> In Lua 5.5 when you try to use string with invalid > escape sequence -- error message lacks closing quote. >=20 > For example let's try invalid escape code "\c": >=20 > =C2=A0 Lua 5.5.0=C2=A0 Copyright (C) 1994-2025 Lua.org, PUC-Rio > =C2=A0 > '\c' > =C2=A0 stdin:1: invalid escape sequence near ''\c' >=20 > I believe it should end on "''\c''". The closing quote is not part of the invalid escape sequence, why it must be in the error message? Note that the closing quote can be quite far away, or it may not even exist: > '\caaaaaaaaaaaaaaaaaaaaaaaaaa' stdin:1: invalid escape sequence near ''\c' > '\caaaaaaaaaaaaaaaaaaa stdin:1: invalid escape sequence near ''\c' Lua stops reading as soon as it finds an error. -- Roberto --=20 You received this message because you are subscribed to the Google Groups "= lua-l" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/lua-l/20260= 712192737.GA109171%40arraial.inf.puc-rio.br.