diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-13 05:25:09 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-13 05:25:09 +0000 |
| commit | 38ff4e782ef844a21512eb2ca0e491387ae89ec5 (patch) | |
| tree | d9097aa5c8c5989b7dd4f9ee1c34dbcf28750fcb /AGENTS/EXTENDING.md | |
| parent | a6fc1625ea8f825a7161354eb9167a281542fa29 (diff) | |
fix: compare strings by content
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat (limited to 'AGENTS/EXTENDING.md')
| -rw-r--r-- | AGENTS/EXTENDING.md | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/AGENTS/EXTENDING.md b/AGENTS/EXTENDING.md index 0e12241..7a44281 100644 --- a/AGENTS/EXTENDING.md +++ b/AGENTS/EXTENDING.md @@ -25,8 +25,9 @@ branches do. Builtins are plain identifiers — nothing is needed in lexer/parse **New binary operator:** token (if multi-char) → one line in `BinopPrecedence` (Parser ctor; levels: OR=3, AND=5, comparisons=10, `+ - &`=20, `* / DIV MOD`=40; precedence must be > 0) → branch in `ArithmeticHandler::emitBinaryOp`, which dispatches -on raw LLVM operand types. Exception: `&` is intercepted upstream in `CodeGen::emitExpr` -(operands coerced to STRING, then `StringHandler::emitConcat`). +on raw LLVM operand types. Exceptions in `CodeGen::emitExpr`: `&` coerces operands +to STRING then calls `StringHandler::emitConcat`; STRING comparisons require two +STRING operands by pseudocode type then call `StringHandler::emitCompare`. **New builtin type:** register in `TypeSystem::registerBuiltins` (sizes are derived — never hand-written) + `TypeKind` case in the **exhaustive, default-less switches**: |
