1
0

QSP.tmLanguage.json 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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.doubleexclamation.qsp",
  54. "begin": "!!{",
  55. "end": "}$"
  56. },
  57. {
  58. "name": "comment.block.exclamation.qsp",
  59. "begin": "!{",
  60. "end": "}$"
  61. },
  62. {
  63. "name": "comment.line.doubleexclamation.qsp",
  64. "begin": "!!",
  65. "end": "$"
  66. },
  67. {
  68. "name": "comment.line.exclamation.qsp",
  69. "begin": "^!",
  70. "end": "$"
  71. },
  72. {
  73. "name": "comment.line.exclamation.qsp",
  74. "begin": "^\\s+!.*",
  75. "end": "$"
  76. },
  77. {
  78. "folds": [
  79. {
  80. "type": "comment"
  81. },
  82. {
  83. "type": "if_statement",
  84. "start": {
  85. "type": [
  86. "elif_clause",
  87. "else_clause"
  88. ]
  89. },
  90. "end": "end"
  91. }
  92. ]
  93. }
  94. ],
  95. "repository": {
  96. "strings": {
  97. "name": "string.quoted.double.qsp",
  98. "begin": "\"",
  99. "end": "\"",
  100. "patterns": [
  101. {
  102. "name": "string.interpolated.qsp",
  103. "begin": "<<",
  104. "end": ">>",
  105. "patterns": [
  106. {
  107. "include": "$self"
  108. }
  109. ]
  110. }
  111. ],
  112. "name": "string.quoted.single.qsp",
  113. "begin": "'",
  114. "end": "'",
  115. "patterns": [
  116. {
  117. "name": "string.interpolated.qsp",
  118. "begin": "<<",
  119. "end": ">>",
  120. "patterns": [
  121. {
  122. "include": "$self"
  123. }
  124. ]
  125. }
  126. ]
  127. }
  128. },
  129. "scopeName": "scope.qsp"
  130. }