Age | Commit message (Collapse) | Author |
|
* custom derives after DeriveInfo
* Introduce `TypeKind` instead of `CompKind`
* Add tests
* Emit CLI flags for callbacks
* update changelog
* run rustfmt
* fix tests
* fix features
Co-authored-by: Christian Poveda <christian.poveda@ferrous-systems.com>
|
|
|
|
* This change updates `ParseCallbacks::generated_name_override` to accept a second parameter indicating the kind of item the name applies to (currently, either `Function` or `Var`).
* A `CallbackItemKind` enum was added to serve as the type for this second parameter.
* Tests have been updated to verify that the names of both function and variable can be updated by this callback.
|
|
This method can be used to process comments and replace them with whatever the user wants.
|
|
This PR introduces a new non-exhaustive `struct` called `DeriveInfo` to be used as the sole argument of `ParseCallbacks::add_derives` with the purpose of being able to extend the information passed to this method in a backwards-compatible manner, meaning that adding new fields to `DeriveInfo` won't be a breaking change when releasing a new version.
|
|
One of the advantages of doing this is that `ParseCallbacks` no longer
needs to implement `UnwindSafe` which means that users can rely on
`RefCell` and `Cell` to extract information from the callbacks.
Users relying on `catch_unwind` can still achieve similar behavior using
`std::thread::spawn`.
Fixes #2147.
|
|
|
|
remove `clap` dependency :tada:
update the book installation instructions
|