QSP.tmLanguage.json 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. {
  2. "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
  3. "name": "QSP",
  4. "patterns": [
  5. {
  6. "include": "#strings"
  7. },
  8. {
  9. "name": "entity.other.attribute-name.qsp",
  10. "match": "^(:)[^'\"]*$\n?"
  11. },
  12. {
  13. "name": "variable.parameter.url.qsp",
  14. "match": "^-{1,2}\\S.*?\\S-{1,2}$"
  15. },
  16. {
  17. "name": "constant.character.qsp",
  18. "match": "^(#)\\s?.+$"
  19. },
  20. {
  21. "name": "constant.character.qsp",
  22. "match": "\\b\\d+\\b"
  23. },
  24. {
  25. "name": "variable.parameter.url.qsp",
  26. "match": "\\b(?i:([$]dyneval|[$]user_text|[$]usrtxt|[$]maintxt|[$]stattxt|[$]func|[$]curloc|[$]selobj|[$]selact|[$]curact|[$]getobj|[$]mid|[$](u|l)case|[$]trim|[$]replace|[$]str|[$]loc|[$]strfind))\\b"
  27. },
  28. {
  29. "name": "variable.parameter.url.qsp",
  30. "match": "\\b(?i:(dyneval|input|user_text|usrtxt|iif|rgb|isplay|msecscount|desc|maintxt|stattxt|qspver|func|curloc|selobj|no|and|mod|selact|curact|arrsize|arrpos|countobj|getobj|led|mid|(u|l)case|trim|replace|instr|isnum|val|str|loc|or|max|min|r(a)?nd|(arr|str)comp|str(find|pos)))\\b"
  31. },
  32. {
  33. "name": "keyword.control.qsp",
  34. "match": "\\b[$](?i:(counter|ongload|ongsave|onnewloc|onactsel|onobjsel|onobjadd|onobjdel|usercom|fname|backimage|args|result))\\b"
  35. },
  36. {
  37. "name": "keyword.control.qsp",
  38. "match": "\\b(?i:(counter|ongload|ongsave|onnewloc|onactsel|onobjsel|onobjadd|onobjdel|usercom|fname|backimage|args|result))\\b"
  39. },
  40. {
  41. "name": "keyword.control.qsp",
  42. "match": "\\b(?i:(nosave|disablescroll|disablesubex|debug|usehtml|(b|f|l)color|fsize))\\b"
  43. },
  44. {
  45. "name": "support.function.qsp",
  46. "match": "\\b(?i:(act|exit|killvar|cla|\\*?clr|\\*?clear|gs|xgt|gt|goto|gosub|\\[|\\]|xgoto|if|else|elseif|end|jump|\\*|&|\\*?(n|p)l))\\b"
  47. },
  48. {
  49. "name": "support.function.qsp",
  50. "match": "(?i:(,|\\[|\\]|\\(|\\)|\\{|\\}|&|\\+|=|-|(<|>)=?|=?(<|>)))"
  51. },
  52. {
  53. "name": "comment.block.exclamation.qsp",
  54. "begin": "!{",
  55. "end": "}!$"
  56. },
  57. {
  58. "name": "comment.line.exclamation.qsp",
  59. "begin": "^!.*",
  60. "end": "$"
  61. },
  62. {
  63. "name": "comment.line.exclamation.qsp",
  64. "begin": "^\\s+!.*",
  65. "end": "$"
  66. },
  67. {
  68. "folds": [
  69. {
  70. "type": "comment"
  71. },
  72. {
  73. "type": "if_statement",
  74. "start": {
  75. "type": [
  76. "elif_clause",
  77. "else_clause"
  78. ]
  79. },
  80. "end": "end"
  81. }
  82. ]
  83. }
  84. ],
  85. "repository": {
  86. "strings": {
  87. "name": "string.quoted.double.qsp",
  88. "begin": "\"",
  89. "end": "\"",
  90. "patterns": [
  91. {
  92. "name": "string.interpolated.qsp",
  93. "begin": "<<",
  94. "end": ">>",
  95. "patterns": [
  96. {
  97. "include": "$self"
  98. }
  99. ]
  100. }
  101. ],
  102. "name": "string.quoted.single.qsp",
  103. "begin": "'",
  104. "end": "'",
  105. "patterns": [
  106. {
  107. "name": "string.interpolated.qsp",
  108. "begin": "<<",
  109. "end": ">>",
  110. "patterns": [
  111. {
  112. "include": "$self"
  113. }
  114. ]
  115. }
  116. ]
  117. }
  118. },
  119. "scopeName": "scope.qsp"
  120. }