Re: Feature request: more detailed syntax error reporting
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Feature request: more detailed syntax error reporting
- From: Dirk Laurie <dirk.laurie@...>
- Date: 2014年1月12日 15:58:42 +0200
2014年1月12日 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>:
>> If you leave out an 'end', the error message isn't very helpful:
>>
>> $ lua -e "if x then"
>> lua: (command line):1: 'end' expected near <eof>
>
> OTOH, this works just fine;
>
> $ echo 'if x then' | lua -
> lua: stdin:2: 'end' expected (to close 'if' at line 1) near <eof>
>
Or just postpone the closing quote until later.
$ lua -e "if x then
>"
lua: (command line):2: 'end' expected (to close 'if' at line 1) near <eof>