-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Rust: generate the extractor #17543
Rust: generate the extractor #17543
Conversation
d34d865
to
592182c
Compare
592182c
to
7b4137f
Compare
@@ -0,0 +1,2185 @@ | |||
use super::base::{TextValue, Translator}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's nice when generated code starts with a comment like generated code, do not edit
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, good idea; I also added some linguist-generated
entries to .gitattributes
rust/extractor/src/main.rs
Outdated
|
||
pub fn extract( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be public?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it can be private.
This pull request splits the
translate.rs
file of the extractor in two parts, the non-generated part (base.rs
) and the generated codegenerated.rs
.The extractor can be regenerated by running
cargo run
inrust/generate-schema
.