C# 클래스 Loyc.Syntax.Les.TokenExt

Provides the Type() extension method required by Token and the ToString(Token) method to express an LES token as a string, for tokens that contain sufficient information to do so.
파일 보기 프로젝트 열기: qwertie/ecsharp

공개 메소드들

메소드 설명
ToString ( Token t ) : string

Expresses an LES 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 Les2Lexer.

비공개 메소드들

메소드 설명
Type ( this t ) : TokenType

메소드 상세

ToString() 공개 정적인 메소드

Expresses an LES 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 Les2Lexer.
public static ToString ( Token t ) : string
t Token
리턴 string