[Geany-devel] Minor "issue" with real-time tag parsing

Lex Trotman elextr at xxxxx
Tue Mar 15 23:42:34 UTC 2011

On 16 March 2011 04:05, Colomban Wendling <lists.ban at herbesfolles.org> wrote:
> Le 15/03/2011 08:21, Matthew Brush a écrit :
>> Hi,
>> I notice the items in the symbol list disappear when you're inside a
>> global "string literal" (or #include using quotes, but not <>) that
>> isn't closed yet.  Only the symbols below the unclosed quotes disappear.
>> This is probably not a new thing, just noticeable now that the symbol
>> list is updated in real-time.  My guess would be that the parser just
>> refuses to handle the rest of the file in this case, but maybe it should
>> skip to the next line and keep going or something, if this is even
>> possible.
> That's it: the parser you use (C for example) don't do magic with some
> invalid content. Of course, now it's more noticeable, 'cause as Jon
> said, this haven't changed :)
> Dumb parsers like most regexp-based ones are probably not affected by this.
> A proper solution would probably be to make the parsers handle this
> gracefully, but there is a limit to what we can do anyway. For example,
> it'd be really difficult, if not impossible, to find what to do with
> wrongly matched braces.

It would also be very hard to do something sensible with languages
which allow multi-line strings, once the string is opened the rest of
the file IS a string.

The only real solution is to not update any of the symbol list if the
parser detects a syntax error like unclosed string or mismatched
braces, and maybe it would be nice to inform the user in the status


More information about the Devel mailing list