Struct Pl0Token
Represents a single token from the PL/0 lexer.
public readonly record struct Pl0Token : IEquatable<Pl0Token>
- Implements
- Inherited Members
Constructors
Pl0Token(TokenKind, string, TextPosition, int?)
Represents a single token from the PL/0 lexer.
public Pl0Token(TokenKind Kind, string Lexeme, TextPosition Position, int? NumberValue = null)
Parameters
KindTokenKindThe token kind.
LexemestringThe source text for the token.
PositionTextPositionThe start position of the token.
NumberValueint?Parsed numeric value for number tokens.
Properties
Kind
The token kind.
public TokenKind Kind { get; init; }
Property Value
Lexeme
The source text for the token.
public string Lexeme { get; init; }
Property Value
NumberValue
Parsed numeric value for number tokens.
public int? NumberValue { get; init; }
Property Value
- int?
Position
The start position of the token.
public TextPosition Position { get; init; }