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

Code action for converting inherit to explicit binding. More...

#include <lspserver/Protocol.h>
#include <nixf/Sema/ParentMap.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::addInheritToBindingAction (const nixf::Node &N, const nixf::ParentMapAnalysis &PM, const std::string &FileURI, llvm::StringRef Src, std::vector< lspserver::CodeAction > &Actions)
 Add code action to convert inherit to explicit binding.

Detailed Description

Code action for converting inherit to explicit binding.

Offers to convert inherit statements to explicit bindings:

  • { inherit x; } -> { x = x; }
  • { inherit (b) a; } -> { a = b.a; }

Definition in file InheritToBinding.h.