Skip to content

search: unify parser routines

Administrator requested to merge rvt/unify-parsers-take3 into master

Created by: rvantonder

Dealing with some long-awaited cleanup. Currently there are code paths for the regex/literal parsers, and for simplicity when I implemented RFC 176 I created two separate parsers, duplicating common code. But these two parsers really only differ in handling the leaf node patterns. This PR makes it so that the parser for the leaf nodes are chosen only when different code paths is taken, deleting the redundant parts.

The tidying is not quite done yet, because the two functions parseLeavesRegexp and parseLeavesLiteral contain a lot of common code that I will factor out in a next PR.

Going by commit is only kind of useful.

Merge request reports

Loading