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

feat(markdown): support markdown grammar code generation #3775

Merged
merged 19 commits into from
Sep 18, 2024

Conversation

suxin2017
Copy link
Contributor

@suxin2017 suxin2017 commented Sep 4, 2024

Summary

grammer support
support commonmark grammer defined

Test Plan

add quick test

@github-actions github-actions bot added the A-Tooling Area: internal tools label Sep 4, 2024
Copy link

codspeed-hq bot commented Sep 4, 2024

CodSpeed Performance Report

Merging #3775 will degrade performances by 6.57%

Comparing suxin2017:feature_markdown_parser (4682d04) with main (1599555)

Summary

❌ 1 regressions
✅ 106 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main suxin2017:feature_markdown_parser Change
router_17129688031671448157.ts[uncached] 2.4 ms 2.5 ms -6.57%

@ematipico
Copy link
Member

@suxin2017

I'm not sure what's your plan, but if your plan is to ship everything with one PR, please refrain from doing so:

  • too much code to review
  • too much work to do

Please consider breaking down the works in multiple PRs. Pros:

  • easier to review
  • work can be delegated to other contributors
  • better vision of where the job is going

@suxin2017
Copy link
Contributor Author

@suxin2017

I'm not sure what's your plan, but if your plan is to ship everything with one PR, please refrain from doing so:

  • too much code to review
  • too much work to do

Please consider breaking down the works in multiple PRs. Pros:

  • easier to review
  • work can be delegated to other contributors
  • better vision of where the job is going

At this stage, the plan is like this

  • markdown_parser support for building full project structure
  • Supports mardkown's grammer generation

Then we start parsing the syntax

  • Support for block parsing
    -...
  • Supports inline parsing
    -...
  • Support for extended parsing
    -...

At present, the first two have been basically completed, so I will first modify this pr to achieve the first two goals. In the subsequent work, I will create an issue for subdivision, and then associate it through multiple pr. Is that OK

@suxin2017 suxin2017 changed the title feat(markdown): support markdown ast parser feat(markdown): support markdown grammer code generation Sep 7, 2024
@suxin2017 suxin2017 marked this pull request as ready for review September 7, 2024 06:57
@suxin2017
Copy link
Contributor Author

Can someone review it for me? @ematipico @Conaclos

xtask/codegen/markdown.ungram Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: consider maybe using the prefix Md instead of Markdown for these syntax nodes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a good idea, is it ok if I change it in the next pr

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

xtask/codegen/markdown.ungram Outdated Show resolved Hide resolved
xtask/codegen/markdown.ungram Outdated Show resolved Hide resolved
xtask/codegen/markdown.ungram Outdated Show resolved Hide resolved
xtask/codegen/markdown.ungram Show resolved Hide resolved
xtask/codegen/markdown.ungram Show resolved Hide resolved
@github-actions github-actions bot added the A-Parser Area: parser label Sep 14, 2024
@nhedger nhedger changed the title feat(markdown): support markdown grammer code generation feat(markdown): support markdown grammar code generation Sep 14, 2024
crates/biome_ungrammar/src/lexer.rs Outdated Show resolved Hide resolved
@dyc3 dyc3 merged commit 2c8ff7f into biomejs:main Sep 18, 2024
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Parser Area: parser A-Tooling Area: internal tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants