spudplate
Template scaffolding compiler for spudlang .spud files
Loading...
Searching...
No Matches
spudplate::Token Struct Reference

A single lexical token with source location. More...

#include <token.h>

Public Member Functions

 Token ()
 Default-construct an EOF token at position 0:0.
 
 Token (TokenType type, std::string value, int line, int column)
 Construct a token with explicit type, lexeme, and source position.
 

Public Attributes

TokenType type
 The token's classification.
 
std::string value
 The raw text of the token (empty for punctuation).
 
int line
 1-based source line number.
 
int column
 1-based source column number.
 

Detailed Description

A single lexical token with source location.