Skip to content

Parse <register><alternateRegister> elements #50

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

Merged
merged 3 commits into from
Mar 16, 2018
Merged

Conversation

wez
Copy link
Contributor

@wez wez commented Mar 13, 2018

In looking at rust-embedded/svd2rust#191 and rust-embedded/svd2rust#16 I thought that this might help, so here's the trivial patch.

Copy link
Member

@Emilgardis Emilgardis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, some changes needed.

.gitignore Outdated
@@ -1,4 +1,5 @@
*.rs.bk
.*sw*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[._]*.sw[a-p] is a better solution for matching vim swap files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will amend

src/lib.rs Outdated
|s| {
s.to_owned()
},
),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This indentation is uneeded

tree.attributes.get("derivedFrom").map(|s| s.to_owned()),

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied this from the other instance of derivedFrom. Note that the .rustfmt.toml config wants this to be:

            derived_from: tree.attributes
                .get("derivedFrom")
                .map(|s| s.to_owned()),

There are other portions that are not rustfmt'd. Would you like me to insert a commit that applies rustfmt underneath my changes and then make them match?

@wez
Copy link
Contributor Author

wez commented Mar 15, 2018

#51 for rustfmt, I'll amend this one independently from that for now

@wez
Copy link
Contributor Author

wez commented Mar 15, 2018

(force pushed with your suggested changes; you'll probably need to hard refresh the PR page)

wez added a commit to wez/svd2rust that referenced this pull request Mar 15, 2018
This is a very basic first cut at expanding registers with derivedFrom.

This commit requires rust-embedded/svd#50
@Emilgardis
Copy link
Member

Thank you!

bors r+

bors bot added a commit that referenced this pull request Mar 16, 2018
50: Parse <register><alternateRegister> elements r=Emilgardis a=wez

In looking at rust-embedded/svd2rust#191 and rust-embedded/svd2rust#16 I thought that this might help, so here's the trivial patch.
@bors
Copy link
Contributor

bors bot commented Mar 16, 2018

Build succeeded

@bors bors bot merged commit 211ae3e into rust-embedded:master Mar 16, 2018
wez added a commit to wez/svd2rust that referenced this pull request Apr 20, 2018
This is a very basic first cut at expanding registers with derivedFrom.

This commit requires rust-embedded/svd#50
wez added a commit to wez/svd2rust that referenced this pull request Apr 20, 2018
This is a very basic first cut at expanding registers with derivedFrom.

This commit requires rust-embedded/svd#50
wez added a commit to wez/svd2rust that referenced this pull request May 8, 2018
This is a very basic first cut at expanding registers with derivedFrom.

This commit requires rust-embedded/svd#50
wez added a commit to wez/svd2rust that referenced this pull request May 9, 2018
This is a very basic first cut at expanding registers with derivedFrom.

This commit requires rust-embedded/svd#50
wez added a commit to wez/svd2rust that referenced this pull request Aug 22, 2018
This is a very basic first cut at expanding registers with derivedFrom.

This commit requires rust-embedded/svd#50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants