reserved.js 1.3 KB

123456789101112131415161718192021222324252627282930
  1. 'use strict';
  2. var contains = require('../lib/Array/prototype/contains');
  3. module.exports = function (t, a) {
  4. a(contains.call(t.keywords, 'break'), true,
  5. "Keywords hash has reserved keyword");
  6. a(contains.call(t.keywords, 'class'), false,
  7. "Keywords hash has not future reserved word");
  8. a(contains.call(t.keywords, 'let'), false,
  9. "Keywords hash has not future strict reserved word");
  10. a(contains.call(t.future, 'break'), false,
  11. "Future reserved hash has not reserved keyword");
  12. a(contains.call(t.future, 'class'), true,
  13. "Future reserved hash has future reserved word");
  14. a(contains.call(t.future, 'let'), false,
  15. "Future reserved hash has not future strict reserved word");
  16. a(contains.call(t.futureStrict, 'break'), false,
  17. "Future strict reserved hash has not reserved keyword");
  18. a(contains.call(t.futureStrict, 'class'), false,
  19. "Future strict reserved hash has not future reserved word");
  20. a(contains.call(t.futureStrict, 'let'), true,
  21. "Future reserved hash has future strict reserved word");
  22. a(contains.call(t, 'break'), true,
  23. "All reserved keywords hash has reserved keyword");
  24. a(contains.call(t, 'class'), true,
  25. "All reserved keywords hash has future reserved word");
  26. a(contains.call(t, 'let'), true,
  27. "All reserved keywords hash has future strict reserved word");
  28. };