Enhanced C#
Language of your choice: library documentation
|
A set of relatively universal printing options that LNodePrinters should understand. More...
A set of relatively universal printing options that LNodePrinters should understand.
Properties | |
bool | AllowChangeParentheses [get] |
Indicates that it is preferable to add (or remove) parenthesis to produce good-looking output, rather than to express faithfully whether or not parentheses were present in the Loyc tree being printed. More... | |
bool | OmitComments [get] |
When this flag is set, comment trivia attributes are suppressed (e.g. CodeSymbols.TriviaSLCommentAfter). More... | |
bool | OmitUnknownTrivia [get] |
Causes trivia that the printer does not recognize (other than comments, spaces and raw text) to be dropped from the output rather than printed as attributes. More... | |
bool | PrintTriviaExplicitly [get] |
If supported by the printer, this option causes comments and spaces to be printed as attributes in order to ensure faithful round-trip parsing. More... | |
bool | CompatibilityMode [get] |
If there are multiple ways to print a given node, this option indicates that the printer should prefer an older, more compatible syntactic style over new ones, where applicable. More... | |
bool | CompactMode [get] |
When this flag is set, the amount of whitespace in the output is reduced in a printer-defined way, in order to save bits. More... | |
string | IndentString [get] |
Specifies the string to use for each level of indentation of nested constructs in the language, e.g. a tab or four spaces. More... | |
string | NewlineString [get] |
Specifies the string to use for line breaks (typically "\n"). More... | |
ILiteralPrinter | LiteralPrinter [get] |
Requests that a specific printer be used to convert literals into strings. More... | |
|
get |
Indicates that it is preferable to add (or remove) parenthesis to produce good-looking output, rather than to express faithfully whether or not parentheses were present in the Loyc tree being printed.
For example, the Loyc tree x *
(LESv3 notation) will be printed +
(a, b)x * (a + b)
, which is a slightly different tree (the parenthesis add the trivia attribute inParens.)
|
get |
When this flag is set, the amount of whitespace in the output is reduced in a printer-defined way, in order to save bits.
This option should not suppress newlines, indents or trivia. To suppress newlines or indents, the user can use empty strings for IndentString and NewlineString.
|
get |
If there are multiple ways to print a given node, this option indicates that the printer should prefer an older, more compatible syntactic style over new ones, where applicable.
For example, it tells the EC# printer to use C# printing mode. This option does not prevent printing of new constructs if such are present in the code, however.
|
get |
Specifies the string to use for each level of indentation of nested constructs in the language, e.g. a tab or four spaces.
If this option is null, the printer should use its default indent string.
Indentation-sensitive languages should treat an empty string as one space or tab.
|
get |
Requests that a specific printer be used to convert literals into strings.
The printer may choose to only use this printer for type markers it doesn't have built-in support for, or it may use this printer for all literals.
|
get |
Specifies the string to use for line breaks (typically "\n").
If this option is null, the printer should use its default newline string, which is almost always "\n".
Newline-sensitive languages should treat an empty string the same as null.
This string may or may not be used for line breaks inside multiline strings, depending on how strings are defined in the language being printed.
Referenced by Loyc.Syntax.LNodePrinter.PrintMultiple().
|
get |
When this flag is set, comment trivia attributes are suppressed (e.g. CodeSymbols.TriviaSLCommentAfter).
|
get |
Causes trivia that the printer does not recognize (other than comments, spaces and raw text) to be dropped from the output rather than printed as attributes.
Note: Some printers may force all unknown trivia to be dropped.
|
get |
If supported by the printer, this option causes comments and spaces to be printed as attributes in order to ensure faithful round-trip parsing.
Note: Some printers may ignore OmitUnknownTrivia, and OmitComments when this flag is true.