Aleksey Kladov b56e020077 Apply couple of rule of thumbs to simplify highlighting code
Main one: instead of adding a parameter to function to handle special
case, make the caller handle it.

Second main one: make sure that function does a reasonable thing.
`highlight_def` picks  a color for def, *regardless* of the context
the def is use. Feeding an info from the call-site muddies the
responsibilities here.

Minor smells, flagging the function as having space for improvement in
the first place:

* many parameters, some of which are set as constants on most
call-sites (introduce severalfunction instad)
* boolean param (add two functions instead)
2020-08-19 17:53:41 +02:00
..
2020-08-12 16:22:05 +02:00
2020-08-18 16:50:07 +02:00
2020-08-13 17:58:27 +02:00
2020-08-13 10:36:04 +02:00
2020-08-13 17:58:27 +02:00
2020-08-13 17:58:27 +02:00
2020-08-18 16:50:07 +02:00
2020-08-13 10:36:04 +02:00
2020-08-13 18:50:21 +02:00
2020-08-13 17:58:27 +02:00
2020-08-12 16:35:29 +02:00
2020-08-19 11:27:02 +00:00
2020-08-19 15:16:24 +02:00
2020-08-18 23:51:01 +02:00
2020-08-17 14:30:24 +00:00
2020-08-13 17:58:27 +02:00
2020-08-12 16:46:54 +02:00
2020-08-14 02:03:54 +02:00
2020-08-13 17:58:27 +02:00