|
| TokenStreamWithCallback (PPTy &pp, PrintEventAndStorageListener< CallableType, DataType > &saver, bool enableCallback) |
|
void | addCallback (DataType d) |
| Add a Callback token.
|
|
| TokenStream (PPTy &pp, TokenStringSaver &saver) |
| Create a TokenStream using the specified PrettyPrinter and StringSaver storage.
|
|
TokenStream & | operator<< (const char *s) |
| Add a string literal (external storage).
|
|
TokenStream & | operator<< (StringRef s) |
| Add a string token (saved to storage).
|
|
TokenStream & | operator<< (const PPExtString &str) |
| String has external storage.
|
|
TokenStream & | operator<< (const PPSaveString &str) |
| String must be saved.
|
|
TokenStream & | operator<< (PP s) |
| Convenience for inline streaming of builder methods.
|
|
TokenStream & | operator<< (Token t) |
| Stream support for user-created Token's.
|
|
template<typename T > |
TokenStream & | addAsString (T &&t) |
| General-purpose "format this" helper, for types not supported by operator<< yet.
|
|
template<typename Callable , unsigned BufferLen = 128> |
auto | invokeWithStringOS (Callable &&c) |
| Helper to invoke code with a llvm::raw_ostream argument for compatibility.
|
|
TokenStream & | writeEscaped (StringRef str, bool useHexEscapes=false) |
| Write escaped versions of the string, saved in storage.
|
|
TokenStream & | writeQuotedEscaped (StringRef str, bool useHexEscapes=false, StringRef left="\"", StringRef right="\"") |
|
template<typename T , typename Callable > |
auto | scopedBox (T &&t, Callable &&c, Token close=EndToken()) |
| Open a box, invoke the lambda, and close it after.
|
|
| TokenBuilder (PPTy &pp) |
|
template<typename T , typename... Args> |
std::enable_if_t< std::is_base_of_v< Token, T > > | add (Args &&...args) |
| Add new token.
|
|
void | addToken (Token t) |
|
void | eof () |
| End of a stream.
|
|
void | literal (StringRef str) |
| Add a literal (with external storage).
|
|
void | nbsp () |
| Add a non-breaking space.
|
|
void | nbsp (unsigned n) |
| Add multiple non-breaking spaces as a single token.
|
|
void | neverbreak () |
| Add a 'neverbreak' break. Always 'fits'.
|
|
void | newline () |
| Add a newline (break too wide to fit, always breaks).
|
|
void | spaces (uint32_t n) |
| Add breakable spaces.
|
|
void | space () |
| Add a breakable space.
|
|
void | zerobreak () |
| Add a break that is zero-wide if not broken.
|
|
void | bbox (int32_t offset=0, Breaks breaks=Breaks::Consistent) |
| Start a IndentStyle::Block group with specified offset.
|
|
void | cbox (int32_t offset=0, IndentStyle style=IndentStyle::Visual) |
| Start a consistent group with specified offset.
|
|
void | ibox (int32_t offset=0, IndentStyle style=IndentStyle::Visual) |
| Start an inconsistent group with specified offset.
|
|
void | neverbox () |
| Start a group that cannot break, including nested groups.
|
|
void | end () |
| End a group.
|
|
template<typename CallableType, typename DataType, typename PPTy = PrettyPrinter>
class circt::pretty::TokenStreamWithCallback< CallableType, DataType, PPTy >
Wrap the TokenStream with a helper for CallbackTokens, to record the print events on the stream.
Definition at line 378 of file PrettyPrinterHelpers.h.