-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Hi. I've been reading syntax mode code and it seems very clever to avoid full parsing
but I've encountered several times with cases when multiline tokens where:
considering the code:
char* hello = "hello \ world \ godbye"; int x = 1;
and having
world \ goodbye"; int x = 1;
on focus, the syntax mode 'world goodbye' are displayed in normal text and
'"; int x = 1...' is displayed a string token.
The "parser" doesnt recognize "world \ godbye" comes from a string
opening just a few lines before the focused text. I've searching a few points in the
code and there is actually a function in dmsyntax.c (setup(...)) which implements some
king of backtraking to detect this case. Managed to understand it somehow but
it is never evaluated.
I want to implement a buffer option to effect in the parsing code to
"alternate" the syntax detection considering the first token is part of
a multilinetoken (coment or string), nothing smart, just an option.
I modified the setup(...) function to do just that by this is not in the path
of syntax drawing.
Where this feature should go in the code or where begins the parsing?