Enhanced C#
Language of your choice: library documentation
|
This interface allows serializing LNode objects into the syntax of a particular programming language. More...
This interface allows serializing LNode objects into the syntax of a particular programming language.
The ToString() method of an object that implements this interface should return the name of the programming language that it is able to print.
Public Member Functions | |
void | Print (LNode node, StringBuilder target, IMessageSink sink=null, ParsingMode mode=null, ILNodePrinterOptions options=null) |
Serializes the specified syntax tree to a StringBuilder in the syntax supported by this object. More... | |
void | Print (IEnumerable< LNode > nodes, StringBuilder target, IMessageSink sink=null, ParsingMode mode=null, ILNodePrinterOptions options=null) |
Serializes a list of syntax trees to a StringBuilder in the syntax supported by this object. More... | |
void Loyc.Syntax.ILNodePrinter.Print | ( | IEnumerable< LNode > | nodes, |
StringBuilder | target, | ||
IMessageSink | sink = null , |
||
ParsingMode | mode = null , |
||
ILNodePrinterOptions | options = null |
||
) |
Serializes a list of syntax trees to a StringBuilder in the syntax supported by this object.
nodes | Syntax trees to print. |
target | An output buffer, to which output is appended. |
sink | An object used to print warning and error messages. If this is null, messages are sent to MessageSink.Default. |
mode | Indicates the context in which the node(s) to be printed should be understood (e.g. is it a statement or an expression?). |
options | A set of options to control printer behavior. If null, an appropriate default set of options should be used. Some languages may support additional option interfaces beyond ILNodePrinterOptions. |
Some implementations can simply call LNodePrinter.PrintMultiple.
Implemented in Loyc.Ecs.EcsLanguageService, and Loyc.Syntax.Les.Les2LanguageService.
void Loyc.Syntax.ILNodePrinter.Print | ( | LNode | node, |
StringBuilder | target, | ||
IMessageSink | sink = null , |
||
ParsingMode | mode = null , |
||
ILNodePrinterOptions | options = null |
||
) |
Serializes the specified syntax tree to a StringBuilder in the syntax supported by this object.
node | A syntax tree to print. |
target | An output buffer, to which output is appended. |
sink | An object used to print warning and error messages. If this is null, messages are sent to MessageSink.Default. |
mode | Indicates the context in which the node(s) to be printed should be understood (e.g. is it a statement or an expression?). |
options | A set of options to control printer behavior. If null, an appropriate default set of options should be used. Some languages may support additional option interfaces beyond ILNodePrinterOptions. |
Implemented in Loyc.Ecs.EcsLanguageService.
Referenced by Loyc.Syntax.LNodePrinter.Print().