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

add numeric-separator transformer #7280

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ShuiRuTian
Copy link
Contributor

@ShuiRuTian ShuiRuTian commented Nov 14, 2024

Add numeric separator transformer.

This is a low hang fruit, why don't we pick it?

Copy link

graphite-app bot commented Nov 14, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@github-actions github-actions bot added the A-transformer Area - Transformer / Transpiler label Nov 14, 2024
Copy link

codspeed-hq bot commented Nov 14, 2024

CodSpeed Performance Report

Merging #7280 will not alter performance

Comparing ShuiRuTian:numberic-separator-transformer (97969e9) with main (84038ee)

Summary

✅ 30 untouched benchmarks

@camc314
Copy link
Collaborator

camc314 commented Nov 14, 2024

i think this already happens in oxc_codegen:

p.print_non_negative_float(value);

playground

@ShuiRuTian
Copy link
Contributor Author

i think this already happens in oxc_codegen:

p.print_non_negative_float(value);

playground

Indeed, then we do not need that for numberic literial.

bigint transformer is still in need anyway, right?

@camc314
Copy link
Collaborator

camc314 commented Nov 14, 2024

i guess so? not really familiar

p.print_str(self.raw.as_str());

looks like it prints the raw val from the original source text

@Boshen
Copy link
Member

Boshen commented Nov 14, 2024

i guess so? not really familiar

p.print_str(self.raw.as_str());

looks like it prints the raw val from the original source text

Good catch, it should be removed from codegen.

@Boshen Boshen marked this pull request as draft November 14, 2024 16:09
@camc314
Copy link
Collaborator

camc314 commented Nov 14, 2024

we could probably minify in codegen ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-transformer Area - Transformer / Transpiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants