Options to control the way EcsNodePrinter's output is formatted.
EcsPrinterOptions has some configuration options that will defeat round-tripping (from LNode to text and back) but will make the output look better. For example, AllowExtraBraceForIfElseAmbig will print a tree such as #if(a, #if(b, f()), g())
as if (a) { if (b) f(); } else g();
, by adding braces to eliminate prefix notation, even though braces make the Loyc tree different.
|
override bool | CompatibilityMode [get, set] |
|
override bool | CompactMode [get, set] |
|
bool | MixImmiscibleOperators [get, set] |
| Allows operators to be mixed that will cause the parser to produce a warning. An example is x & ==(y, z) : if you enable this option, it will be printed as x & y == z , which the parser will complain about because mixing those operators is deprecated. More...
|
|
bool | AllowExtraBraceForIfElseAmbig [get, set] |
| Solve if-else ambiguity by adding braces rather than reverting to prefix notation. More...
|
|
bool | DropNonDeclarationAttributes [get, set] |
| Suppresses printing of attributes inside methods and inside subexpressions, except on declaration or definition statements where attributes are normally allowed (such as classes, methods and generic type parameters). This option also avoids prefix notation when the attributes would have required it, e.g. +([Foo] a, b) can be printed "a + b" instead. More...
|
|
bool | OmitMissingArguments [get, set] |
| When an argument to a method or macro has an empty name (@``), 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 | ObeyRawText [get, set] |
| When this flag is set, raw text trivia attributes (e.g. CodeSymbols.TriviaRawTextBefore) are obeyed (cause raw text output); otherwise such attributes are treated as unknown trivia and, if LNodePrinterOptions.OmitUnknownTrivia is false, printed as attributes. 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 | AllowConstructorAmbiguity [get, set] |
| Causes the ambiguity between constructors and method calls to be ignored; see Loyc.Ecs.Tests.EcsPrinterAndParserTests.ConstructorAmbiguities(). More...
|
|
bool | AvoidMacroSyntax [get, set] |
| Prints statements like "foo (...) bar()" in the equivalent form "foo (..., bar())" instead. Does not affect foo {...} because property and event definitions require this syntax (get {...}, set {...}). More...
|
|
bool | PreferPlainCSharp [get, set] |
| Prefers plain C# syntax for certain other things (not covered by the other options), even when the syntax tree requests a different style, e.g. EC# cast operators are blocked so x(->int) becomes (int) x, and <tt>at-identifiers are sanitized. More...
|
|
SpaceOpt | SpaceOptions [get, set] |
| Controls the locations where spaces should be emitted. More...
|
|
NewlineOpt | NewlineOptions [get, set] |
| Controls the locations where newlines should be emitted. More...
|
|
int | SpaceAroundInfixStopPrecedence [get, set] |
| The printer avoids printing spaces around infix (binary) operators that have the specified precedence or higher. More...
|
|
int | SpaceAfterPrefixStopPrecedence [get, set] |
| The printer avoids printing spaces after prefix operators that have the specified precedence or higher. More...
|
|
virtual bool | AllowChangeParentheses [get, set] |
|
virtual bool | OmitComments [get, set] |
|
virtual bool | OmitUnknownTrivia [get, set] |
|
virtual bool | PrintTriviaExplicitly [get, set] |
|
virtual bool | CompatibilityMode [get, set] |
|
virtual bool | CompactMode [get, set] |
|
virtual string | IndentString [get, set] |
|
virtual string | NewlineString [get, set] |
|
virtual ILiteralPrinter | LiteralPrinter [get, set] |
|
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...
|
|