-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Add custom union ID syntax #65
[Feature] Add custom union ID syntax #65
Conversation
These schema are equal:
These are equal too:
These schema are bad syntax:
Implementation DetailFor compatibility with older versions, I added a pest code block for customize union_item_decl:
And added a new struct for #[derive(Debug, Property)]
pub(crate) struct CustomUnionItemDecl {
typ: String,
id: usize,
}
#[derive(Debug, Property)]
pub(crate) struct UnionDecl {
name: String,
items: Vec<CustomUnionItemDecl>,
imported_depth: usize,
} Then,
|
0426e2e
to
bcfbf29
Compare
Compatibility test and integration test haven't been completed, but the main logic and unit test of "custom union ID feature" are ready for review. |
can we follow other struct field definition convention by using
|
aaac172
to
6ad5e07
Compare
57a4e05
to
5b86f9d
Compare
@yangby-cryptape The CI jobs are using https://github.com/nervosnetwork/molecule/blob/master/.github/workflows/ci.yaml#L24 |
Let's do it with a new pr |
67add77
to
367d2f9
Compare
tools/codegen/src/generator/languages/rust/reader/implementation.rs
Outdated
Show resolved
Hide resolved
622a4b4
to
84bf0c0
Compare
Signed-off-by: Eval EXEC <execvy@gmail.com>
Signed-off-by: Eval EXEC <execvy@gmail.com>
84bf0c0
to
27a349a
Compare
@quake I didn't change any code after your review, but I rebased the code to make commits message more neat and more convenient for review. Please re-trigger the github CI action. |
This PR want to close #59
working in progress.
Pest grammar
,Parser
andIR
rust
C
integration test