dts.json 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. {
  2. "keywords": "",
  3. "contains": [
  4. {
  5. "className": "class",
  6. "begin": "\/\\s*{",
  7. "end": "};",
  8. "relevance": 10,
  9. "contains": [
  10. {
  11. "className": "variable",
  12. "begin": "\\&[a-z\\d_]*\\b"
  13. },
  14. {
  15. "className": "meta-keyword",
  16. "begin": "\/[a-z][a-z\\d\\-]*\/"
  17. },
  18. {
  19. "className": "symbol",
  20. "begin": "^\\s*[a-zA-Z_][a-zA-Z\\d_]*:"
  21. },
  22. {
  23. "className": "class",
  24. "begin": "[a-zA-Z_][a-zA-Z\\d_@]*\\s{",
  25. "end": "[{;=]",
  26. "returnBegin": true,
  27. "excludeEnd": true
  28. },
  29. {
  30. "className": "params",
  31. "begin": "<",
  32. "end": ">",
  33. "contains": [
  34. {
  35. "className": "number",
  36. "variants": [
  37. {
  38. "begin": "\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"
  39. },
  40. {
  41. "begin": "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)"
  42. }
  43. ],
  44. "relevance": 0
  45. },
  46. {
  47. "$ref": "#contains.0.contains.0"
  48. }
  49. ]
  50. },
  51. {
  52. "className": "comment",
  53. "begin": "\/\/",
  54. "end": "$",
  55. "contains": [
  56. {
  57. "begin": "\\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\\b"
  58. },
  59. {
  60. "className": "doctag",
  61. "begin": "(?:TODO|FIXME|NOTE|BUG|XXX):",
  62. "relevance": 0
  63. }
  64. ]
  65. },
  66. {
  67. "className": "comment",
  68. "begin": "\/\\*",
  69. "end": "\\*\/",
  70. "contains": [
  71. {
  72. "$ref": "#contains.0.contains.5.contains.0"
  73. },
  74. {
  75. "className": "doctag",
  76. "begin": "(?:TODO|FIXME|NOTE|BUG|XXX):",
  77. "relevance": 0
  78. }
  79. ]
  80. },
  81. {
  82. "$ref": "#contains.0.contains.4.contains.0"
  83. },
  84. {
  85. "className": "string",
  86. "variants": [
  87. {
  88. "className": "string",
  89. "begin": "((u8?|U)|L)?\"",
  90. "end": "\"",
  91. "illegal": "\\n",
  92. "contains": [
  93. {
  94. "begin": "\\\\[\\s\\S]",
  95. "relevance": 0
  96. }
  97. ]
  98. },
  99. {
  100. "begin": "(u8?|U)?R\"",
  101. "end": "\"",
  102. "contains": [
  103. {
  104. "$ref": "#contains.0.contains.8.variants.0.contains.0"
  105. }
  106. ]
  107. },
  108. {
  109. "begin": "'\\\\?.",
  110. "end": "'",
  111. "illegal": "."
  112. }
  113. ]
  114. }
  115. ]
  116. },
  117. {
  118. "$ref": "#contains.0.contains.0"
  119. },
  120. {
  121. "$ref": "#contains.0.contains.1"
  122. },
  123. {
  124. "$ref": "#contains.0.contains.2"
  125. },
  126. {
  127. "$ref": "#contains.0.contains.3"
  128. },
  129. {
  130. "$ref": "#contains.0.contains.4"
  131. },
  132. {
  133. "$ref": "#contains.0.contains.5"
  134. },
  135. {
  136. "$ref": "#contains.0.contains.6"
  137. },
  138. {
  139. "$ref": "#contains.0.contains.4.contains.0"
  140. },
  141. {
  142. "$ref": "#contains.0.contains.8"
  143. },
  144. {
  145. "className": "meta",
  146. "begin": "#",
  147. "end": "$",
  148. "keywords": {
  149. "meta-keyword": "if else elif endif define undef ifdef ifndef"
  150. },
  151. "contains": [
  152. {
  153. "begin": "\\\\\\n",
  154. "relevance": 0
  155. },
  156. {
  157. "beginKeywords": "include",
  158. "end": "$",
  159. "keywords": {
  160. "meta-keyword": "include"
  161. },
  162. "contains": [
  163. {
  164. "className": "meta-string",
  165. "variants": {
  166. "$ref": "#contains.0.contains.8.variants"
  167. }
  168. },
  169. {
  170. "className": "meta-string",
  171. "begin": "<",
  172. "end": ">",
  173. "illegal": "\\n"
  174. }
  175. ]
  176. },
  177. {
  178. "$ref": "#contains.0.contains.8"
  179. },
  180. {
  181. "$ref": "#contains.0.contains.5"
  182. },
  183. {
  184. "$ref": "#contains.0.contains.6"
  185. }
  186. ]
  187. },
  188. {
  189. "begin": "[a-zA-Z]\\w*::",
  190. "keywords": ""
  191. }
  192. ]
  193. }