[PATCH] D59371: [LibTooling] Add Stencil library for format-string style codegen.
Yitzhak Mandelbaum via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 14 10:09:35 PDT 2019
ymandel created this revision.
ymandel added a reviewer: ilya-biryukov.
ymandel added a project: clang.
Herald added subscribers: jdoerfert, jfb, mgorny.
This file defines the *Stencil* abstraction: a code-generating object, parameterized by named references to (bound) AST nodes. Given a match result, a stencil can be evaluated to a string of source code.
A stencil is similar in spirit to a format string: it is composed of a series of raw text strings, references to nodes (the parameters) and helper code-generation operations.
See thread on cfe-dev list with subject "[RFC] Easier source-to-source transformations with clang tooling" for background.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D59371
Files:
clang/include/clang/Tooling/Refactoring/Stencil.h
clang/lib/Tooling/Refactoring/CMakeLists.txt
clang/lib/Tooling/Refactoring/Stencil.cpp
clang/unittests/Tooling/CMakeLists.txt
clang/unittests/Tooling/StencilTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59371.190655.patch
Type: text/x-patch
Size: 23861 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190314/183d4955/attachment-0001.bin>
More information about the cfe-commits
mailing list