Prints a Loyc tree in LES (Loyc Expression Syntax) format.
Unless otherwise noted, the default value of all options is false.
|
INodePrinterWriter | Writer [get, set] |
|
IMessageSink | Errors [get, set] |
|
bool | AllowExtraParenthesis [get, set] |
| Introduces extra parenthesis to express precedence, without using an empty attribute list [] to allow perfect round-tripping. More...
|
|
bool | OmitMissingArguments [get, set] |
| When an argument to a method or macro has the value @`` , it will be omitted completely if this flag is set. More...
|
|
bool | OmitSpaceTrivia [get, set] |
| When this flag is set, space trivia attributes are ignored (e.g. CodeSymbols.TriviaSpaceAfter). More...
|
|
bool | OmitComments [get, set] |
| When this flag is set, comment trivia attributes are ignored (e.g. CodeSymbols.TriviaSLCommentAfter). More...
|
|
bool | QuoteUnprintableLiterals [get, set] |
| When the printer encounters an unprintable literal, it calls Value.ToString(). When this flag is set, the string is placed in double quotes; when this flag is clear, it is printed as raw text. More...
|
|
bool | OmitUnknownTrivia [get, set] |
| Causes unknown trivia (other than comments, spaces and raw text) to be dropped from the output. More...
|
|
bool | PrintExplicitTrivia [get, set] |
| Causes comments and spaces to be printed as attributes in order to ensure faithful round-trip parsing. By default, only "raw text" and unrecognized trivia is printed this way. Note: #trivia_inParens is always printed as parentheses. More...
|
|
bool | ObeyRawText [get, set] |
| Causes raw text to be printed verbatim, as the EC# printer does. When this option is false, raw text trivia is printed as a normal attribute. More...
|
|
|
static LesNodePrinter | New (StringBuilder target, string indentString="\t", string lineSeparator="\n", IMessageSink sink=null) |
|
static LesNodePrinter | New (TextWriter target, string indentString="\t", string lineSeparator="\n", IMessageSink sink=null) |
|
static void | Print (LNode node, StringBuilder target, IMessageSink errors, object mode, string indentString, string lineSeparator) |
|
static string | PrintId (Symbol name) |
|
static string | PrintLiteral (object value, NodeStyle style=0) |
|
static string | PrintString (string text, char quoteType, bool tripleQuoted) |
|
static bool | IsNormalIdentifier (Symbol name) |
| Returns true if the given symbol can be printed as a normal identifier, without an "@" prefix. Note: identifiers starting with "#" still count as normal; call LNode.HasSpecialName to detect this. More...
|
|
bool Loyc.Syntax.Les.LesNodePrinter.AllowExtraParenthesis |
|
getset |
Introduces extra parenthesis to express precedence, without using an empty attribute list [] to allow perfect round-tripping.
For example, the Loyc tree x * @+(a, b)
will be printed x * (a + b)
, which is a slightly different tree (the parenthesis add the trivia attribute #trivia_inParens.)