ecal.tmLanguage.json 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. {
  2. "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
  3. "name": "Event Condition Action Language",
  4. "patterns": [
  5. {
  6. "include": "#keywords"
  7. },
  8. {
  9. "include": "#identifiers"
  10. },
  11. {
  12. "include": "#strings"
  13. },
  14. {
  15. "include": "#comments"
  16. }
  17. ],
  18. "repository": {
  19. "keywords": {
  20. "patterns": [
  21. {
  22. "name": "keyword.control.import.ecal",
  23. "match": "\\b(import|as)\\b"
  24. },
  25. {
  26. "name": "keyword.control.sink.ecal",
  27. "match": "\\b(sink|kindmatch|scopematch|statematch|priority|suppresses)\\b"
  28. },
  29. {
  30. "name": "keyword.control.function.ecal",
  31. "match": "\\b(func|return)\\b"
  32. },
  33. {
  34. "name": "keyword.operator.boolean.ecal",
  35. "match": "\\b(and|or|not)\\b"
  36. },
  37. {
  38. "name": "keyword.operator.string.ecal",
  39. "match": "\\b(like|hasprefix|hassuffic)\\b"
  40. },
  41. {
  42. "name": "keyword.operator.list.ecal",
  43. "match": "\\b(in|notin)\\b"
  44. },
  45. {
  46. "name": "constant.language.terminals.ecal",
  47. "match": "\\b(false|true|null)\\b"
  48. },
  49. {
  50. "name": "keyword.control.conditional.ecal",
  51. "match": "\\b(if|elif|else)\\b"
  52. },
  53. {
  54. "name": "keyword.control.loop.ecal",
  55. "match": "\\b(for|break|continue)\\b"
  56. },
  57. {
  58. "name": "keyword.control.try.ecal",
  59. "match": "\\b(try|except|finally)\\b"
  60. }
  61. ]
  62. },
  63. "identifiers": {
  64. "patterns": [
  65. {
  66. "match": "([a-zA-Z]+)\\(",
  67. "captures": {
  68. "1": {
  69. "name": "entity.name.function.ecal"
  70. }
  71. }
  72. },
  73. {
  74. "match": "([a-zA-Z]+) :?=",
  75. "captures": {
  76. "1": {
  77. "name": "storage.type.var.ecal"
  78. }
  79. }
  80. }
  81. ]
  82. },
  83. "strings": {
  84. "patterns": [
  85. {
  86. "name": "string.quoted.double.ecal",
  87. "begin": "r?\"",
  88. "end": "\"",
  89. "patterns": [
  90. {
  91. "include": "#escapes"
  92. }
  93. ]
  94. },
  95. {
  96. "name": "string.quoted.single.ecal",
  97. "begin": "r?'",
  98. "end": "'",
  99. "patterns": [
  100. {
  101. "include": "#escapes"
  102. }
  103. ]
  104. }
  105. ],
  106. "repository": {
  107. "escapes": {
  108. "patterns": [
  109. {
  110. "name": "constant.character.escape.ecal",
  111. "match": "\\\\."
  112. },
  113. {
  114. "name": "constant.character.escape.ecal",
  115. "begin": "{{",
  116. "end": "}}"
  117. }
  118. ]
  119. }
  120. }
  121. },
  122. "comments": {
  123. "patterns": [
  124. {
  125. "name": "comment.block.ecal",
  126. "begin": "/\\*",
  127. "end": "\\*/"
  128. },
  129. {
  130. "name": "comment.line.ecal",
  131. "begin": "#",
  132. "end": "\\n"
  133. }
  134. ]
  135. }
  136. },
  137. "scopeName": "source.ecal"
  138. }