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.

pygments 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. from pygments.style import Style
  2. from pygments.token import (
  3. Comment,
  4. Error,
  5. Keyword,
  6. Literal,
  7. Name,
  8. Number,
  9. Operator,
  10. String,
  11. Text,
  12. )
  13. class NTRStyle(Style):
  14. base00 = "<{color0}>"
  15. base01 = "<{color1}>"
  16. base02 = "<{color2}>"
  17. base03 = "<{color3}>"
  18. base04 = "<{color4}>"
  19. base05 = "<{color5}>"
  20. base06 = "<{color6}>"
  21. base07 = "<{color7}>"
  22. base08 = "<{color8}>"
  23. base09 = "<{color9}>"
  24. base0a = "<{color10}>"
  25. base0b = "<{color11}>"
  26. base0c = "<{color12}>"
  27. base0d = "<{color13}>"
  28. base0e = "<{color14}>"
  29. base0f = "<{color15}>"
  30. default_style = ""
  31. background_color = base00
  32. highlight_color = base02
  33. styles = {
  34. Text: base05,
  35. Error: base08, # .err
  36. Comment: base03, # .c
  37. Comment.Preproc: base0f, # .cp
  38. Comment.PreprocFile: base0b, # .cpf
  39. Keyword: base0e, # .k
  40. Keyword.Type: base08, # .kt
  41. Name.Attribute: base0d, # .na
  42. Name.Builtin: base0d, # .nb
  43. Name.Builtin.Pseudo: base08, # .bp
  44. Name.Class: base0d, # .nc
  45. Name.Constant: base09, # .no
  46. Name.Decorator: base09, # .nd
  47. Name.Function: base0d, # .nf
  48. Name.Namespace: base0d, # .nn
  49. Name.Tag: base0e, # .nt
  50. Name.Variable: base0d, # .nv
  51. Name.Variable.Instance: base08, # .vi
  52. Number: base09, # .m
  53. Operator: base0c, # .o
  54. Operator.Word: base0e, # .ow
  55. Literal: base0b, # .l
  56. String: base0b, # .s
  57. String.Interpol: base0f, # .si
  58. String.Regex: base0c, # .sr
  59. String.Symbol: base09, # .ss
  60. }
  61. NTRStyle.__name__ = "NTRStyle"
  62. globals()[NTRStyle.__name__] = globals()["NTRStyle"]
  63. del globals()["NTRStyle"]