321 B
321 B
JOURNAL-lex
2026-06-15 — Implementation
Plan read. Building calc/lexer.py with Token dataclass, LexError, and tokenize(). Token kinds: NUMBER, PLUS, MINUS, STAR, SLASH, LPAREN, RPAREN, EOF. Numbers: int or float value stored in token.value. Whitespace skipped. Invalid chars raise LexError with char + position.