[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Is it possible to point out all the errors in an already written Lua script? Is there a IDE that could achieve this goal?
- From: Gé Weijers <ge@...>
- Date: Tue, 26 Jan 2021 10:38:25 -0800
On Sun, Jan 24, 2021 at 11:20 PM 孙世龙 sunshilong <sunshilong369@gmail.com> wrote:
>
> Hi, list
> As the title, It seems impossible to achieve this goal since Lua
> stops to do more work after encountering the first error.
> Am I missing something?
The problem is that there is no good and efficient strategy to modify
the input ('fix' the error) so the compiler is guaranteed to be able
to continue and analyze the rest of the program in a meaningful way.
What do you do, insert a symbol, delete a symbol, ...? If the 'fix' is
wrong you're likely to end up with a cascade of error messages that
are completely missing the mark.
In the days when compiling a program took a long time there was a good
reason to pay attention to recovering from compilation errors so you
could fix multiple errors between compiler runs, but compiling a Lua
program takes milliseconds on any reasonable machine so it's probably
not worth the trouble to modify the parser to do something clever
enough to recover from most errors.
--
Gé