aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd
diff options
context:
space:
mode:
authorLunaphied <lunaphied@lunaphied.me>2024-06-18 16:24:49 -0600
committerlunaphied <lunaphied@lunaphied.me>2024-07-10 02:25:48 +0000
commit41963df4a583b77189ec4230d7b6f69c83d88932 (patch)
tree3c272f6388b276ca69fb6df4687db206a3528244 /src/libcmd
parent6e0ca0242579dc6114ccfc2417406372acc3004c (diff)
lix-doc: update dependencies and refactor
This updates the version of rnix used and refactors the code generally to be more precise and capable in it's identification of both lambdas and determining which documentation comments are attached. Change-Id: Ib0dddabd71f772c95077f9d7654023b37a7a1fd2
Diffstat (limited to 'src/libcmd')
-rw-r--r--src/libcmd/repl.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libcmd/repl.cc b/src/libcmd/repl.cc
index bb9225ce5..635b54958 100644
--- a/src/libcmd/repl.cc
+++ b/src/libcmd/repl.cc
@@ -40,24 +40,24 @@
#include <gc/gc_cpp.h>
#endif
-// XXX: These are for nix-doc features and will be removed in a future rewrite where this functionality is integrated more natively.
+// XXX: These are for lix-doc features and will be removed in a future rewrite where this functionality is integrated more natively.
extern "C" {
- char const *nd_get_function_docs(char const *filename, size_t line, size_t col);
- void nd_free_string(char const *str);
+ char const *lixdoc_get_function_docs(char const *filename, size_t line, size_t col);
+ void lixdoc_free_string(char const *str);
}
namespace nix {
/** Wrapper around std::unique_ptr with a custom deleter for strings from nix-doc **/
-using NdString = std::unique_ptr<const char, decltype(&nd_free_string)>;
+using NdString = std::unique_ptr<const char, decltype(&lixdoc_free_string)>;
/**
* Fetch a string representing the doc comment using nix-doc and wrap it in an RAII wrapper.
*/
NdString lambdaDocsForPos(SourcePath const path, nix::Pos const &pos) {
std::string const file = path.to_string();
- return NdString{nd_get_function_docs(file.c_str(), pos.line, pos.column), &nd_free_string};
+ return NdString{lixdoc_get_function_docs(file.c_str(), pos.line, pos.column), &lixdoc_free_string};
}
/**