awk.json 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. {
  2. "keywords": {
  3. "keyword": "BEGIN END if else while do for in break continue delete next nextfile function func exit|10"
  4. },
  5. "contains": [
  6. {
  7. "className": "variable",
  8. "variants": [
  9. {
  10. "begin": "\\$[\\w\\d#@][\\w\\d_]*"
  11. },
  12. {
  13. "begin": "\\$\\{(.*?)}"
  14. }
  15. ]
  16. },
  17. {
  18. "className": "string",
  19. "contains": [
  20. {
  21. "begin": "\\\\[\\s\\S]",
  22. "relevance": 0
  23. }
  24. ],
  25. "variants": [
  26. {
  27. "begin": "(u|b)?r?'''",
  28. "end": "'''",
  29. "relevance": 10
  30. },
  31. {
  32. "begin": "(u|b)?r?\"\"\"",
  33. "end": "\"\"\"",
  34. "relevance": 10
  35. },
  36. {
  37. "begin": "(u|r|ur)'",
  38. "end": "'",
  39. "relevance": 10
  40. },
  41. {
  42. "begin": "(u|r|ur)\"",
  43. "end": "\"",
  44. "relevance": 10
  45. },
  46. {
  47. "begin": "(b|br)'",
  48. "end": "'"
  49. },
  50. {
  51. "begin": "(b|br)\"",
  52. "end": "\""
  53. },
  54. {
  55. "className": "string",
  56. "begin": "'",
  57. "end": "'",
  58. "illegal": "\\n",
  59. "contains": [
  60. {
  61. "$ref": "#contains.1.contains.0"
  62. }
  63. ]
  64. },
  65. {
  66. "className": "string",
  67. "begin": "\"",
  68. "end": "\"",
  69. "illegal": "\\n",
  70. "contains": [
  71. {
  72. "$ref": "#contains.1.contains.0"
  73. }
  74. ]
  75. }
  76. ]
  77. },
  78. {
  79. "className": "regexp",
  80. "begin": "\\\/",
  81. "end": "\\\/[gimuy]*",
  82. "illegal": "\\n",
  83. "contains": [
  84. {
  85. "$ref": "#contains.1.contains.0"
  86. },
  87. {
  88. "begin": "\\[",
  89. "end": "\\]",
  90. "relevance": 0,
  91. "contains": [
  92. {
  93. "$ref": "#contains.1.contains.0"
  94. }
  95. ]
  96. }
  97. ]
  98. },
  99. {
  100. "className": "comment",
  101. "begin": "#",
  102. "end": "$",
  103. "contains": [
  104. {
  105. "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"
  106. },
  107. {
  108. "className": "doctag",
  109. "begin": "(?:TODO|FIXME|NOTE|BUG|XXX):",
  110. "relevance": 0
  111. }
  112. ]
  113. },
  114. {
  115. "className": "number",
  116. "begin": "\\b\\d+(\\.\\d+)?",
  117. "relevance": 0
  118. }
  119. ]
  120. }