thrift.json 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. {
  2. "keywords": {
  3. "keyword": "namespace const typedef struct enum service exception void oneway set list map required optional",
  4. "built_in": "bool byte i16 i32 i64 double string binary",
  5. "literal": "true false"
  6. },
  7. "contains": [
  8. {
  9. "className": "string",
  10. "begin": "\"",
  11. "end": "\"",
  12. "illegal": "\\n",
  13. "contains": [
  14. {
  15. "begin": "\\\\[\\s\\S]",
  16. "relevance": 0
  17. }
  18. ]
  19. },
  20. {
  21. "className": "number",
  22. "begin": "\\b\\d+(\\.\\d+)?",
  23. "relevance": 0
  24. },
  25. {
  26. "className": "comment",
  27. "begin": "\/\/",
  28. "end": "$",
  29. "contains": [
  30. {
  31. "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"
  32. },
  33. {
  34. "className": "doctag",
  35. "begin": "(?:TODO|FIXME|NOTE|BUG|XXX):",
  36. "relevance": 0
  37. }
  38. ]
  39. },
  40. {
  41. "className": "comment",
  42. "begin": "\/\\*",
  43. "end": "\\*\/",
  44. "contains": [
  45. {
  46. "$ref": "#contains.2.contains.0"
  47. },
  48. {
  49. "className": "doctag",
  50. "begin": "(?:TODO|FIXME|NOTE|BUG|XXX):",
  51. "relevance": 0
  52. }
  53. ]
  54. },
  55. {
  56. "className": "class",
  57. "beginKeywords": "struct enum service exception",
  58. "end": "\\{",
  59. "illegal": "\\n",
  60. "contains": [
  61. {
  62. "className": "title",
  63. "begin": "[a-zA-Z]\\w*",
  64. "relevance": 0,
  65. "starts": {
  66. "endsWithParent": true,
  67. "excludeEnd": true
  68. }
  69. }
  70. ]
  71. },
  72. {
  73. "begin": "\\b(set|list|map)\\s*<",
  74. "end": ">",
  75. "keywords": "bool byte i16 i32 i64 double string binary",
  76. "contains": [
  77. "self"
  78. ]
  79. }
  80. ]
  81. }