Skip to content

Treat - as negative operator immediately after opening bracket instead of infix minus#277

Merged
jfmengels merged 4 commits intostil4m:masterfrom
dillonkearns:fix/negative-number-after-opening-bracket
Apr 3, 2026
Merged

Treat - as negative operator immediately after opening bracket instead of infix minus#277
jfmengels merged 4 commits intostil4m:masterfrom
dillonkearns:fix/negative-number-after-opening-bracket

Conversation

@dillonkearns
Copy link
Copy Markdown
Contributor

@dillonkearns dillonkearns commented Apr 2, 2026

When parsing the expression [-3, 5, -1]:

Before: failed with ExpectingSymbol "]" (it was treating it as a - not preceded by whitespace as subtraction instead of a negative)
After: parses the negative number correctly

Similar bug fix for - right after the = in a record like {a=-1}.

dillonkearns and others added 4 commits April 1, 2026 21:31
`{a=-1}` was rejected because `=` was not in the set of characters that
trigger negation parsing. The `-` after `=` was treated as infix minus
instead of negation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jfmengels
Copy link
Copy Markdown
Collaborator

Thank you! 🙏

@jfmengels jfmengels merged commit d431a34 into stil4m:master Apr 3, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants