2015-05-19 11:22 GMT+02:00 Marcus Denker <[email protected]>:

>
> On 19 May 2015, at 10:32, Thierry Goubier <[email protected]>
> wrote:
>
>
>
> 2015-05-19 10:27 GMT+02:00 Marcus Denker <[email protected]>:
>
>>
>>
>>>
>> 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.
>

In the example you give, the parser is able to trigger an error, go up the
ast tree, and restart correct parsing further down the source code, no? Is
that the way you are doing it?

I'm interested in a general parsing theory for that kind of error detection
/ recovery.

Thierry



>
> 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
>

Reply via email to