scala.json 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. {
  2. "keywords": {
  3. "literal": "true false null",
  4. "keyword": "type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit"
  5. },
  6. "contains": [
  7. {
  8. "className": "comment",
  9. "begin": "\/\/",
  10. "end": "$",
  11. "contains": [
  12. {
  13. "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"
  14. },
  15. {
  16. "className": "doctag",
  17. "begin": "(?:TODO|FIXME|NOTE|BUG|XXX):",
  18. "relevance": 0
  19. }
  20. ]
  21. },
  22. {
  23. "className": "comment",
  24. "begin": "\/\\*",
  25. "end": "\\*\/",
  26. "contains": [
  27. {
  28. "$ref": "#contains.0.contains.0"
  29. },
  30. {
  31. "className": "doctag",
  32. "begin": "(?:TODO|FIXME|NOTE|BUG|XXX):",
  33. "relevance": 0
  34. }
  35. ]
  36. },
  37. {
  38. "className": "string",
  39. "variants": [
  40. {
  41. "begin": "\"",
  42. "end": "\"",
  43. "illegal": "\\n",
  44. "contains": [
  45. {
  46. "begin": "\\\\[\\s\\S]",
  47. "relevance": 0
  48. }
  49. ]
  50. },
  51. {
  52. "begin": "\"\"\"",
  53. "end": "\"\"\"",
  54. "relevance": 10
  55. },
  56. {
  57. "begin": "[a-z]+\"",
  58. "end": "\"",
  59. "illegal": "\\n",
  60. "contains": [
  61. {
  62. "$ref": "#contains.2.variants.0.contains.0"
  63. },
  64. {
  65. "className": "subst",
  66. "variants": [
  67. {
  68. "begin": "\\$[A-Za-z0-9_]+"
  69. },
  70. {
  71. "begin": "\\${",
  72. "end": "}"
  73. }
  74. ]
  75. }
  76. ]
  77. },
  78. {
  79. "className": "string",
  80. "begin": "[a-z]+\"\"\"",
  81. "end": "\"\"\"",
  82. "contains": [
  83. {
  84. "$ref": "#contains.2.variants.2.contains.1"
  85. }
  86. ],
  87. "relevance": 10
  88. }
  89. ]
  90. },
  91. {
  92. "className": "symbol",
  93. "begin": "'\\w[\\w\\d_]*(?!')"
  94. },
  95. {
  96. "className": "type",
  97. "begin": "\\b[A-Z][A-Za-z0-9_]*",
  98. "relevance": 0
  99. },
  100. {
  101. "className": "function",
  102. "beginKeywords": "def",
  103. "end": "[:={\\[(\\n;]",
  104. "excludeEnd": true,
  105. "contains": [
  106. {
  107. "className": "title",
  108. "begin": "[^0-9\\n\\t \"'(),.`{}\\[\\]:;][^\\n\\t \"'(),.`{}\\[\\]:;]+|[^0-9\\n\\t \"'(),.`{}\\[\\]:;=]",
  109. "relevance": 0
  110. }
  111. ]
  112. },
  113. {
  114. "className": "class",
  115. "beginKeywords": "class object trait type",
  116. "end": "[:={\\[\\n;]",
  117. "excludeEnd": true,
  118. "contains": [
  119. {
  120. "beginKeywords": "extends with",
  121. "relevance": 10
  122. },
  123. {
  124. "begin": "\\[",
  125. "end": "\\]",
  126. "excludeBegin": true,
  127. "excludeEnd": true,
  128. "relevance": 0,
  129. "contains": [
  130. {
  131. "$ref": "#contains.4"
  132. }
  133. ]
  134. },
  135. {
  136. "className": "params",
  137. "begin": "\\(",
  138. "end": "\\)",
  139. "excludeBegin": true,
  140. "excludeEnd": true,
  141. "relevance": 0,
  142. "contains": [
  143. {
  144. "$ref": "#contains.4"
  145. }
  146. ]
  147. },
  148. {
  149. "$ref": "#contains.5.contains.0"
  150. }
  151. ]
  152. },
  153. {
  154. "className": "number",
  155. "begin": "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",
  156. "relevance": 0
  157. },
  158. {
  159. "className": "meta",
  160. "begin": "@[A-Za-z]+"
  161. }
  162. ]
  163. }