xcode.py 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. """
  2. pygments.styles.xcode
  3. ~~~~~~~~~~~~~~~~~~~~~
  4. Style similar to the `Xcode` default theme.
  5. :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
  6. :license: BSD, see LICENSE for details.
  7. """
  8. from pygments.style import Style
  9. from pygments.token import Keyword, Name, Comment, String, Error, \
  10. Number, Operator, Literal
  11. __all__ = ['XcodeStyle']
  12. class XcodeStyle(Style):
  13. """
  14. Style similar to the Xcode default colouring theme.
  15. """
  16. name = 'xcode'
  17. styles = {
  18. Comment: '#177500',
  19. Comment.Preproc: '#633820',
  20. String: '#C41A16',
  21. String.Char: '#2300CE',
  22. Operator: '#000000',
  23. Keyword: '#A90D91',
  24. Name: '#000000',
  25. Name.Attribute: '#836C28',
  26. Name.Class: '#3F6E75',
  27. Name.Function: '#000000',
  28. Name.Builtin: '#A90D91',
  29. # In Obj-C code this token is used to colour Cocoa types
  30. Name.Builtin.Pseudo: '#5B269A',
  31. Name.Variable: '#000000',
  32. Name.Tag: '#000000',
  33. Name.Decorator: '#000000',
  34. # Workaround for a BUG here: lexer treats multiline method signatres as labels
  35. Name.Label: '#000000',
  36. Literal: '#1C01CE',
  37. Number: '#1C01CE',
  38. Error: '#000000',
  39. }