> The existing `register!` macro is implemented as a declarative macro.
> Reimplement it as proc macro instead, with no functional changes intended.
>
> The old implementation produces unhelpful diagnostics when things go wrong.
> For example, for code like
>
> register! {
> pub(crate) TESTREG(u32) {
> 31:0 data;
> }
> }
>
> which misses out the "@ offset" part of the specification, and the
> following error is produced:
>
> [ ... ]
>
> possible; declarative macro will reject this as `@` is not in the
> follow-set of "ty" metavariable kind.
>
> Signed-off-by: Gary Guo <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review ยท
https://sashiko.dev/#/patchset/[email protected]?part=1