ecal.tmLanguage.json 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. "include": "#identifiers"
  9. }, {
  10. "include": "#strings"
  11. }, {
  12. "include": "#comments"
  13. }
  14. ],
  15. "repository": {
  16. "keywords": {
  17. "patterns": [{
  18. "name": "keyword.control.import.ecal",
  19. "match": "\\b(import|as)\\b"
  20. }, {
  21. "name": "keyword.control.sink.ecal",
  22. "match": "\\b(sink|kindmatch|scopematch|statematch|priority|suppresses)\\b"
  23. }, {
  24. "name": "keyword.control.function.ecal",
  25. "match": "\\b(func|return)\\b"
  26. }, {
  27. "name": "keyword.operator.boolean.ecal",
  28. "match": "\\b(and|or|not)\\b"
  29. }, {
  30. "name": "keyword.operator.string.ecal",
  31. "match": "\\b(like|hasprefix|hassuffic)\\b"
  32. }, {
  33. "name": "keyword.operator.list.ecal",
  34. "match": "\\b(in|notin)\\b"
  35. }, {
  36. "name": "constant.language.terminals.ecal",
  37. "match": "\\b(false|true|null)\\b"
  38. }, {
  39. "name": "keyword.control.conditional.ecal",
  40. "match": "\\b(if|elif|else)\\b"
  41. }, {
  42. "name": "keyword.control.loop.ecal",
  43. "match": "\\b(for|break|continue)\\b"
  44. }, {
  45. "name": "keyword.control.try.ecal",
  46. "match": "\\b(try|except|finally)\\b"
  47. }]
  48. },
  49. "identifiers": {
  50. "patterns": [{
  51. "match": "([a-zA-Z]+)\\(",
  52. "captures": {
  53. "1": {
  54. "name": "entity.name.function.ecal"
  55. }
  56. }
  57. }, {
  58. "match": "([a-zA-Z]+) :?=",
  59. "captures": {
  60. "1": {
  61. "name": "storage.type.var.ecal"
  62. }
  63. }
  64. }]
  65. },
  66. "strings": {
  67. "patterns": [{
  68. "name": "string.quoted.double.ecal",
  69. "begin": "r?\"",
  70. "end": "\"",
  71. "patterns": [{
  72. "include" : "#escapes"
  73. }]
  74. }, {
  75. "name": "string.quoted.single.ecal",
  76. "begin": "r?'",
  77. "end": "'",
  78. "patterns": [{
  79. "include" : "#escapes"
  80. }]
  81. }],
  82. "repository" : {
  83. "escapes" : {
  84. "patterns": [
  85. {
  86. "name": "constant.character.escape.ecal",
  87. "match": "\\\\."
  88. }, {
  89. "name": "constant.character.escape.ecal",
  90. "begin": "{{",
  91. "end": "}}"
  92. }
  93. ]
  94. }
  95. }
  96. },
  97. "comments": {
  98. "patterns": [
  99. {
  100. "name": "comment.block.ecal",
  101. "begin": "/\\*",
  102. "end": "\\*/"
  103. },
  104. {
  105. "name": "comment.line.ecal",
  106. "begin": "#",
  107. "end": "\\n"
  108. }
  109. ]
  110. }
  111. },
  112. "scopeName": "source.ecal"
  113. }