QSP.tmLanguage.json 2.9 KB

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