nixd
Loading...
Searching...
No Matches
RewriteString.h
Go to the documentation of this file.
1/// \file
2/// \brief Code action for converting between string literal syntaxes.
3///
4/// Transforms between double-quoted ("...") and indented (''...'') strings.
5
6#pragma once
7
9
10#include <nixf/Sema/ParentMap.h>
11
12#include <llvm/ADT/StringRef.h>
13
14#include <string>
15#include <vector>
16
17namespace nixf {
18class Node;
19} // namespace nixf
20
21namespace nixd {
22
23/// \brief Add rewrite action for string literal syntax conversion.
24///
25/// This action is offered when the cursor is on a string literal.
26/// It converts between double-quoted strings ("...") and indented
27/// strings (''...''), properly handling escape sequence differences.
28void addRewriteStringAction(const nixf::Node &N,
29 const nixf::ParentMapAnalysis &PM,
30 const std::string &FileURI, llvm::StringRef Src,
31 std::vector<lspserver::CodeAction> &Actions);
32
33} // namespace nixd
ParentMap analysis.
void addRewriteStringAction(const nixf::Node &N, const nixf::ParentMapAnalysis &PM, const std::string &FileURI, llvm::StringRef Src, std::vector< lspserver::CodeAction > &Actions)
Add rewrite action for string literal syntax conversion.