Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

169 lines
4.0 KiB

  1. var colors = require('ansicolors')
  2. // mimics [jq](https://stedolan.github.io/jq/) highlighting for json files
  3. // mainly in the fact that the keys are a clearly different color than the strings
  4. // However improvements to this theme are highly welcome! :)
  5. // Change the below definitions in order to tweak the color theme.
  6. module.exports = {
  7. 'Boolean': {
  8. 'true' : undefined
  9. , 'false' : undefined
  10. , _default : colors.brightRed
  11. }
  12. , 'Identifier': {
  13. 'undefined' : colors.brightBlack
  14. , 'self' : colors.brightRed
  15. , 'console' : colors.blue
  16. , 'log' : colors.blue
  17. , 'warn' : colors.red
  18. , 'error' : colors.brightRed
  19. , _default : colors.white
  20. }
  21. , 'Null': {
  22. _default: colors.brightBlack
  23. }
  24. , 'Numeric': {
  25. _default: colors.blue
  26. }
  27. , 'String': {
  28. _default: function(s, info) {
  29. var nextToken = info.tokens[info.tokenIndex + 1]
  30. // show keys of object literals and json in different color
  31. return (nextToken && nextToken.type === 'Punctuator' && nextToken.value === ':')
  32. ? colors.brightBlue(s)
  33. : colors.brightGreen(s)
  34. }
  35. }
  36. , 'Keyword': {
  37. 'break' : undefined
  38. , 'case' : undefined
  39. , 'catch' : colors.cyan
  40. , 'class' : undefined
  41. , 'const' : undefined
  42. , 'continue' : undefined
  43. , 'debugger' : undefined
  44. , 'default' : undefined
  45. , 'delete' : colors.red
  46. , 'do' : undefined
  47. , 'else' : undefined
  48. , 'enum' : undefined
  49. , 'export' : undefined
  50. , 'extends' : undefined
  51. , 'finally' : colors.cyan
  52. , 'for' : undefined
  53. , 'function' : undefined
  54. , 'if' : undefined
  55. , 'implements' : undefined
  56. , 'import' : undefined
  57. , 'in' : undefined
  58. , 'instanceof' : undefined
  59. , 'let' : undefined
  60. , 'new' : colors.red
  61. , 'package' : undefined
  62. , 'private' : undefined
  63. , 'protected' : undefined
  64. , 'public' : undefined
  65. , 'return' : colors.red
  66. , 'static' : undefined
  67. , 'super' : undefined
  68. , 'switch' : undefined
  69. , 'this' : colors.brightRed
  70. , 'throw' : undefined
  71. , 'try' : colors.cyan
  72. , 'typeof' : undefined
  73. , 'var' : colors.green
  74. , 'void' : undefined
  75. , 'while' : undefined
  76. , 'with' : undefined
  77. , 'yield' : undefined
  78. , _default : colors.brightBlue
  79. }
  80. , 'Punctuator': {
  81. ';': colors.brightBlack
  82. , '.': colors.green
  83. , ',': colors.green
  84. , '{': colors.brightWhite
  85. , '}': colors.brightWhite
  86. , '(': colors.brightBlack
  87. , ')': colors.brightBlack
  88. , '[': colors.brightWhite
  89. , ']': colors.brightWhite
  90. , '<': undefined
  91. , '>': undefined
  92. , '+': undefined
  93. , '-': undefined
  94. , '*': undefined
  95. , '%': undefined
  96. , '&': undefined
  97. , '|': undefined
  98. , '^': undefined
  99. , '!': undefined
  100. , '~': undefined
  101. , '?': undefined
  102. , ':': undefined
  103. , '=': undefined
  104. , '<=': undefined
  105. , '>=': undefined
  106. , '==': undefined
  107. , '!=': undefined
  108. , '++': undefined
  109. , '--': undefined
  110. , '<<': undefined
  111. , '>>': undefined
  112. , '&&': undefined
  113. , '||': undefined
  114. , '+=': undefined
  115. , '-=': undefined
  116. , '*=': undefined
  117. , '%=': undefined
  118. , '&=': undefined
  119. , '|=': undefined
  120. , '^=': undefined
  121. , '/=': undefined
  122. , '=>': undefined
  123. , '**': undefined
  124. , '===': undefined
  125. , '!==': undefined
  126. , '>>>': undefined
  127. , '<<=': undefined
  128. , '>>=': undefined
  129. , '...': undefined
  130. , '**=': undefined
  131. , '>>>=': undefined
  132. , _default: colors.brightYellow
  133. }
  134. // line comment
  135. , Line: {
  136. _default: colors.brightBlack
  137. }
  138. /* block comment */
  139. , Block: {
  140. _default: colors.brightBlack
  141. }
  142. , _default: undefined
  143. }