UnparseFormat¶
Synopsis¶
Declared in <src/backend/unparser/formatSupport/unparse_format.h>
class UnparseFormat; Member Functions¶
| Name | Description |
|---|---|
UnparseFormatUnparseFormat(UnparseFormat const& X) = delete; [constructor] | Constructors |
~UnparseFormat~UnparseFormat(); [destructor] | Destructor |
operator=UnparseFormat& operator=(UnparseFormat const& X) = delete; [deleted] | Copy assignment operator |
begin_compact_directivevoid begin_compact_directive(); | |
current_colint current_col() const; | |
current_indentint current_indent() const; | |
current_lineint current_line() const; | |
disable_linewrapvoid disable_linewrap(); | |
emit_compact_directivevoid emit_compact_directive(std::string const& text); | |
emit_literalvoid emit_literal(std::string const& text); | |
emit_raw_textvoid emit_raw_text(std::string const& text); | |
finalize_compact_outputvoid finalize_compact_output(); | |
finish_compact_directivevoid finish_compact_directive(); | |
flushvoid flush(); | |
formatvoid format( SgLocatedNode*, SgUnparse_Info& info, FormatOpt opt = FORMAT_BEFORE_STMT); | the ultimate formatting functions |
get_compact_outputbool get_compact_output() const; | |
get_indentstopint get_indentstop() const; | |
get_linewrapstd::optional<int> get_linewrap() const; | |
has_compact_directivebool has_compact_directive() const; | |
insert_newlinevoid insert_newline( int count = 1, std::optional<int> indent = std::nullopt); | |
line_is_emptybool line_is_empty() const; | |
require_noncompact_categoryvoid require_noncompact_category(char const* category) const; | |
set_compact_outputvoid set_compact_output(bool enabled); | |
set_linewrapvoid set_linewrap(std::optional<int> width); | |
statement_indentint statement_indent() const; | |
operator<<UnparseFormat& operator<<(std::string out); | Left shift operators |
Private Member Functions¶
| Name | Description |
|---|---|
bufferNormalSpacevoid bufferNormalSpace(); | |
discardNormalPendingSpacesvoid discardNormalPendingSpaces(); | |
emitCompactCharactervoid emitCompactCharacter(char ch); | |
emitCompactTextvoid emitCompactText(std::string const& text); | |
flushNormalPendingSpacesvoid flushNormalPendingSpaces(); | |
formatHelpbool formatHelp( SgLocatedNode*, SgUnparse_Info& info, FormatOpt opt = FORMAT_BEFORE_STMT); | |
insert_spacevoid insert_space(int); | |
removeTrailingZerosvoid removeTrailingZeros(char* inputString); | make the output nicer |
requireCompactOutputWritablevoid requireCompactOutputWritable() const; | |
resolveCompactPendingSpacevoid resolveCompactPendingSpace(char nextCharacter); |
Private Data Members¶
| Name | Description |
|---|---|
chars_on_line | indent of the current line |
compactDirectiveActive | |
compactDirectiveBuffer | |
compactFinalized | |
compactHasPreviousInputCharacter | |
compactOutput | |
compactPendingSpace | |
compactPreviousInputCharacter | |
currentIndent | stores current line number being unparsed |
currentLine | |
formatHelpInfo | the directed output for the current file |
indentstop | caller-selected wrap mode restored after temporary formatter overrides |
linewrap | the current indent for statement |
normalPendingSpaces | |
os | The previous SgLocatedNode unparsed |
prevnode | the number of spaces allowed for indenting |
stmtIndent | the number of characters printed on the line |
userDefinedLinewrap | the enabled positive line width, or disabled wrapping |
Created with MrDocs