From f9a0c7e9687bc3e113f4c8f44861533c9ca48b3a Mon Sep 17 00:00:00 2001 From: _ov4 Date: Tue, 13 Oct 2026 03:23:52 +0000 Subject: feat: compile source files with configurable IR output Co-Authored-By: Claude Fable 5.1 --- AGENTS/CONVENTIONS.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'AGENTS/CONVENTIONS.md') diff --git a/AGENTS/CONVENTIONS.md b/AGENTS/CONVENTIONS.md index 7c6956d..6681d1a 100644 --- a/AGENTS/CONVENTIONS.md +++ b/AGENTS/CONVENTIONS.md @@ -15,9 +15,9 @@ identifier. Assignment is `<-` (ASCII only), equality is single `=`, inequality concatenation `&` (reaches the parser as raw ASCII 38 — no token). No escape sequences in string/char literals. Comments are `//` to end of line. -**The lexer can run once per process, from stdin only.** `gettok()` keeps its lookahead -in a function-local `static int LastChar` and calls `getchar()` directly. No re-lexing, -no file paths, and unit tests can't lex two programs in one process. +**The lexer reads a caller-owned stream.** Construct it with `Lexer(std::istream &)`; +the stream must outlive the lexer. Lookahead, line number and error state belong to +each instance. The driver opens the source file; stdin is not used for compilation. **Types travel as uppercase `std::string`** (`"INTEGER"`, `"REAL"`, ..., plus user-defined names) — never an enum. `TypeSystem` resolves the string to -- cgit v1.3.1-4-g156e