[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Feature request: more detailed syntax error reporting
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Sun, 12 Jan 2014 11:40:38 -0200
>> $ lua -e "if x then"
>> lua: (command line):1: 'end' expected near <eof>
It seems that this is caused by the lack of end of line in the chunk
because this works fine:
$ lua -e "if x then^M"
lua: (command line):2: 'end' expected (to close 'if' at line 1) near <eof>
(here I've typed ^V^M to get a newline in the string.)
Compare also
$ echo 'if x then' | lua -
lua: stdin:2: 'end' expected (to close 'if' at line 1) near <eof>
$ echo -n 'if x then' | lua -
lua: stdin:1: 'end' expected near <eof>