unicode.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. 'use strict';
  2. exports.REPLACEMENT_CHARACTER = '\uFFFD';
  3. exports.CODE_POINTS = {
  4. EOF: -1,
  5. NULL: 0x00,
  6. TABULATION: 0x09,
  7. CARRIAGE_RETURN: 0x0D,
  8. LINE_FEED: 0x0A,
  9. FORM_FEED: 0x0C,
  10. SPACE: 0x20,
  11. EXCLAMATION_MARK: 0x21,
  12. QUOTATION_MARK: 0x22,
  13. NUMBER_SIGN: 0x23,
  14. AMPERSAND: 0x26,
  15. APOSTROPHE: 0x27,
  16. HYPHEN_MINUS: 0x2D,
  17. SOLIDUS: 0x2F,
  18. DIGIT_0: 0x30,
  19. DIGIT_9: 0x39,
  20. SEMICOLON: 0x3B,
  21. LESS_THAN_SIGN: 0x3C,
  22. EQUALS_SIGN: 0x3D,
  23. GREATER_THAN_SIGN: 0x3E,
  24. QUESTION_MARK: 0x3F,
  25. LATIN_CAPITAL_A: 0x41,
  26. LATIN_CAPITAL_F: 0x46,
  27. LATIN_CAPITAL_X: 0x58,
  28. LATIN_CAPITAL_Z: 0x5A,
  29. GRAVE_ACCENT: 0x60,
  30. LATIN_SMALL_A: 0x61,
  31. LATIN_SMALL_F: 0x66,
  32. LATIN_SMALL_X: 0x78,
  33. LATIN_SMALL_Z: 0x7A,
  34. REPLACEMENT_CHARACTER: 0xFFFD
  35. };
  36. exports.CODE_POINT_SEQUENCES = {
  37. DASH_DASH_STRING: [0x2D, 0x2D], //--
  38. DOCTYPE_STRING: [0x44, 0x4F, 0x43, 0x54, 0x59, 0x50, 0x45], //DOCTYPE
  39. CDATA_START_STRING: [0x5B, 0x43, 0x44, 0x41, 0x54, 0x41, 0x5B], //[CDATA[
  40. CDATA_END_STRING: [0x5D, 0x5D, 0x3E], //]]>
  41. SCRIPT_STRING: [0x73, 0x63, 0x72, 0x69, 0x70, 0x74], //script
  42. PUBLIC_STRING: [0x50, 0x55, 0x42, 0x4C, 0x49, 0x43], //PUBLIC
  43. SYSTEM_STRING: [0x53, 0x59, 0x53, 0x54, 0x45, 0x4D] //SYSTEM
  44. };