From 41963df4a583b77189ec4230d7b6f69c83d88932 Mon Sep 17 00:00:00 2001 From: Lunaphied Date: Tue, 18 Jun 2024 16:24:49 -0600 Subject: 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 --- src/libcmd/repl.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libcmd/repl.cc') 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 #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; +using NdString = std::unique_ptr; /** * 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}; } /** -- cgit v1.2.3