Skip to content

Commit

Permalink
Merge pull request #152 from miguelsaldivar/master
Browse files Browse the repository at this point in the history
Fix for issue #150.
  • Loading branch information
fitzgen authored Aug 8, 2018
2 parents a642245 + 1dc4f0c commit 852e585
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4706,7 +4706,12 @@ impl Parse for TemplateArg {
return Ok((TemplateArg::Type(ty), tail));
}

let tail = consume(b"J", input)?;
let tail = if input.peek() == Some(b'J') {
consume(b"J", input)?
} else {
consume(b"I", input)?
};

let (args, tail) = if tail.peek() == Some(b'E') {
(vec![], tail)
} else {
Expand Down
8 changes: 8 additions & 0 deletions tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,3 +385,11 @@ demangles!(
_ZNK7mozilla15NativeEventDatacvPKT_I12_GdkEventKeyEEv,
"mozilla::NativeEventData::operator _GdkEventKey const*<_GdkEventKey>() const"
);
demangles!(
_ZN5boost9unordered18unordered_multimapItN3xxx6xxxxxx6xxxxxx14xxxxxxxxxxxxxxENS_4hashItEESt8equal_toItESaISt4pairIKtS5_EEE7emplaceIISC_EEENS0_15iterator_detail8iteratorINS0_6detail16grouped_ptr_nodeISC_EEEEDpOT_,
"boost::unordered::iterator_detail::iterator<boost::unordered::detail::grouped_ptr_node<std::pair<unsigned short const, xxx::xxxxxx::xxxxxx::xxxxxxxxxxxxxx> > > boost::unordered::unordered_multimap<unsigned short, xxx::xxxxxx::xxxxxx::xxxxxxxxxxxxxx, boost::hash<unsigned short>, std::equal_to<unsigned short>, std::allocator<std::pair<unsigned short const, xxx::xxxxxx::xxxxxx::xxxxxxxxxxxxxx> > >::emplace<std::pair<unsigned short const, xxx::xxxxxx::xxxxxx::xxxxxxxxxxxxxx> >(std::pair<unsigned short const, xxx::xxxxxx::xxxxxx::xxxxxxxxxxxxxx>&&...)"
);
demangles!(
_ZNSt6vectorIN3xxx6xxxxxx15xxxxxxxxxxxxxxxESaIS2_EE12emplace_backIIS2_EEEvDpOT_,
"void std::vector<xxx::xxxxxx::xxxxxxxxxxxxxxx, std::allocator<xxx::xxxxxx::xxxxxxxxxxxxxxx> >::emplace_back<xxx::xxxxxx::xxxxxxxxxxxxxxx>(xxx::xxxxxx::xxxxxxxxxxxxxxx&&...)"
);

0 comments on commit 852e585

Please sign in to comment.