Refactor DidYouMean (#7535)
authorGereon Kremer <nafur42@gmail.com>
Mon, 1 Nov 2021 10:52:55 +0000 (03:52 -0700)
committerGitHub <noreply@github.com>
Mon, 1 Nov 2021 10:52:55 +0000 (10:52 +0000)
commitffdc8a3676aad41d0fcef0290241aa9df2e5be1b
tree8816ea1d63eabedd1722e78915038bef97755232
parent47ddb344f317496928dddd4b017867b8c07dbded
Refactor DidYouMean (#7535)

This refactors the `DidYouMean` class, which is used to make helpful suggestions for misspelled tags and options. It uses `std::vector` instead of `std::set`, moves it from `options` to `util` (so that we can keep using it in both libcvc5 and the driver) and generally modernizes the code a bit. Also, it replaces the stand-alone and never executed test by a regular unit test.
src/CMakeLists.txt
src/main/options_template.cpp
src/options/didyoumean.cpp [deleted file]
src/options/didyoumean.h [deleted file]
src/options/didyoumean_test.cpp [deleted file]
src/options/options_handler.cpp
src/util/CMakeLists.txt
src/util/didyoumean.cpp [new file with mode: 0644]
src/util/didyoumean.h [new file with mode: 0644]
test/unit/util/CMakeLists.txt
test/unit/util/didyoumean_black.cpp [new file with mode: 0644]