xcode.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # -*- coding: utf-8 -*-
  2. """
  3. pygments.styles.xcode
  4. ~~~~~~~~~~~~~~~~~~~~~
  5. Style similar to the `Xcode` default theme.
  6. :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
  7. :license: BSD, see LICENSE for details.
  8. """
  9. from pygments.style import Style
  10. from pygments.token import Keyword, Name, Comment, String, Error, \
  11. Number, Operator, Literal
  12. class XcodeStyle(Style):
  13. """
  14. Style similar to the Xcode default colouring theme.
  15. """
  16. default_style = ''
  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. }