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.

202 lines
4.5 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. // setting semicolon's color to the same as the terminal background makes it invisible
  79. ';': colors.black
  80. , '.': colors.green
  81. , ',': colors.green
  82. , '{': colors.yellow
  83. , '}': colors.yellow
  84. , '(': colors.brightBlack
  85. , ')': colors.brightBlack
  86. , '[': colors.yellow
  87. , ']': colors.yellow
  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. , '>>>=': undefined
  130. , _default: colors.brightYellow
  131. }
  132. // line comment
  133. , Line: {
  134. _default: colors.brightBlack
  135. }
  136. /* block comment */
  137. , Block: {
  138. _default: colors.brightBlack
  139. }
  140. // JSX
  141. , JSXAttribute: {
  142. _default: colors.magenta
  143. }
  144. , JSXClosingElement: {
  145. _default: colors.magenta
  146. }
  147. , JSXElement: {
  148. _default: colors.magenta
  149. }
  150. , JSXEmptyExpression: {
  151. _default: colors.magenta
  152. }
  153. , JSXExpressionContainer: {
  154. _default: colors.magenta
  155. }
  156. , JSXIdentifier: {
  157. className: colors.blue
  158. , _default: colors.magenta
  159. }
  160. , JSXMemberExpression: {
  161. _default: colors.magenta
  162. }
  163. , JSXNamespacedName: {
  164. _default: colors.magenta
  165. }
  166. , JSXOpeningElement: {
  167. _default: colors.magenta
  168. }
  169. , JSXSpreadAttribute: {
  170. _default: colors.magenta
  171. }
  172. , JSXText: {
  173. _default: colors.brightGreen
  174. }
  175. , _default: undefined
  176. }