23 lines
605 B
C#
23 lines
605 B
C#
namespace DevDisciples.Parsing;
|
|
|
|
public abstract partial class Lexer<TToken> where TToken : Enum
|
|
{
|
|
public readonly struct Token : ISourceLocation
|
|
{
|
|
public string File { get; }
|
|
public TToken Type { get; }
|
|
public string Lexeme { get; }
|
|
public int Line { get; }
|
|
public int Column { get; }
|
|
|
|
|
|
public Token(string file, TToken type, string lexeme, int line, int column)
|
|
{
|
|
File = file;
|
|
Type = type;
|
|
Lexeme = lexeme;
|
|
Line = line;
|
|
Column = column;
|
|
}
|
|
}
|
|
} |