arduino.py 4.5 KB

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