[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: How does Lua parse newlines?
- From: "Soni L." <fakedme@...>
- Date: Sat, 14 Oct 2017 14:05:33 -0300
On 2017-10-14 02:00 PM, Francisco Olarte wrote:
On Sat, Oct 14, 2017 at 5:43 PM, Soni L. <email@example.com> wrote:
print(load('return "\\z \n\r \n\r \r\n \n \n\\x"', "@test"))
nil test:6: hexadecimal digit expected near '"\x"
WHY LINE 6. I NEED TO KNOW.
Because you forgot to escape the newlines and it is in the sixth line?
i.e., preceeding your line with:
Oh. Yeah, that's right. 5 newlines make 6 lines.
Why can't I figure out how to parse it myself tho...
function load(...) return ... end
gives me: (start of line dots added for easier counting )
.> print(load('return "\\z \n\r \n\r \r\n \n \n\\x"', "@test"))
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.