Code generation for ASTs with syntax errors

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Code generation for ASTs with syntax errors

Marcus Denker-4
Yes, we should fix it… 

On 21 May 2015, at 09:22, Denis Kudriashov <[hidden email]> wrote:

But statement after error is parsed and ast node exists for them.
Is it not correct to make end of error equal to start of next ast node?

19 мая 2015 г. 11:22 пользователь "Marcus Denker" <[hidden email]> написал:

On 19 May 2015, at 10:32, Thierry Goubier <[hidden email]> wrote:



2015-05-19 10:27 GMT+02:00 Marcus Denker <[hidden email]>:

 
And that view get the selection wrong ;)


No, the ErrorNode has “all the rest” as it’s extend for Shout so it can color the error just the same as people are used to.

Ok.

But I'd really like Shout not to color red the rest of the code when I start to modify code half way through a method :)

Is that inherent to the way ErrorNode instances are generated or is it just done to maintain as it was?


I am not entirely sure… it sets the code of the ErrorNode to be just from where we are to the end of the to be parsed text.
At that point it is hard to know the real extend of the error… needs to be checked how to do it nicer.

I think we should first get it in a state that we can replace the shout parser (both for syntax highlight and code completion).

Marcus

12