Skip to content

Commit 21b05d2

Browse files
authored
refactor: custom lexer (#437)
- adds a new `tokenizer` crate that turns a string into simple tokens - adds a new `lexer` + `lexer_codegen` that uses the tokeniser to lex into a new `SyntaxKind` 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 the `LineEnding` 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: - [x] use new lexer in splitter - [ ] make sure we support all the different parameter formats popular tools use -> will do it in a follow-up - [x] tests
1 parent adb7a9e commit 21b05d2

File tree

70 files changed

+3462
-2854
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+3462
-2854
lines changed

.claude/settings.local.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(grep:*)",
5+
"Bash(rg:*)",
6+
"Bash(cargo test:*)",
7+
"Bash(cargo run:*)",
8+
"Bash(cargo check:*)",
9+
"Bash(cargo fmt:*)"
10+
],
11+
"deny": []
12+
}
13+
}

Cargo.lock

Lines changed: 226 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)