Enhanced C#
Language of your choice: library documentation
Namespaces | Classes | Enumerations
Loyc.Ecs Namespace Reference

Classes related to Enhanced C# (mostly found in Loyc.Ecs.dll). More...

Namespaces

namespace  Parser
 Enhanced C# parser
 
namespace  Tests
 Unit tests for the Enhanced C# lexer, parser and printer.
 

Classes

class  EcsLanguageService
 The Value property provides easy access to the lexer, parser and printer for Enhanced C#. More...
 
class  EcsNodePrinter
 Encapsulates the code for printing an LNode to EC# source code. More...
 
class  EcsPrecedence
 Contains Precedence objects that represent the precedence rules of EC#. More...
 
class  EcsPrinterOptions
 Options to control the way EcsNodePrinter's output is formatted. More...
 
class  EcsValidators
 A class filled with methods for checking whether a node has the correct LNode.Name and structure. For example, IsPropertyDefinition(node) checks whether node meets the requirements for being a property definition, such as having a Name equal to #property, and having name and return value that are complex identifiers. More...
 

Enumerations

enum  ICI {
  Default = 0, AllowAttrs = 2, DisallowOf = 8,
  DisallowDotted = 16, InOf = 32, AllowAnyExprInOf = 64,
  NameDefinition = 128, AllowParensAround = 256, ExprMode = 512
}
 Flags for EcsNodePrinter.IsComplexIdentifier. More...
 
enum  SpaceOpt {
  Default, Minimal = 0x00000001, AfterComma = 0x00000002,
  AfterCommaInOf = 0x00000004, AfterCast = 0x00000008, AfterCastArrow = 0x00000010,
  AfterAttribute = 0x00000020, InsideParens = 0x00000080, InsideCallParens = 0x00000100,
  InsideAttribute = 0x00000200, OutsideParens = 0x00000400, BeforeKeywordStmtArgs = 0x00000800,
  BeforePossibleMacroArgs = 0x00001000, BeforeMethodCall = 0x00002000, BeforeNewCastCall = 0x00004000,
  BeforeNewInitBrace = 0x00008000, AfterColon = 0x00010000, InsideNewInitializer = 0x00020000,
  BeforeBaseListColon = 0x00040000, BeforeWhereClauseColon = 0x00080000, BeforeConstructorColon = 0x00100000,
  BeforeMethodDeclArgList = 0x00200000, BeforeForwardArrow = 0x00400000, AfterOperatorKeyword = 0x00800000,
  MissingAfterComma = 0x01000000, BeforeCommentOnSameLine = 0x04000000, BetweenCommentAndNode = 0x08000000,
  SuppressAroundDotDot = 0x10000000
}
 Controls the locations where spaces appear as EcsNodePrinter is printing. More...
 
enum  NewlineOpt {
  NewlineOpt.Default, Minimal = 0x000001, BeforeSpaceDefBrace = 0x000002,
  BeforeMethodBrace = 0x000004, BeforePropBrace = 0x000008, BeforeGetSetBrace = 0x000010,
  BeforeSimpleStmtBrace = 0x000020, BeforeExecutableBrace = 0x000010, BeforeSingleSubstmt = 0x000040,
  BeforeOpenBraceInExpr = 0x000100, BeforeCloseBraceInExpr = 0x000200, AfterCloseBraceInExpr = 0x000400,
  BeforeOpenBraceInNewExpr = 0x000800, AfterOpenBraceInNewExpr = 0x001000, BeforeCloseBraceInNewExpr = 0x002000,
  AfterCloseBraceInNewExpr = 0x004000, AfterEachInitializer = 0x008000, AfterAttributes = 0x010000,
  BeforeWhereClauses = 0x020000, BeforeEachWhereClause = 0x040000, BeforeIfClause = 0x080000,
  BeforeConstructorColon = 0x100000, BeforeEachEnumItem = 0x200000
}
 Flags to control situations in which newlines should be added automatically by the EC# printer. More...
 

Detailed Description

Classes related to Enhanced C# (mostly found in Loyc.Ecs.dll).

Enumeration Type Documentation

enum Loyc.Ecs.ICI
strong

Flags for EcsNodePrinter.IsComplexIdentifier.

enum Loyc.Ecs.NewlineOpt
strong

Flags to control situations in which newlines should be added automatically by the EC# printer.

Enumerator
Default 

Default value of EcsNodePrinter.NewlineOptions

Oct 2016: Some defaults have been turned off because newlines can now be added with #trivia_newline, and turning on some NewlineOpts currently causes double newlines (i.e. a blank line) when the LNode uses #trivia_newline at the same time.

enum Loyc.Ecs.SpaceOpt
strong

Controls the locations where spaces appear as EcsNodePrinter is printing.

Note: Spaces around prefix and infix operators are controlled by EcsPrinterOptions.SpaceAroundInfixStopPrecedence and EcsPrinterOptions.SpaceAfterPrefixStopPrecedence.