Lexical Analyzer v0.1.0
 
Loading...
Searching...
No Matches
tok_t Struct Reference

Container for token data and metadata. More...

#include <lexer.h>

Public Attributes

char * val
 
tok_e typ
 
size_t ln
 
size_t col
 

Detailed Description

Container for token data and metadata.

Stores the complete information about a single token including:

  • The lexeme value
  • Its classified type
  • Source code location

Member Data Documentation

◆ col

size_t tok_t::col

Starting column position (1-indexed)

◆ ln

size_t tok_t::ln

Source line number (1-indexed)

◆ typ

tok_e tok_t::typ

Token type from tok_e

◆ val

char* tok_t::val

Token string value (dynamically allocated)


The documentation for this struct was generated from the following file: