# V3 step 2 — scalar type system (planned) Status: not started. Blaise Phase-2 equivalent (type system). ## Scope - Types: `REAL` (QBE `d`), `BOOLEAN` (+ `NOT/AND/OR`), `CHAR`, enumerations; `CARDINAL` family via SymTab integer family. - Relations (`= # < <= > >=`) → QBE `ceqw/cnew/csltw/...` + `jnz`; `IF/ELSIF/ELSE`, `WHILE` (labels via `NewLabel/EmitLabel/Jmp/Jnz` added to QbeGen). - Mixed INTEGER/REAL rules (Test1 parity: INTEGER assigns to REAL via `swtof`, no mixed arithmetic), 212/213/214 errors. - `H` hex + `0x` prefix decision (Redux option) recorded here. ## Acceptance (planned) - ~15 run tests (bool logic, real arith + conversions, char/enum, IF/WHILE nesting) + reject tests (212/213/214); full suite green. - Grammar stays LL(1)-clean; `.ssa` deterministic. ## Files (planned) - `compiler/src/M2.atg` § types/statements/expressions growth. - `compiler/src/QbeGen` + comparison/branch emission. - `compiler/tests/` additions; this file filled in on landing.