Skip to content

fix: prevent dropping children of parenthesized expressions#952

Merged
jtkiesel merged 1 commit into
jhipster:mainfrom
jtkiesel:fix/parser-parens-child-index
Jun 25, 2026
Merged

fix: prevent dropping children of parenthesized expressions#952
jtkiesel merged 1 commit into
jhipster:mainfrom
jtkiesel:fix/parser-parens-child-index

Conversation

@jtkiesel

Copy link
Copy Markdown
Contributor

What changed with this PR:

Children of parenthesized expressions which are children of nodes with named fields are no longer lost.

Because of the way the parser was recently updated to omit parenthesized expressions, index alignment could easily be broken, and the index of child nodes was used to determine their field name.

Example

Input

a = (//
  b
);

Output

a = //
  b;

Relative issues or prs:

Closes #949

@jtkiesel jtkiesel merged commit e30853c into jhipster:main Jun 25, 2026
6 checks passed
@jtkiesel jtkiesel deleted the fix/parser-parens-child-index branch June 25, 2026 07:43
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.10.0] Deletes real code in seeming attempt to remove parentheses near comments

1 participant