ecal.tmLanguage.json 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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.let.ecal",
  27. "match": "\\b(let)\\b"
  28. },
  29. {
  30. "name": "keyword.control.sink.ecal",
  31. "match": "\\b(sink|kindmatch|scopematch|statematch|priority|suppresses)\\b"
  32. },
  33. {
  34. "name": "keyword.control.function.ecal",
  35. "match": "\\b(func|return)\\b"
  36. },
  37. {
  38. "name": "keyword.operator.boolean.ecal",
  39. "match": "\\b(and|or|not)\\b"
  40. },
  41. {
  42. "name": "keyword.operator.string.ecal",
  43. "match": "\\b(like|hasprefix|hassuffic)\\b"
  44. },
  45. {
  46. "name": "keyword.operator.list.ecal",
  47. "match": "\\b(in|notin)\\b"
  48. },
  49. {
  50. "name": "constant.language.terminals.ecal",
  51. "match": "\\b(false|true|null)\\b"
  52. },
  53. {
  54. "name": "keyword.control.conditional.ecal",
  55. "match": "\\b(if|elif|else)\\b"
  56. },
  57. {
  58. "name": "keyword.control.loop.ecal",
  59. "match": "\\b(for|break|continue)\\b"
  60. },
  61. {
  62. "name": "keyword.control.try.ecal",
  63. "match": "\\b(try|except|otherwise|finally)\\b"
  64. }
  65. ]
  66. },
  67. "identifiers": {
  68. "patterns": [
  69. {
  70. "match": "([a-zA-Z]+)\\(",
  71. "captures": {
  72. "1": {
  73. "name": "entity.name.function.ecal"
  74. }
  75. }
  76. },
  77. {
  78. "match": "([a-zA-Z]+) :?=",
  79. "captures": {
  80. "1": {
  81. "name": "storage.type.var.ecal"
  82. }
  83. }
  84. }
  85. ]
  86. },
  87. "strings": {
  88. "patterns": [
  89. {
  90. "name": "string.quoted.double.ecal",
  91. "begin": "r?\"",
  92. "end": "\"",
  93. "patterns": [
  94. {
  95. "include": "#escapes"
  96. }
  97. ]
  98. },
  99. {
  100. "name": "string.quoted.single.ecal",
  101. "begin": "r?'",
  102. "end": "'",
  103. "patterns": [
  104. {
  105. "include": "#escapes"
  106. }
  107. ]
  108. }
  109. ],
  110. "repository": {
  111. "escapes": {
  112. "patterns": [
  113. {
  114. "name": "constant.character.escape.ecal",
  115. "match": "\\\\."
  116. },
  117. {
  118. "name": "constant.character.escape.ecal",
  119. "begin": "{{",
  120. "end": "}}"
  121. }
  122. ]
  123. }
  124. }
  125. },
  126. "comments": {
  127. "patterns": [
  128. {
  129. "name": "comment.block.ecal",
  130. "begin": "/\\*",
  131. "end": "\\*/"
  132. },
  133. {
  134. "name": "comment.line.ecal",
  135. "begin": "#",
  136. "end": "\\n"
  137. }
  138. ]
  139. }
  140. },
  141. "scopeName": "source.ecal"
  142. }