Enhanced C#
Loyc library documentation
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Public Member Functions | List of all members
Loyc.Syntax.Impl.ILNodePrinterHelper< out Self > Interface Template Reference

A fluent interface for classes that help you print syntax trees (ILNodes). More...


Source file:
Inheritance diagram for Loyc.Syntax.Impl.ILNodePrinterHelper< out Self >:
Loyc.Syntax.Impl.IPrinterHelper< out Self > Loyc.Syntax.Impl.ILNodePrinterHelperWithRevokableNewlines< Checkpoint, out Self > Loyc.Syntax.Impl.ILNodePrinterHelperWithRevokableNewlines< Checkpoint > Loyc.Syntax.Impl.LNodePrinterHelper Loyc.Syntax.Impl.PrinterState

Remarks

A fluent interface for classes that help you print syntax trees (ILNodes).

Template Parameters
SelfThe return type of methods in this interface.
Type Constraints
Self :ILNodePrinterHelper<Self> 

Public Member Functions

Self BeginNode (ILNode node)
 
Self EndNode ()
 Informs the helper that the printer is done writing the most recently started node. The helper may save the range of the node, e.g. by calling ILNodePrinterOptions.SaveRange. More...
 
Self BeginNode (ILNode node, PrinterIndentHint indentHint)
 Combines the BeginNode and Indent operations. More...
 
Self EndNode (PrinterIndentHint indentHint)
 Combines the EndNode and Dedent operations. More...
 
- Public Member Functions inherited from Loyc.Syntax.Impl.IPrinterHelper< out Self >
Self Write (char c)
 Appends a character to the output stream or StringBuilder. More...
 
Self Write (string s)
 Appends a string to the output stream or StringBuilder. More...
 
Self Write (UString s)
 Appends a string to the output stream or StringBuilder. More...
 
Self Space ()
 Writes a space character unless the last character written was a space. More...
 
Self Newline (bool deferIndent=false)
 Appends a newline, with indentation afterward according to the current indentation level. More...
 
Self FlushIndent ()
 Writes the pending indent, if applicable. This allows you to call Indent or Dedent afterward while making sure the indentation on the current line is unaffected. More...
 
Self NewlineIsRequiredHere ()
 Requests that a newline be written at this location. If this method is called multiple times at the same location, or if Newline(int) is called immediately afterward, only a single newline is written. More...
 
Self Indent (PrinterIndentHint?hint=null)
 Informs the helper that the printer is starting to write the specified node. The printer must call EndNode when it is done. This information may be used to record range information (to understand why this is useful, please read about LNodeRangeMapper) More...
 
Self Dedent (PrinterIndentHint?hint=null)
 Decreases the current indent level. More...
 

Additional Inherited Members

- Properties inherited from Loyc.Syntax.Impl.IPrinterHelper< out Self >
bool IsAtStartOfLine [get]
 Returns true iff nothing has been written since the last call to Newline or NewlineIsRequiredHere. More...
 
char LastCharWritten [get]
 Gets the character most recently written to the stream, or '' if no characters have been written. More...
 

Member Function Documentation

Self Loyc.Syntax.Impl.ILNodePrinterHelper< out Self >.BeginNode ( ILNode  node,
PrinterIndentHint  indentHint 
)

Combines the BeginNode and Indent operations.

Parameters
indentHintTypically a member of PrinterIndentHint that influences how indentation is performed

Implemented in Loyc.Syntax.Impl.LNodePrinterHelper.

Self Loyc.Syntax.Impl.ILNodePrinterHelper< out Self >.EndNode ( )

Informs the helper that the printer is done writing the most recently started node. The helper may save the range of the node, e.g. by calling ILNodePrinterOptions.SaveRange.

Parameters
abortIndicates that the range of this node should not be saved.

Implemented in Loyc.Syntax.Impl.LNodePrinterHelper.

Self Loyc.Syntax.Impl.ILNodePrinterHelper< out Self >.EndNode ( PrinterIndentHint  indentHint)

Combines the EndNode and Dedent operations.

Implemented in Loyc.Syntax.Impl.LNodePrinterHelper.