diff options
Diffstat (limited to 'AGENTS')
| -rw-r--r-- | AGENTS/ARCH/LAYOUT.md | 1 | ||||
| -rw-r--r-- | AGENTS/PITFALLS/core-language.md | 4 | ||||
| -rw-r--r-- | AGENTS/SUBSYSTEMS/STDLIB.md | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/AGENTS/ARCH/LAYOUT.md b/AGENTS/ARCH/LAYOUT.md index 805f1e1..dc8696e 100644 --- a/AGENTS/ARCH/LAYOUT.md +++ b/AGENTS/ARCH/LAYOUT.md @@ -12,6 +12,7 @@ | `include/cps/TemplateAST.h`, `lib/Parser/ParserTemplate.cc` | TEMPLATE declarations, type parameter packs and canonical template ids; call and pack parsing also uses ParserExpression.cc/ParserFunction.cc | | `lib/CodeGen/CodeGen.cc` | Initialization, symbols and main() compilation | | `lib/CodeGen/CallGen.cc` | Call-argument marshalling (`marshalCallArgs`, variadic arguments) and call resolution (`resolveCall`) | +| `lib/CodeGen/InputGen.cc` | INPUT token reader and validators for scalar targets, emitted as module-local IR helpers | | `lib/CodeGen/ExpressionGen.cc`, `StatementGen.cc`, `ControlFlowGen.cc` | Expression/statement dispatch and control-flow emission | | `lib/CodeGen/OperatorGen.cc`, `include/cps/Operator.h` | Exact global/member operator selection, calls and temporary receivers; shared operator spellings | | `lib/CodeGen/TemplateGen.cc`, `TemplateClone.h`, `TemplateClone.cc` | Template registry validation, cached function/class instantiation, structural type substitution, pack expansion and deferred bodies; call deduction/selection lives in CallGen.cc | diff --git a/AGENTS/PITFALLS/core-language.md b/AGENTS/PITFALLS/core-language.md index 0ddba05..dd222c7 100644 --- a/AGENTS/PITFALLS/core-language.md +++ b/AGENTS/PITFALLS/core-language.md @@ -9,7 +9,9 @@ source, most also by compiling and running test programs. mixed output lists; a final array adds no extra newline. INPUT accepts writable scalar locations, including array elements, public record/class fields and pointer dereferences, using the shared lvalue checks. Whole arrays and whole - records/classes remain unsupported INPUT targets. + records/classes remain unsupported INPUT targets. Scalar INPUT reads a validated + whitespace-delimited token (IR helpers in `InputGen.cc`, no scanf); STRING INPUT reads + the rest of the line via READ_INPUT. Bad input and end of input are runtime errors. - **Arrays cross function boundaries only as parameters.** `ArrayTable` is scoped per function, so referencing another function's array fails cleanly as "Undeclared array". Whole arrays pass as `ARRAY OF T` / `ARRAY[l:u,...] OF T` diff --git a/AGENTS/SUBSYSTEMS/STDLIB.md b/AGENTS/SUBSYSTEMS/STDLIB.md index 196ed28..d43899f 100644 --- a/AGENTS/SUBSYSTEMS/STDLIB.md +++ b/AGENTS/SUBSYSTEMS/STDLIB.md @@ -27,5 +27,5 @@ import rules: [CONVENTIONS/EXCEPTIONS_AND_UNITS.md](../CONVENTIONS/EXCEPTIONS_AN - Functions/operators use ordinary resolution; StringValueGen bridges literals, C_STR, C conversions and file operands. - C_STRING literals have an adjacent uppercase C suffix. -- INPUT delegates to READ_INPUT, OUTPUT uses C stdout buffers, and READFILE invokes +- STRING INPUT delegates to READ_INPUT (rest of the line, throws at end of input), OUTPUT uses C stdout buffers, and READFILE invokes assignment from C_STRING then frees its temporary buffer. |
