Skip to content

Commit

Permalink
better parser and parsing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Virgiel committed Jun 9, 2022
1 parent 5105b59 commit ab1f2d1
Show file tree
Hide file tree
Showing 7 changed files with 924 additions and 240 deletions.
138 changes: 6 additions & 132 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ time = { version = "0.3.9", features = ["parsing"] }

thiserror = "1.0.31"
clap = { version = "3.1.18", features = ["derive"] }
pest = "2.1.3"
pest_derive = "2.1.0"
heck = "0.4.0"
indexmap = "1.8.2"

Expand Down
20 changes: 20 additions & 0 deletions codegen_test/queries/syntax.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

--:row CompactRow()
--: row SpaceRow ()
--:param CompactField(a?,b?,c?)
--:param SpaceField ( a? , b? , c? )

--! select_compact
SELECT * FROM clone;
--! select_spaced
SELECT * FROM clone ;

--!implicit_compact(name?,price?):(id?)
INSERT INTO item (name, price, show) VALUES (:name, :price, false) RETURNING id;
--! implicit_spaced ( name? , price? ) : ( id? )
INSERT INTO item (name, price, show) VALUES (:name, :price, false) RETURNING id;

--!named_compact Params:Row
INSERT INTO item (name, price, show) VALUES (:name, :price, false) RETURNING id;
--! named_spaced Params : Row
INSERT INTO item (name, price, show) VALUES (:name, :price, false) RETURNING id;
Loading

0 comments on commit ab1f2d1

Please sign in to comment.