Skip to content

Commit 5efa9f7

Browse files
committed
progress
1 parent 317472c commit 5efa9f7

File tree

28 files changed

+26
-29
lines changed

28 files changed

+26
-29
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ pgt_diagnostics_categories = { path = "./crates/pgt_diagnostics_categories", ver
7171
pgt_diagnostics_macros = { path = "./crates/pgt_diagnostics_macros", version = "0.0.0" }
7272
pgt_flags = { path = "./crates/pgt_flags", version = "0.0.0" }
7373
pgt_fs = { path = "./crates/pgt_fs", version = "0.0.0" }
74-
pgt_lexer_new = { path = "./crates/pgt_lexer_new", version = "0.0.0" }
75-
pgt_lexer_new_codegen = { path = "./crates/pgt_lexer_new_codegen", version = "0.0.0" }
74+
pgt_lexer = { path = "./crates/pgt_lexer", version = "0.0.0" }
75+
pgt_lexer_codegen = { path = "./crates/pgt_lexer_codegen", version = "0.0.0" }
7676
pgt_lsp = { path = "./crates/pgt_lsp", version = "0.0.0" }
7777
pgt_markup = { path = "./crates/pgt_markup", version = "0.0.0" }
7878
pgt_query_ext = { path = "./crates/pgt_query_ext", version = "0.0.0" }

crates/pgt_lexer_new/Cargo.toml renamed to crates/pgt_lexer/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ edition.workspace = true
66
homepage.workspace = true
77
keywords.workspace = true
88
license.workspace = true
9-
name = "pgt_lexer_new"
9+
name = "pgt_lexer"
1010
repository.workspace = true
1111
version = "0.0.0"
1212

1313

1414
[dependencies]
15-
pgt_diagnostics.workspace = true
16-
pgt_lexer_new_codegen.workspace = true
17-
pgt_text_size.workspace = true
18-
pgt_tokenizer.workspace = true
15+
pgt_diagnostics.workspace = true
16+
pgt_lexer_codegen.workspace = true
17+
pgt_text_size.workspace = true
18+
pgt_tokenizer.workspace = true
1919

2020
[dev-dependencies]
2121
insta.workspace = true
File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pgt_lexer_codegen::syntax_kind_codegen!();
File renamed without changes.
File renamed without changes.
File renamed without changes.

crates/pgt_lexer_new_codegen/Cargo.toml renamed to crates/pgt_lexer_codegen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ edition.workspace = true
66
homepage.workspace = true
77
keywords.workspace = true
88
license.workspace = true
9-
name = "pgt_lexer_new_codegen"
9+
name = "pgt_lexer_codegen"
1010
repository.workspace = true
1111
version = "0.0.0"
1212

crates/pgt_lexer_new/src/codegen/syntax_kind.rs

Lines changed: 0 additions & 1 deletion
This file was deleted.

crates/pgt_statement_splitter/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ version = "0.0.0"
1313

1414
[dependencies]
1515
pgt_diagnostics = { workspace = true }
16-
pgt_lexer_new.workspace = true
16+
pgt_lexer.workspace = true
1717
pgt_query_ext.workspace = true
1818
pgt_text_size.workspace = true
1919
regex.workspace = true

crates/pgt_statement_splitter/src/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use pgt_diagnostics::{Diagnostic, MessageAndDescription};
2-
use pgt_lexer_new::{LexDiagnostic, Lexed};
2+
use pgt_lexer::{LexDiagnostic, Lexed};
33
use pgt_text_size::TextRange;
44

55
use crate::splitter::SplitError;

crates/pgt_statement_splitter/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub mod diagnostics;
55
mod splitter;
66

77
use diagnostics::SplitDiagnostic;
8-
use pgt_lexer_new::Lexer;
8+
use pgt_lexer::Lexer;
99
use pgt_text_size::TextRange;
1010
use splitter::{Splitter, source};
1111

@@ -42,7 +42,7 @@ pub fn split(sql: &str) -> SplitResult {
4242
mod tests {
4343
use diagnostics::SplitDiagnostic;
4444
use ntest::timeout;
45-
use pgt_lexer_new::SyntaxKind;
45+
use pgt_lexer::SyntaxKind;
4646
use pgt_text_size::TextRange;
4747

4848
use super::*;

crates/pgt_statement_splitter/src/splitter.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ mod dml;
55

66
pub use common::source;
77

8-
use pgt_lexer_new::{Lexed, SyntaxKind};
8+
use pgt_lexer::{Lexed, SyntaxKind};
99
use pgt_text_size::TextRange;
1010

1111
pub struct SplitResult {
@@ -39,7 +39,6 @@ pub struct Splitter<'a> {
3939

4040
impl<'a> Splitter<'a> {
4141
pub fn new(lexed: &'a Lexed<'a>) -> Self {
42-
println!("{:?}", lexed.tokens().collect::<Vec<_>>());
4342
Self {
4443
lexed,
4544
current_pos: 0,

crates/pgt_statement_splitter/src/splitter/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use super::TRIVIA_TOKENS;
2-
use pgt_lexer_new::SyntaxKind;
2+
use pgt_lexer::SyntaxKind;
33

44
use super::{
55
Splitter,

crates/pgt_statement_splitter/src/splitter/data.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use pgt_lexer_new::SyntaxKind;
1+
use pgt_lexer::SyntaxKind;
22

33
// All tokens listed here must be explicitly handled in the `unknown` function to ensure that we do
44
// not break in the middle of another statement that contains a statement start token.

crates/pgt_statement_splitter/src/splitter/ddl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use pgt_lexer_new::SyntaxKind;
1+
use pgt_lexer::SyntaxKind;
22

33
use super::{Splitter, common::unknown};
44

crates/pgt_statement_splitter/src/splitter/dml.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use pgt_lexer_new::SyntaxKind;
1+
use pgt_lexer::SyntaxKind;
22

33
use super::{
44
Splitter,

crates/pgt_workspace/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pgt_configuration = { workspace = true }
2525
pgt_console = { workspace = true }
2626
pgt_diagnostics = { workspace = true }
2727
pgt_fs = { workspace = true, features = ["serde"] }
28-
pgt_lexer_new = { workspace = true }
28+
pgt_lexer = { workspace = true }
2929
pgt_query_ext = { workspace = true }
3030
pgt_schema_cache = { workspace = true }
3131
pgt_statement_splitter = { workspace = true }

crates/pgt_workspace/src/workspace/server/annotation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::sync::Arc;
22

33
use dashmap::DashMap;
4-
use pgt_lexer_new::SyntaxKind;
4+
use pgt_lexer::SyntaxKind;
55

66
use super::statement_identifier::StatementId;
77

@@ -29,7 +29,7 @@ impl AnnotationStore {
2929
return existing;
3030
}
3131

32-
let lexed = pgt_lexer_new::lex(content);
32+
let lexed = pgt_lexer::lex(content);
3333

3434
let mut ends_with_semicolon = false;
3535

crates/pgt_workspace/src/workspace/server/change.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,9 +445,7 @@ fn get_affected(content: &str, range: TextRange) -> &str {
445445

446446
#[cfg(test)]
447447
mod tests {
448-
449448
use super::*;
450-
use pgt_diagnostics::Diagnostic;
451449
use pgt_text_size::TextRange;
452450

453451
use crate::workspace::{ChangeFileParams, ChangeParams};

0 commit comments

Comments
 (0)