On Friday, February 2, 2018 at 1:57:34 PM UTC-8, Nicholas Nethercote wrote: > It shouldn't be too hard, because the prefs grammar is very simple. I would > just implement "panic mode" recovery, which scans for a synchronizing token > like ';' or 'pref' and then continues from there. It's not foolproof but > works well in many cases.
We do quite heavy error recover in the new l10n format. The way we handle it is that if we encounter an error while retrieving an entry, we collect it as an error[0], and skip to the start of the next one recognized by the first line that starts with an ID[1]. I assume the same would work for prefs (even easier, because the line has to start with `pref`). zb. [0] https://searchfox.org/mozilla-central/source/intl/l10n/MessageContext.jsm#63 [1] https://searchfox.org/mozilla-central/source/intl/l10n/MessageContext.jsm#957 _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform