[Github-comments] [geany/geany] Highlight C function names (patch available) (#1231)

linvinus notifications at xxxxx
Thu Sep 15 09:47:18 UTC 2016


oh, i found, it loads struct definitions and etc. 
ok i understand that.

but i agree with @b4n 
CPP lexer in already checking lists for every word in file,
increasing this lists will slowdown geany.

```
					if (keywords.InList(s)) {
						lastWordWasUUID = strcmp(s, "uuid") == 0;
						sc.ChangeState(SCE_C_WORD|activitySet);
					} else if (keywords2.InList(s)) {
						sc.ChangeState(SCE_C_WORD2|activitySet);
					} else if (keywords4.InList(s)) {
						sc.ChangeState(SCE_C_GLOBALCLASS|activitySet);
...
							int subStyle = classifierIdentifiers.ValueFor(s);
							if (subStyle >= 0) {
								sc.ChangeState(subStyle|activitySet);
							}
```

my approach don't use any list.

probably, example from @codebrainz could be resolved if we collect detected function definition in some list.
so that only local functions will be in that list, then pointers of that functions also will be highlighted 


-- 
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/issues/1231#issuecomment-247284429
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160915/f2b39203/attachment.html>


More information about the Github-comments mailing list