Skip to content

SourceReader.CreateToken Method ​

Definition ​

Creates a Token<TKind> of the specified kind from the specified SourceMark up to the current position.

c#
public Token<TKind> CreateToken<TKind>(TKind kind, SourceMark start)
   where TKind : struct, Enum;

View source

Type Parameters ​

NameDescription
TKindThe type of the enum that identifies the different kinds of token.

Parameters ​

NameTypeDescription
kindTKindThe kind of the token.
startSourceMarkThe start of the token.

Returns ​

Token<TKind>

A new Token<TKind> instance.