I didn't look at the lexer code, but most lexers load the "keyword" lists from 
Geany.  Not sure how you can approach the two word keywords (curse Jeff and his 
femtolisp parser :-) where each word is a valid variable in other contexts. 
Unless you simply build it into the lexer, have it know and find the two word 
keywords first and do not test any of the keyword list keywords in that case.  

A similar (unsolved) issue happens with C++ where names like `override` which 
are keywords in one context and variable or type names in other contexts are 
currently keyword highlighted in all contexts since the lexer doesn't have 
sufficient capability to distinguish the context, it also happens in other IDEs 
where highlighting is separate from parsing (eg Eclipse).

So its not unprecedented if some edge cases are wrongly highlighted, just raise 
an issue after this is committed.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2584#issuecomment-865470214

Reply via email to