nixd
Loading...
Searching...
No Matches
WithToLet.h File Reference

Code action for converting with expressions to let/inherit. More...

#include <lspserver/Protocol.h>
#include <nixf/Sema/ParentMap.h>
#include <nixf/Sema/VariableLookup.h>
#include <llvm/ADT/StringRef.h>
#include <string>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  nixf
namespace  nixd

Functions

void nixd::addWithToLetAction (const nixf::Node &N, const nixf::ParentMapAnalysis &PM, const nixf::VariableLookupAnalysis &VLA, const std::string &FileURI, llvm::StringRef Src, std::vector< lspserver::CodeAction > &Actions)
 Add code action to convert with expression to let/inherit.

Detailed Description

Code action for converting with expressions to let/inherit.

Transforms: with lib; expr -> let inherit (lib) usedVars; in expr This makes variable sources explicit and improves code clarity.

Definition in file WithToLet.h.