Enhanced C#
Language of your choice: library documentation
Properties | Public Member Functions | List of all members
Loyc.Syntax.Les.INodePrinterWriter Interface Reference

This interface is implemented by helper objects that handle the low-level details of node printing. It is used by Les2Printer. More...


Source file:
Inheritance diagram for Loyc.Syntax.Les.INodePrinterWriter:
Loyc.Syntax.Les.NodePrinterWriterBase Loyc.Syntax.Les.DefaultNodePrinterWriter

Remarks

This interface is implemented by helper objects that handle the low-level details of node printing. It is used by Les2Printer.

Specifically, INodePrinterWriter objects are in charge of how much to indent lines of code, and ensuring that there are spaces between tokens whenever omitting a space would screw up parsing.

Although this interface is also used by EC#, I've kept it in the Les namespace because I'm not yet confident that it's a good design for arbitrary languages.

Properties

object Target [get]
 Gets the object being written to (TextWriter or StringBuilder) More...
 
char LastCharWritten [get]
 
int LineNumber [get]
 

Public Member Functions

void Write (char c, bool finishToken)
 
void Write (string s, bool finishToken)
 
int Indent ()
 
int Dedent ()
 
void Space ()
 
void Newline (bool pending=false)
 
void BeginStatement ()
 
void BeginLabel ()
 
void Push (LNode newNode)
 
void Pop (LNode oldNode)
 
void Reset ()
 Called when a new, separate printing operation begins. More...
 

Member Function Documentation

◆ Reset()

void Loyc.Syntax.Les.INodePrinterWriter.Reset ( )

Called when a new, separate printing operation begins.

Implemented in Loyc.Syntax.Les.DefaultNodePrinterWriter, and Loyc.Syntax.Les.NodePrinterWriterBase.

Property Documentation

◆ Target

object Loyc.Syntax.Les.INodePrinterWriter.Target
get

Gets the object being written to (TextWriter or StringBuilder)