summaryrefslogtreecommitdiff
path: root/docs/basic-arithmetic.md
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-24 10:36:20 +0300
committerPaul Buetow <paul@buetow.org>2026-05-24 10:36:20 +0300
commit73d94aade228aaf22237e99a22fd5a6b943fc21c (patch)
treeba3c280fd9a41384bbf5842bb0ceb210e60a5a35 /docs/basic-arithmetic.md
parentd1a11d36a25c79384d57e23962f56652bbad1dd1 (diff)
rpn: use token-based = detection in handleStandardAssign
Replace fragile strings.Contains checks with proper tokenization. The old code matched '=' via substring search with hacky guards for '==' and '!=', which could misparse inputs like 'a == b = 5'. Now Tokenize(input) splits on whitespace first, so '=' is only detected as a standalone token — '==' and '!=' are naturally distinct tokens and can never trigger a false positive. Also adds regression tests confirming == and != are not treated as assignments.
Diffstat (limited to 'docs/basic-arithmetic.md')
0 files changed, 0 insertions, 0 deletions