arduino.py 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. """
  2. pygments.styles.arduino
  3. ~~~~~~~~~~~~~~~~~~~~~~~
  4. Arduino® Syntax highlighting style.
  5. :copyright: Copyright 2006-2021 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, Generic, Whitespace
  11. class ArduinoStyle(Style):
  12. """
  13. The Arduino® language style. This style is designed to highlight the
  14. Arduino source code, so exepect the best results with it.
  15. """
  16. background_color = "#ffffff"
  17. default_style = ""
  18. styles = {
  19. Whitespace: "", # class: 'w'
  20. Error: "#a61717", # class: 'err'
  21. Comment: "#95a5a6", # class: 'c'
  22. Comment.Multiline: "", # class: 'cm'
  23. Comment.Preproc: "#728E00", # class: 'cp'
  24. Comment.Single: "", # class: 'c1'
  25. Comment.Special: "", # class: 'cs'
  26. Keyword: "#728E00", # class: 'k'
  27. Keyword.Constant: "#00979D", # class: 'kc'
  28. Keyword.Declaration: "", # class: 'kd'
  29. Keyword.Namespace: "", # class: 'kn'
  30. Keyword.Pseudo: "#00979D", # class: 'kp'
  31. Keyword.Reserved: "#00979D", # class: 'kr'
  32. Keyword.Type: "#00979D", # class: 'kt'
  33. Operator: "#728E00", # class: 'o'
  34. Operator.Word: "", # class: 'ow'
  35. Name: "#434f54", # class: 'n'
  36. Name.Attribute: "", # class: 'na'
  37. Name.Builtin: "#728E00", # class: 'nb'
  38. Name.Builtin.Pseudo: "", # class: 'bp'
  39. Name.Class: "", # class: 'nc'
  40. Name.Constant: "", # class: 'no'
  41. Name.Decorator: "", # class: 'nd'
  42. Name.Entity: "", # class: 'ni'
  43. Name.Exception: "", # class: 'ne'
  44. Name.Function: "#D35400", # class: 'nf'
  45. Name.Property: "", # class: 'py'
  46. Name.Label: "", # class: 'nl'
  47. Name.Namespace: "", # class: 'nn'
  48. Name.Other: "#728E00", # class: 'nx'
  49. Name.Tag: "", # class: 'nt'
  50. Name.Variable: "", # class: 'nv'
  51. Name.Variable.Class: "", # class: 'vc'
  52. Name.Variable.Global: "", # class: 'vg'
  53. Name.Variable.Instance: "", # class: 'vi'
  54. Number: "#8A7B52", # class: 'm'
  55. Number.Float: "", # class: 'mf'
  56. Number.Hex: "", # class: 'mh'
  57. Number.Integer: "", # class: 'mi'
  58. Number.Integer.Long: "", # class: 'il'
  59. Number.Oct: "", # class: 'mo'
  60. String: "#7F8C8D", # class: 's'
  61. String.Backtick: "", # class: 'sb'
  62. String.Char: "", # class: 'sc'
  63. String.Doc: "", # class: 'sd'
  64. String.Double: "", # class: 's2'
  65. String.Escape: "", # class: 'se'
  66. String.Heredoc: "", # class: 'sh'
  67. String.Interpol: "", # class: 'si'
  68. String.Other: "", # class: 'sx'
  69. String.Regex: "", # class: 'sr'
  70. String.Single: "", # class: 's1'
  71. String.Symbol: "", # class: 'ss'
  72. Generic: "", # class: 'g'
  73. Generic.Deleted: "", # class: 'gd',
  74. Generic.Emph: "", # class: 'ge'
  75. Generic.Error: "", # class: 'gr'
  76. Generic.Heading: "", # class: 'gh'
  77. Generic.Inserted: "", # class: 'gi'
  78. Generic.Output: "", # class: 'go'
  79. Generic.Prompt: "", # class: 'gp'
  80. Generic.Strong: "", # class: 'gs'
  81. Generic.Subheading: "", # class: 'gu'
  82. Generic.Traceback: "", # class: 'gt'
  83. }