Currently the L53 of list parser passes the hard-coded unused attribute for the underlying parser. This leads to surprising result at runtime, where the content of the RHS is silently omitted even if the RHS has some explicit attribute.
|
if (!detail::parse_into_container(this->left, first, last, ctx, x4::assume_container(attr))) { |
|
return false; |
|
} |
|
|
|
It last_parse_it = first; |
|
while ( |
|
this->right.parse(last_parse_it, last, ctx, unused) && |
|
detail::parse_into_container(this->left, last_parse_it, last, ctx, x4::assume_container(attr)) |
|
) { |
This looks like a bug to me, but fixing this would be a breaking change. We should re-check the unit tests.
A workaround is to rewrite this:
to this:
but I think the current behavior is very awkward in the first place.
Currently the L53 of list parser passes the hard-coded
unusedattribute for the underlying parser. This leads to surprising result at runtime, where the content of the RHS is silently omitted even if the RHS has some explicit attribute.x4/include/iris/x4/operator/list.hpp
Lines 47 to 55 in 9de1d0c
This looks like a bug to me, but fixing this would be a breaking change. We should re-check the unit tests.
A workaround is to rewrite this:
to this:
but I think the current behavior is very awkward in the first place.