diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-24 00:06:24 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-24 00:06:24 +0300 |
| commit | dd2dd420736c38dfcb02d3615d5884463cce2adc (patch) | |
| tree | a310474ede162d8267dc109619bba9be8beb8dc7 | |
| parent | 6dc8b270e212c2ce41b6179dc17dd8160a6d148a (diff) | |
docs(rpn): fix misleading comment in handleStandardAssign
- Rename comment subject from 'standardAssignHandler' to match actual
function name 'handleStandardAssign'
- Correct stack position description: in 'name value =' format, name
is pushed first (bottom of stack) and value second (top), not the
reverse as the comment previously stated
| -rw-r--r-- | internal/rpn/rpn_parse.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/rpn/rpn_parse.go b/internal/rpn/rpn_parse.go index f3ecb51..2eaab04 100644 --- a/internal/rpn/rpn_parse.go +++ b/internal/rpn/rpn_parse.go @@ -119,8 +119,8 @@ func handleAssignLeft(input string, r *RPN) (string, bool, error) { return handleAssignmentOp(input, r, "=:") } -// standardAssignHandler handles the standard = operator. -// Format: name value = expression (value on bottom, expression after =) +// handleStandardAssign handles the standard = operator. +// Format: name value = expression (name on bottom, value on top, expression after =) // Or: name = value (single assignment) func handleStandardAssign(input string, r *RPN) (string, bool, error) { // Check for standard assignment format (name = value or name value = expression) |
