CIRCT
20.0.0git
|
Buffer tokens for clients that need to adjust things. More...
#include <PrettyPrinterHelpers.h>
Public Types | |
using | BufferVec = SmallVectorImpl< Token > |
Public Member Functions | |
BufferingPP (BufferVec &tokens) | |
void | add (Token t) |
template<typename R > | |
void | addTokens (R &&newTokens) |
Add a range of tokens. More... | |
void | eof () |
Buffer a final EOF, no tokens allowed after this. More... | |
void | flush (PrettyPrinter &pp) |
Flush buffered tokens to the specified pretty printer. More... | |
Public Attributes | |
BufferVec & | tokens |
bool | hasEOF = false |
Buffer tokens for clients that need to adjust things.
Definition at line 33 of file PrettyPrinterHelpers.h.
using circt::pretty::BufferingPP::BufferVec = SmallVectorImpl<Token> |
Definition at line 34 of file PrettyPrinterHelpers.h.
|
inline |
Definition at line 38 of file PrettyPrinterHelpers.h.
|
inline |
Definition at line 40 of file PrettyPrinterHelpers.h.
|
inline |
Add a range of tokens.
Definition at line 47 of file PrettyPrinterHelpers.h.
|
inline |
Buffer a final EOF, no tokens allowed after this.
Definition at line 53 of file PrettyPrinterHelpers.h.
|
inline |
Flush buffered tokens to the specified pretty printer.
Emit the EOF is one was added.
Definition at line 60 of file PrettyPrinterHelpers.h.
References circt::pretty::PrettyPrinter::addTokens(), circt::pretty::PrettyPrinter::eof(), hasEOF, and tokens.
bool circt::pretty::BufferingPP::hasEOF = false |
Definition at line 36 of file PrettyPrinterHelpers.h.
Referenced by add(), addTokens(), eof(), and flush().
BufferVec& circt::pretty::BufferingPP::tokens |
Definition at line 35 of file PrettyPrinterHelpers.h.
Referenced by add(), addTokens(), and flush().