Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some issues following ctx.ast.move_expression #8198

Open
anguish-huihuang opened this issue Dec 31, 2024 · 1 comment
Open

Some issues following ctx.ast.move_expression #8198

anguish-huihuang opened this issue Dec 31, 2024 · 1 comment
Labels
C-enhancement Category - New feature or request

Comments

@anguish-huihuang
Copy link

After using ctx.ast.move_expression, the original position has become null. May I kindly ask if there’s a way to remove these? I apologise for any inconvenience caused.
微信截图_20241231134441
The above is the code I wrote for moving nodes.
微信截图_20241231134532
This is the specific result of converting ternary expressions into if statements that I wrote. There are many unnecessary instances of null ? null : null; and I wonder if there’s a quick way to eliminate these redundant nulls. I apologise for bothering you during your busy schedule.

@anguish-huihuang anguish-huihuang added the C-enhancement Category - New feature or request label Dec 31, 2024
@Dunqing
Copy link
Member

Dunqing commented Jan 6, 2025

This is an expected behavior, what's your expected output?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category - New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants