|
Enhanced C#
Loyc library documentation
|
The Value property provides easy access to the lexer, parser and printer for Enhanced C#. More...
The Value property provides easy access to the lexer, parser and printer for Enhanced C#.
EC# overview: https://ecsharp.net
Public static fields | |
| static readonly EcsLanguageService | Value = new EcsLanguageService(false) |
| static readonly EcsLanguageService | WithPlainCSharpPrinter = new EcsLanguageService(true) |
Properties | |
| IEnumerable< string > | FileExtensions [get] |
| bool | HasTokenizer [get] |
| bool | CanPreserveComments [get] |
Properties inherited from Loyc.Syntax.IParsingService | |
| IEnumerable< string > | FileExtensions [get] |
| Standard file extensions for this language, without leading dots, with the first one being the most common. More... | |
| bool | HasTokenizer [get] |
| Returns true if the Tokenize method is available. More... | |
| bool | CanPreserveComments [get] |
| Returns true if the parser supports preserving comments. More... | |
Public Member Functions | |
| override string | ToString () |
| void | Print (LNode node, StringBuilder target, IMessageSink sink=null, ParsingMode mode=null, ILNodePrinterOptions options=null) |
| void | Print (IEnumerable< LNode > nodes, StringBuilder target, IMessageSink sink=null, ParsingMode mode=null, ILNodePrinterOptions options=null) |
| ILexer< Token > | Tokenize (ICharSource text, string fileName, IMessageSink msgs, IParsingOptions options) |
| Returns a lexer that is configured to begin reading the specified file. More... | |
| IListSource< LNode > | Parse (ICharSource text, string fileName, IMessageSink msgs, IParsingOptions options) |
| IListSource< LNode > | Parse (ILexer< Token > input, IMessageSink msgs, IParsingOptions options) |
| IListSource< LNode > | Parse (IListSource< Token > input, ISourceFile file, IMessageSink msgs, IParsingOptions options) |
Public Member Functions inherited from Loyc.Syntax.IParsingService | |
| IListSource< LNode > | Parse (ICharSource text, string fileName, IMessageSink?msgs, IParsingOptions options) |
| Parses a source file into one or more Loyc trees. More... | |
| IListSource< LNode > | Parse (ILexer< Token > input, IMessageSink?msgs, IParsingOptions options) |
| If HasTokenizer is true, this method accepts a lexer returned by Tokenize() and begins parsing. More... | |
| IListSource< LNode > | Parse (IListSource< Token > tokens, ISourceFile file, IMessageSink?msgs, IParsingOptions options) |
| Parses a token tree, such as one that came from a token literal. More... | |
Public Member Functions inherited from Loyc.Syntax.ILNodePrinter | |
| 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... | |
|
inline |
Returns a lexer that is configured to begin reading the specified file.
| text | Text to be tokenized (e.g. UString) |
| fileName | File name to be associated with any errors that occur. |
| msgs | Error messages are sent to this object. |
The returned lexer should be a "simple" tokenizer. If the language uses tree lexing (in which tokens are grouped by parentheses and braces), the returned lexer should NOT include the grouping process.
It is recommended that the implementation of this method filter out spaces (for best performance) but not comments or newlines. If there is a preprocessor, it should not run. If ParsingOptions.PreserveComments is false, it is not this method's responsibility to filter them out.
Implements Loyc.Syntax.IParsingService.
1.8.7