lexy icon indicating copy to clipboard operation
lexy copied to clipboard

`lexyd::_detect_scan_state` cannot detect state for non-defaulted parsed values

Open Spartan322 opened this issue 1 year ago • 0 comments

lexyd::_detect_scan_state seems to force a presumption that you will either want a parse state or parsed values, with the only exception being if all the branch values are defaulted, since its checking

Context::production::scan(LEXY_DECLVAL(Scanner&), *StatePtr())

for validity, this means if your scanned values can't be defaulted, it actually presumes the first value after the rule_scanner into the scan function is not the parse state but the values you had parsed. This could also hide conversions.

Spartan322 avatar Aug 10 '24 10:08 Spartan322