mirror of
https://github.com/boostorg/spirit_x4.git
synced 2026-01-30 08:12:10 +00:00
The old implementation created temporary container variable and move-appended its elements to the exposed attribute. This commit adds new core class `container_appender` that transparently handles insertion in underlying parsers, without the need to creating a temporary variable. This change simplifies the core behavior of how the attribute and iterator is preserved (or not preserved) in failed parse attempts. Since X4 does not allow error handlers to return anything except `void`, X4's iterator rollback behavior is not dependent on the error handler anymore. This commit further clarifies the iterator/attribute behavior for all supported core parsers. Due to the reasons described above, this commit not only acts as X4's "companion" fix mentioned in boostorg/spirit#833, but essentially acts as the strict superset of the corresponding work boostorg/spirit#836 in X4's domain.
11 KiB
11 KiB