Skip to content

search: add literal search parser for and/or operators

Administrator requested to merge rvt/4-add-and-or-literal-parser into master

Created by: rvantonder

Stacked PR no. 4. This adds the logic for RFC 176. The diff might seem large, but half of it is just moving existing tests to its own file. Summary:

  • Add a new, self-contained literal_parser.go. It became too brittle/difficult to attempt to thread in the new logic to the existing parser. So, I'm duplicating some parts of the existing parser to make this easier to implement and read (like parseAndLiteral and p.parseOrLiteral) that can definitely be deduped later

  • The main important additions are some of the logic in parseParameterListLiteral and callees to get the behavior described in RFC 176. The callees are very similar to existing scanners in parser.go.

  • Ported existing tests, added more, and made them more explicit to understand when results are due to a heuristic label.

Merge request reports

Loading