stata.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # -*- coding: utf-8 -*-
  2. """
  3. pygments.styles.stata
  4. ~~~~~~~~~~~~~~~~~~~~~
  5. Style inspired by Stata's do-file editor. Note this is not meant
  6. to be a complete style. It's merely meant to mimic Stata's do file
  7. editor syntax highlighting.
  8. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
  9. :license: BSD, see LICENSE for details.
  10. """
  11. from pygments.style import Style
  12. from pygments.token import Keyword, Name, Comment, String, Error, \
  13. Number, Operator, Whitespace
  14. class StataStyle(Style):
  15. """
  16. Style inspired by Stata's do-file editor. Note this is not meant
  17. to be a complete style. It's merely meant to mimic Stata's do file
  18. editor syntax highlighting.
  19. """
  20. default_style = ''
  21. styles = {
  22. Whitespace: '#bbbbbb',
  23. Comment: 'italic #008800',
  24. String: '#7a2424',
  25. Number: '#2c2cff',
  26. Operator: '',
  27. Keyword: 'bold #353580',
  28. Keyword.Constant: '',
  29. Name.Function: '#2c2cff',
  30. Name.Variable: 'bold #35baba',
  31. Name.Variable.Global: 'bold #b5565e',
  32. Error: 'bg:#e3d2d2 #a61717'
  33. }