Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

refactor: custom lexer#437

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
psteinroe merged 17 commits intomainfromrefactor/lexer
Jul 6, 2025
Merged

refactor: custom lexer#437

psteinroe merged 17 commits intomainfromrefactor/lexer
Jul 6, 2025

Conversation

psteinroe
Copy link
Collaborator

@psteinroepsteinroe commentedJul 1, 2025
edited
Loading

  • adds a newtokenizer crate that turns a string into simple tokens
  • adds a newlexer +lexer_codegen that uses the tokeniser to lex into a newSyntaxKind enum

the new implementation is

  • much more performant (no extra string allocations, no call to C library)
  • works with broken strings (!!!!)
  • custom-made to our use-case (eg theLineEnding variant comes with a count)

in a follow-up, we will be able to:

  • parse custom parameters that popular tools use
  • pre-process to remove unsupported stuff
  • parse non-sql content (e.g. commands) via a simple custom parser

todos:

  • use new lexer in splitter
  • make sure we support all the different parameter formats popular tools use -> will do it in a follow-up
  • tests

reteps reacted with hooray emoji
@psteinroepsteinroe changed the titlerefactor: parserrefactor: lexerJul 1, 2025
@psteinroepsteinroe mentioned this pull requestJul 1, 2025
@psteinroepsteinroe marked this pull request as ready for reviewJuly 4, 2025 16:00
@psteinroepsteinroe changed the titlerefactor: lexerrefactor: custom lexerJul 4, 2025
@psteinroepsteinroe merged commit21b05d2 intomainJul 6, 2025
7 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@juleswritescodejuleswritescodejuleswritescode approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@psteinroe@juleswritescode

[8]ページ先頭

©2009-2025 Movatter.jp