Expectation refactoring 3/7: Change expectation processing
Before this commit, expectations were sorted and de-duplicated before they were passed to "buildMessage" and exposed in the "expected" property of syntax errors. This commit moves this processing into "buildMessage" and rewrites it to process only expectation descriptions. This means expectations exposed in the "expected" property are "raw" (not sorted and de-duplicated). This change will allow us to get rid of the "description" property of expectations and compute descriptions dynamically from structured information in the expectations. This will make descriptions a presentation-only concept. It will also make generated parsers smaller. Note that to keep expectations in the "expected" property sorted even without the "description" property, some sorting scheme based on structured information in the expectations would have to be devised, which would complicate things with only a little benefit. Therefore I chose to keep the expectations there "raw".redux
parent
c6e8c53f1b
commit
22cb123479
Loading…
Reference in New Issue