Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing reserved words to check in dump/dumps.
When deciding whether to encode a key as an identifier instead of a string, the encoding logic checks against a list of reserved words to avoid conflicts. The existing code is based on the list in section 7.6.1 of EcmaScript 5.1. However, it turns out that I was missing some of the future reserved words: - implements - interface - let - package - private - protected - public - static - yield. This CL adds them to the list. This fixes GitHub #87. Note that this will introduce some backwards incompatibility (because now those words will be quoted when encoded), but I think that's probably better to do than to leave the bug open. If this causes problems, we can revert this list and either add an option to check for them or just wait until we can do a non-backwards-compatible release.
- Loading branch information