Skip to content

Commit df16653

Browse files
committed
- refactor source parser to allow nested parsing
- replace logos with custom regex parser in statement parser
1 parent a33eeb3 commit df16653

File tree

9 files changed

+215
-141
lines changed

9 files changed

+215
-141
lines changed

Diff for: Cargo.lock

+29-26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: crates/codegen/Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ edition = "2021"
99
proc-macro2 = "1.0.66"
1010
quote = "1.0.33"
1111
pg_query_proto_parser.workspace = true
12+
syn = { version = "2.0.35", features = ["full"] }
13+
regex = "1.9.5"
1214

1315
[lib]
1416
proc-macro = true

Diff for: crates/codegen/src/syntax_kind.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use std::collections::HashSet;
2-
use std::env::current_dir;
32

43
use pg_query_proto_parser::{Node, ProtoParser, Token};
54
use proc_macro2::{Ident, Literal};

Diff for: crates/parser/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ regex = "1.9.1"
1414
serde = { version = "1.0", features = ["derive"] }
1515
env_logger = { version = "0.9.1" }
1616
log = { version = "0.4.20" }
17+
lazy_static = "1.4.0"
1718

1819
codegen.workspace = true
1920
pg_query_proto_parser.workspace = true

Diff for: crates/parser/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
mod ast_node;
1919
mod parser;
2020
mod sibling_token;
21-
mod source_file;
22-
mod statement;
21+
mod source_parser;
22+
mod statement_parser;
2323
mod syntax_error;
2424
mod syntax_kind_codegen;
2525
mod syntax_node;

Diff for: crates/parser/src/source_file.rs

-107
This file was deleted.

0 commit comments

Comments
 (0)