diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-13 03:23:52 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-13 03:23:52 +0000 |
| commit | f9a0c7e9687bc3e113f4c8f44861533c9ca48b3a (patch) | |
| tree | 5d51c5a403dd096b0c3748118409be20eb3e1900 /AGENTS/CONVENTIONS.md | |
| parent | 3818460a473bd3ffcd35f09eb6429e1b0f00bc07 (diff) | |
feat: compile source files with configurable IR output
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat (limited to 'AGENTS/CONVENTIONS.md')
| -rw-r--r-- | AGENTS/CONVENTIONS.md | 6 |
1 files changed, 3 insertions, 3 deletions
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 |
