clang
10.0.0svn
|
A stencil is represented as a sequence of "parts" that can each individually generate a code string based on a match result. More...
#include "clang/Tooling/Transformer/Stencil.h"
Public Member Functions | |
virtual | ~StencilPartInterface ()=default |
virtual llvm::Error | eval (const ast_matchers::MatchFinder::MatchResult &Match, std::string *Result) const =0 |
Evaluates this part to a string and appends it to Result . More... | |
virtual std::string | toString () const =0 |
Constructs a string representation of the StencilPart. More... | |
Protected Member Functions | |
StencilPartInterface ()=default | |
StencilPartInterface (const StencilPartInterface &)=default | |
StencilPartInterface & | operator= (const StencilPartInterface &)=default |
A stencil is represented as a sequence of "parts" that can each individually generate a code string based on a match result.
The different kinds of parts include (raw) text, references to bound nodes and assorted operations on bound nodes.
Users can create custom Stencil operations by implementing this interface.
|
virtualdefault |
|
protecteddefault |
|
protecteddefault |
|
pure virtual |
Evaluates this part to a string and appends it to Result
.
Result
is undefined in the case of an error.
Referenced by clang::transformer::Stencil::operator()().
|
protecteddefault |
|
pure virtual |
Constructs a string representation of the StencilPart.
StencilParts generated by the selection
and run
functions do not have a unique string representation.