Skip to content

Conversation

@CohenArthur
Copy link
Member

Needs #1513, Skip reviewing the first commit

*/

bool is_single_fragment () const { return nodes.size () == 1; }
bool is_single_fragment (SingleASTNode::NodeType expected) const
Copy link
Member

Choose a reason for hiding this comment

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

Not sure about the name of this method. Its a pet nit of mine that I prefer to use overloading only on methods where they already take arguments. It feels like a new method to check if is_single_fragment and that single fragment is of a particular type.

How about is_single_fragment_of_kind (...)

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, I see what you mean. I'll rename it. assert_single_fragment kinda serves the same purpose but it also crashes if the assertion fails, so it's a bit different from is_single_fragment

}

bool is_single_fragment_kind (SingleASTNode::NodeType kind) const
void assert_single_fragment (SingleASTNode::NodeType expected) const
Copy link
Member

Choose a reason for hiding this comment

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

ah ok so it gets renamed here anyway :)

Copy link
Member

@philberty philberty left a comment

Choose a reason for hiding this comment

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

LGTM

@CohenArthur CohenArthur force-pushed the segv-transcribe-type-1.29 branch from 3564cef to 4423754 Compare August 30, 2022 09:03
@CohenArthur CohenArthur force-pushed the segv-transcribe-type-1.29 branch from 4423754 to 21cfed5 Compare August 31, 2022 08:55
@CohenArthur
Copy link
Member Author

bors r+

@bors
Copy link
Contributor

bors bot commented Aug 31, 2022

Merge conflict.

@CohenArthur CohenArthur force-pushed the segv-transcribe-type-1.29 branch from 21cfed5 to fcf6fea Compare August 31, 2022 09:14
@CohenArthur
Copy link
Member Author

bors retry

@bors
Copy link
Contributor

bors bot commented Aug 31, 2022

Build succeeded:

@bors bors bot merged commit 45f80a2 into Rust-GCC:master Aug 31, 2022
@CohenArthur CohenArthur deleted the segv-transcribe-type-1.29 branch August 31, 2022 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants