From b315ebbcd92e58249c6ed8f04217ef7adcdde5d5 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 11 Apr 2026 21:50:15 +0300 Subject: more on this --- internal/rpn/rpn_parse.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'internal/rpn/rpn_parse.go') diff --git a/internal/rpn/rpn_parse.go b/internal/rpn/rpn_parse.go index 45531bb..9d6d8e2 100644 --- a/internal/rpn/rpn_parse.go +++ b/internal/rpn/rpn_parse.go @@ -506,8 +506,10 @@ func (r *RPN) handleOperator(stack *Stack, token string, tokenIndex int) (string // isValidIdentifier checks if a token looks like a valid variable identifier. // Valid identifiers contain only alphanumeric characters and underscores, // and start with a letter or underscore (not a digit or special character). -// For RPN symbol support, we also limit to single-character identifiers -// (like x, y, z) to avoid converting percentage expression words into symbols. +// +// IMPORTANT: To prevent natural language words (like "what", "is", "of") from +// being incorrectly treated as RPN symbols in mixed-mode expressions, +// this function currently restricts valid identifiers to a length of 1. func isValidIdentifier(token string) bool { if len(token) == 0 { return false -- cgit v1.2.3