-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
1,468 additions
and
2,269 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[package] | ||
name = "scyllax-macros-core" | ||
description = "Core macros for scyllax" | ||
version = { workspace = true } | ||
license = { workspace = true } | ||
edition = { workspace = true } | ||
authors = { workspace = true } | ||
repository = { workspace = true } | ||
homepage = { workspace = true } | ||
readme = "../README.md" | ||
|
||
[dependencies] | ||
anyhow = { workspace = true } | ||
darling = { version = "0.20", features = ["suggestions"] } | ||
proc-macro2 = "1" | ||
quote = "1" | ||
syn = { version = "2", features = ["full", "derive", "extra-traits"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//! Scyllax macros. See the scyllax for more information. | ||
use proc_macro2::TokenStream; | ||
|
||
pub mod entity; | ||
pub mod json; | ||
pub mod queries; | ||
|
||
/// Throw an error with the tokens for better error messages. | ||
pub fn token_stream_with_error(mut tokens: TokenStream, error: syn::Error) -> TokenStream { | ||
tokens.extend(error.into_compile_error()); | ||
tokens | ||
} | ||
|
||
/// Expand the `prepare_queries!` macro. | ||
pub fn prepare_queries(input: TokenStream) -> TokenStream { | ||
queries::prepare::expand(input) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
//! Mostly `expand` functions for the macros. | ||
pub mod delete; | ||
pub mod prepare; | ||
pub mod select; | ||
pub mod upsert; |
Oops, something went wrong.