arduino.py 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # -*- coding: utf-8 -*-
  2. """
  3. pygments.styles.arduino
  4. ~~~~~~~~~~~~~~~~~~~~~~~
  5. Arduino® Syntax highlighting style.
  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, Generic, Whitespace
  12. class ArduinoStyle(Style):
  13. u"""
  14. The Arduino® language style. This style is designed to highlight the
  15. Arduino source code, so exepect the best results with it.
  16. """
  17. background_color = "#ffffff"
  18. default_style = ""
  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. }