Enhanced C#
Language of your choice: library documentation

Documentation moved to ecsharp.net

GitHub doesn't support HTTP redirects, so you'll be redirected in 3 seconds.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Static Public Member Functions | List of all members
Loyc.Ecs.Parser.TokenExt Class Reference

Provides the Type() extension method required by Token and the ToString(Token) method to express an EC# token as a string, for tokens that contain sufficient information to do so. More...


Source file:

Remarks

Provides the Type() extension method required by Token and the ToString(Token) method to express an EC# token as a string, for tokens that contain sufficient information to do so.

Static Public Member Functions

static TokenType Type (this Token t)
 Converts t.TypeInt to TokenType. More...
 
static string ToString (Token t)
 Expresses an EC# token as a string. More...
 

Member Function Documentation

static string Loyc.Ecs.Parser.TokenExt.ToString ( Token  t)
inlinestatic

Expresses an EC# token as a string.

Note that some Tokens do not contain enough information to reconstruct a useful token string, e.g. comment tokens do not store the comment but merely contain the location of the comment in the source code. For performance reasons, a Token does not have a reference to its source file, so this method cannot return the original string.

The results are undefined if the token was not produced by EcsLexer.

References Loyc.Syntax.Lexing.Token.Kind, and Loyc.Syntax.Lexing.Token.Value.

static TokenType Loyc.Ecs.Parser.TokenExt.Type ( this Token  t)
inlinestatic

Converts t.TypeInt to TokenType.