Advertisement
Guest User

Untitled

a guest
Mar 5th, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.68 KB | None | 0 0
  1. { "name": "Fortify NST",
  2. "scopeName": "source.nst",
  3. "fileTypes": ["nst"],
  4. "patterns": [
  5. {
  6. "comment": "Line",
  7. "match": "(#source-(line|file|type))\\s+(.*)$",
  8. "captures": {
  9. "1": {"name": "text.html.markdown.gfm meta.block-level.markdown markup.heading.markdown entity.name.section.markdown"},
  10. "2": {"name": "text.html.markdown.gfm meta.block-level.markdown markup.heading.markdown entity.name.section.markdown"},
  11. "3": {"name": "support.type.structural"}
  12. }
  13. },
  14. {
  15. "comment": "Line",
  16. "match": "(#NO-SOURCE-INF.*)\\s+",
  17. "captures": {
  18. "1": {"name": "text.html.markdown.gfm meta.block-level.markdown markup.heading.markdown entity.name.section.markdown"}
  19. }
  20. },
  21. {
  22. "comment": "class",
  23. "match": "(:)(class)(:)",
  24. "captures": {
  25. "1": {"name": "keyword.operator.nst"},
  26. "2": {"name": "storage.type.class.nst"},
  27. "3": {"name": "keyword.operator.nst"}
  28. }
  29. },
  30. {
  31. "comment": "null",
  32. "match": "(:)(null)(:)",
  33. "captures": {
  34. "1": {"name": "keyword.operator.nst"},
  35. "2": {"name": "constant.nst"},
  36. "3": {"name": "keyword.operator.nst"}
  37. }
  38. },
  39. {
  40. "comment": "keywords",
  41. "match": "(:)(abstract|annotation|anytype|boolean|break|byte|char|const|double|else|enum|environment|module|exceptions|extends|extern|false|final|float|goto|if|implements|inline|int|interface|long|NaN|native|new|null|private|protected|public|ref|remote|return|serializable|short|signed|static|strictfp|synchronized|synthetic|throw|transient|true|union|unsigned|virtual|void|volatile|while)(:)",
  42. "captures": {
  43. "1": {"name": "keyword.operator.nst"},
  44. "2": {"name": "support.type.nst"},
  45. "3": {"name": "keyword.operator.nst"}
  46. }
  47. },
  48. {
  49. "comment": "Scopes",
  50. "match": "\\s(~environment|~parent~|~locals~)",
  51. "captures": {
  52. "1": {"name": "variable.other.structural.nst"}
  53. }
  54. },
  55. {
  56. "comment": "sql keywords",
  57. "match": "(:)(sql:varchar|sql:varchar2|sql:number|sql:natural|sql:real|sql:date|sql:binary_integer|sql:cursor|sql:raw|sql:long raw|sql:decimal|sql:blob|sql:clob|sql:nclob|sql:bfile|sql:long|sql:nchar|sql:nvarchar2|sql:timestamp|sql:interval year|sql:interval day|sql:rowid|sql:urowid)(:)",
  58. "captures": {
  59. "1": {"name": "keyword.operator.nst"},
  60. "2": {"name": "support.type.nst"},
  61. "3": {"name": "keyword.operator.nst"}
  62. }
  63. },
  64. {
  65. "comment": "smthg :*: smthg ",
  66. "match": "\\s+([^\\s<]+)\\s+(:)(\\*)(:)\\s+([^\\s>]+)\\s+",
  67. "captures": {
  68. "1": {"name": "variable.other.structural.nst"},
  69. "2": {"name": "keyword.operator.nst"},
  70. "3": {"name": "support.type.nst"},
  71. "4": {"name": "keyword.operator.nst"},
  72. "5": {"name": "variable.other.structural.nst"}
  73. }
  74. },
  75. {
  76. "comment": "[ test078~module ]",
  77. "match": "(\\[)\\s+([^\\s]+)\\s+(\\])",
  78. "captures": {
  79. "1": {"name": "support.type.nst"},
  80. "2": {"name": "variable.other.structural.nst"},
  81. "3": {"name": "support.type.nst"}
  82. }
  83. },
  84. {
  85. "comment": "< str :*: >",
  86. "match": "(<)\\s+([^\\s]+)\\s+(:)(\\*)(:)\\s+(>)",
  87. "captures": {
  88. "1": {"name": "support.type.nst"},
  89. "2": {"name": "variable.other.structural.nst"},
  90. "3": {"name": "keyword.operator.nst"},
  91. "4": {"name": "support.type.nst"},
  92. "5": {"name": "keyword.operator.nst"},
  93. "6": {"name": "support.type.nst"}
  94. }
  95. },
  96. {
  97. "comment": "< test078~module >",
  98. "match": "(<)\\s+([^\\s]+)\\s+(>)",
  99. "captures": {
  100. "1": {"name": "support.type.nst"},
  101. "2": {"name": "variable.other.structural.nst"},
  102. "3": {"name": "support.type.nst"}
  103. }
  104. },
  105. {
  106. "comment": "( #0# ~PythonGlobalsVar )",
  107. "match": "(\\()\\s+(#\\d+#)\\s+([^\\s]+)\\s+(\\))",
  108. "captures": {
  109. "1": {"name": "support.type.nst"},
  110. "2": {"name": "variable.other.structural.nst"},
  111. "3": {"name": "variable.other.structural.nst"},
  112. "4": {"name": "support.type.nst"}
  113. }
  114. },
  115. {
  116. "comment": "operand",
  117. "match": "(:)(\\.|>|<|!|~|==|<=|>=|!=|=|is|\\+\\+|--|\\+|-|&\\*|\\*|/|&|\\||\\^|%|<<|>>|>>>|`)(:)",
  118. "captures": {
  119. "1": {"name": "keyword.operator.nst"},
  120. "2": {"name": "support.type.nst"},
  121. "3": {"name": "keyword.operator.nst"}
  122. }
  123. },
  124. {
  125. "comment": "column",
  126. "match": "(#)(\\d+)(#)",
  127. "captures": {
  128. "1": {"name": "variable.other.structural.nst"},
  129. "2": {"name": "variable.other.structural.nst"},
  130. "3": {"name": "variable.other.structural.nst"}
  131. }
  132. },
  133. {
  134. "comment": "temp variables",
  135. "match": "(~t~(res~)?\\d+)",
  136. "captures": {
  137. "1": {"name": "variable.other.structural.nst"}
  138. }
  139. },
  140. {
  141. "comment": "string literal",
  142. "match": "(\".*?\")",
  143. "captures": {
  144. "1": {"name": "string.quoted.double.single-line.nst"}
  145. }
  146. },
  147. {
  148. "comment": "string literal",
  149. "match": "('.*?')",
  150. "captures": {
  151. "1": {"name": "string.quoted.double.single-line.nst"}
  152. }
  153. },
  154. {
  155. "comment": "burgers",
  156. "match": "(\\(\\))",
  157. "captures": {
  158. "1": {"name": "support.type.nst"}
  159. }
  160. },
  161. {
  162. "comment": "exceptions",
  163. "match": "(__(try|eh|catch|finally__.*)__\\d+)",
  164. "captures": {
  165. "1": {"name": "variable.other.structural.nst"},
  166. "2": {"name": "variable.other.structural.nst"}
  167. }
  168. },
  169. {
  170. "comment": "function call",
  171. "match": "(-(~|-)?>)\\s+([a-zA-Z-_~0-9.]*)\\s*(\\()",
  172. "captures": {
  173. "1": {"name": "meta.function-call.nst"},
  174. "2": {"name": "meta.function-call.nst"},
  175. "3": {"name": "meta.function-call.nst"},
  176. "4": {"name": "keyword.operator.nst"}
  177. }
  178. },
  179. {
  180. "comment": "special function call",
  181. "match": "~function\\s+(\\()",
  182. "captures": {
  183. "1": {"name": "support.type.nst"}
  184. }
  185. },
  186. {
  187. "comment": "function call end",
  188. "match": "(\\))\\s+;",
  189. "captures": {
  190. "1": {"name": "keyword.operator.nst"}
  191. }
  192. },
  193. {
  194. "comment": "colon",
  195. "match": "(\\{|\\}|,|:)",
  196. "captures": {
  197. "1": {"name": "keyword.operator.nst"}
  198. }
  199. },
  200. {
  201. "comment": "brackets",
  202. "match": "(\\(|\\)|\\[|\\]|>|<)",
  203. "captures": {
  204. "1": {"name": "support.type.nst"}
  205. }
  206. }
  207.  
  208.  
  209. ],
  210. "uuid": "0c84615b-ed7c-4fcd-827d-8a4fde83053c"
  211. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement