Repository navigation
Conversation
|
|
Author
|
Closing this. It was made with an AI coding agent, and the contributing guide asks for PR text in a person's own words. Sorry for the noise. The issue and the test case above still show the bug, if it helps. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #182
Inlined values were written over the macro node as is, so some call sites parsed differently or not at all.
parenthesizeonly handled an object at the head of an expression statement. It now also wraps the value when:-/+:version().toFixed(1)->(3).toFixed(1),offset().toString()->(-1).toString()(was a parse error, or-(1).toString()if spaced)-/+:-offset()->-(-1)(was--1)-/+and starts with-/+:5-offset()->5-(-1)(was5--1)**and is signed:(-1) ** 2{:() => defaults()->() => ({ "mode": "prod" })The statement-head check (with the
;guard) now also covers values that start with[,(,-,/, ... Before,list().forEach(...)on the line afterlet total = 0became0[1, 2].forEach(...), and a negative value or a regex at the start of a line was joined to the previous line in the same way.Added a
parenthesize.jsfixture with every case. On main it fails with a parse error (Invalid characters after number,Cannot assign to this expression,Expected a semicolon).vitest run(46),eslint .,tsc --noEmitpass; other snapshots unchanged.This touches the same file as #185 (the NaN/Infinity fix) but not the same lines.