chiark / gitweb /
doxygen: add functions twice to the search data.
authorVladimír Vondruš <mosra@centrum.cz>
Sun, 4 Feb 2018 20:14:52 +0000 (21:14 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Sun, 4 Feb 2018 22:56:27 +0000 (23:56 +0100)
commitefe5986ddc767ce0484e1749b61da1927c5c34b9
tree1683b0f19d00902a1b7205d3886533c470942e44
parent9cb4211f50dc074a48ef9f0455cd6841ef360889
doxygen: add functions twice to the search data.

With the breadth-first traversal for search result gathering we need to
handle two things:

 1. Show a function named min() among other three-letter names (such as
    BlendEquation::Min), so in fact have it just as "min" in the trie.
 2. But make it still possible to search for min() with the parentheses
    after in order to filter out non-function results, so in fact have
    it *also* as "min()" in the trie.

This required that the result prefix merging was updated to allow
self-referencing (an item being a complete alias of another item).
That's now allowed only if the suffix length differ and is allowed only
from one side to avoid a cycle. Suffix length differs, because one
result has the () suffix while the other hasn't.

In order to prevent the function from appearing twice in the results, a
lookahead barrier is added to the ( character. That was nicely simple.
doxygen/dox2html5.py
doxygen/test/test_search.py