nixd
Loading...
Searching...
No Matches
nixd
lib
Controller
CodeActions
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
8
#include <
lspserver/Protocol.h
>
9
10
#include <
nixf/Sema/ParentMap.h
>
11
12
#include <llvm/ADT/StringRef.h>
13
14
#include <string>
15
#include <vector>
16
17
namespace
nixf
{
18
class
Node
;
19
}
// namespace nixf
20
21
namespace
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.
28
void
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.h
ParentMap analysis.
nixf::Node
Definition
Basic.h:12
Protocol.h
nixd
Definition
CommandLine/Configuration.h:9
nixd::addRewriteStringAction
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.
Definition
RewriteString.cpp:106
nixf
Definition
Diagnostic.h:19
Generated by
1.15.0