diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-18 06:05:53 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-18 06:05:53 +0000 |
| commit | 16231050058131860f710073c17d3bca7c6637eb (patch) | |
| tree | 1da2ca606f1d513822ccd04b3053d5eee69ac19d /lib/Lexer | |
| parent | 1b0b287629e6e3b6d8eb6182db72b28fd0510574 (diff) | |
feat(operators): support global binary operator overloads
Resolve exact operand types and preserve declared operator return types.
Reject implicit STRING to BOOLEAN conversion at typed expression boundaries.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'lib/Lexer')
| -rw-r--r-- | lib/Lexer/Lexer.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Lexer/Lexer.cc b/lib/Lexer/Lexer.cc index 8f906ae..cebf335 100644 --- a/lib/Lexer/Lexer.cc +++ b/lib/Lexer/Lexer.cc @@ -134,6 +134,7 @@ int Lexer::readToken() { if (IdentifierStr == "OR") return tok_or; if (IdentifierStr == "NOT") return tok_not; + if (IdentifierStr == "OPERATOR") return tok_operator; if (IdentifierStr == "OVERLOAD") return tok_overload; if (IdentifierStr == "FUNCTION") return tok_function; if (IdentifierStr == "ENDFUNCTION") return tok_endfunction; |
