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.

201 lines
4.4 KiB

  1. var colors = require('ansicolors')
  2. // Change the below definitions in order to tweak the color theme.
  3. module.exports = {
  4. 'Boolean': {
  5. 'true' : undefined
  6. , 'false' : undefined
  7. , _default : colors.brightRed
  8. }
  9. , 'Identifier': {
  10. 'undefined' : colors.brightBlack
  11. , 'self' : colors.brightRed
  12. , 'console' : colors.blue
  13. , 'log' : colors.blue
  14. , 'warn' : colors.red
  15. , 'error' : colors.brightRed
  16. , _default : colors.white
  17. }
  18. , 'Null': {
  19. _default: colors.brightBlack
  20. }
  21. , 'Numeric': {
  22. _default: colors.blue
  23. }
  24. , 'String': {
  25. _default: function(s, info) {
  26. var nextToken = info.tokens[info.tokenIndex + 1]
  27. // show keys of object literals and json in different color
  28. return (nextToken && nextToken.type === 'Punctuator' && nextToken.value === ':')
  29. ? colors.green(s)
  30. : colors.brightGreen(s)
  31. }
  32. }
  33. , 'Keyword': {
  34. 'break' : undefined
  35. , 'case' : undefined
  36. , 'catch' : colors.cyan
  37. , 'class' : undefined
  38. , 'const' : undefined
  39. , 'continue' : undefined
  40. , 'debugger' : undefined
  41. , 'default' : undefined
  42. , 'delete' : colors.red
  43. , 'do' : undefined
  44. , 'else' : undefined
  45. , 'enum' : undefined
  46. , 'export' : undefined
  47. , 'extends' : undefined
  48. , 'finally' : colors.cyan
  49. , 'for' : undefined
  50. , 'function' : undefined
  51. , 'if' : undefined
  52. , 'implements' : undefined
  53. , 'import' : undefined
  54. , 'in' : undefined
  55. , 'instanceof' : undefined
  56. , 'let' : undefined
  57. , 'new' : colors.red
  58. , 'package' : undefined
  59. , 'private' : undefined
  60. , 'protected' : undefined
  61. , 'public' : undefined
  62. , 'return' : colors.red
  63. , 'static' : undefined
  64. , 'super' : undefined
  65. , 'switch' : undefined
  66. , 'this' : colors.brightRed
  67. , 'throw' : undefined
  68. , 'try' : colors.cyan
  69. , 'typeof' : undefined
  70. , 'var' : colors.green
  71. , 'void' : undefined
  72. , 'while' : undefined
  73. , 'with' : undefined
  74. , 'yield' : undefined
  75. , _default : colors.brightBlue
  76. }
  77. , 'Punctuator': {
  78. ';': colors.brightBlack
  79. , '.': colors.green
  80. , ',': colors.green
  81. , '{': colors.yellow
  82. , '}': colors.yellow
  83. , '(': colors.brightBlack
  84. , ')': colors.brightBlack
  85. , '[': colors.yellow
  86. , ']': colors.yellow
  87. , '<': undefined
  88. , '>': undefined
  89. , '+': undefined
  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. , _default: colors.brightYellow
  130. }
  131. // line comment
  132. , Line: {
  133. _default: colors.brightBlack
  134. }
  135. /* block comment */
  136. , Block: {
  137. _default: colors.brightBlack
  138. }
  139. // JSX
  140. , JSXAttribute: {
  141. _default: colors.magenta
  142. }
  143. , JSXClosingElement: {
  144. _default: colors.magenta
  145. }
  146. , JSXElement: {
  147. _default: colors.magenta
  148. }
  149. , JSXEmptyExpression: {
  150. _default: colors.magenta
  151. }
  152. , JSXExpressionContainer: {
  153. _default: colors.magenta
  154. }
  155. , JSXIdentifier: {
  156. className: colors.blue
  157. , _default: colors.magenta
  158. }
  159. , JSXMemberExpression: {
  160. _default: colors.magenta
  161. }
  162. , JSXNamespacedName: {
  163. _default: colors.magenta
  164. }
  165. , JSXOpeningElement: {
  166. _default: colors.magenta
  167. }
  168. , JSXSpreadAttribute: {
  169. _default: colors.magenta
  170. }
  171. , JSXText: {
  172. _default: colors.brightGreen
  173. }
  174. , _default: undefined
  175. }