Guest User

Untitled

a guest
Feb 19th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.45 KB | None | 0 0
  1. { scopeName = 'source.regexp.oniguruma';
  2. comment = "Matches Oniguruma's Ruby regexp syntax (TextMate uses Oniguruma in Ruby mode).";
  3. fileTypes = ( 're' );
  4. foldingStartMarker = '(/\*|\{|\()';
  5. foldingStopMarker = '(\*/|\}|\))';
  6. patterns = (
  7. { name = 'keyword.control.anchor.regexp';
  8. match = '\\[bBAZzG]|\^|\$';
  9. },
  10. { name = 'constant.character.numeric.regexp';
  11. match = '\\([0-7]{3}|\\x(\h\h|\{\h{,8}\}))';
  12. },
  13. { name = 'keyword.other.back-reference.regexp';
  14. match = '\\[1-9]\d*';
  15. },
  16. { name = 'keyword.other.back-reference.named.regexp';
  17. match = '(\\k\<)[a-z]\w*(\>)';
  18. captures =
  19. { 1 = { name = 'keyword.other.back-reference.named.regexp'; };
  20. 2 = { name = 'entity.name.back-reference'; };
  21. 3 = { name = 'keyword.other.back-reference.named.regexp'; };
  22. };
  23. },
  24. { name = 'constant.other.character-class.posix.regexp';
  25. match = '\[\:(\^)?(alnum|alpha|ascii|blank|cntrl|x?digit|graph|lower|print|punct|space|upper)\]';
  26. },
  27. { name = 'keyword.operator.quantifier.regexp';
  28. match = '[?+*][?+]?|\{(\d+,\d+|\d+,|,\d+|\d+)\}\??';
  29. },
  30. { name = 'keyword.operator.or.regexp';
  31. match = '\|';
  32. },
  33. { name = 'comment.block.regexp';
  34. begin = '\(\?\#';
  35. end = '\)';
  36. },
  37. { name = 'keyword.other.option-toggle.regexp';
  38. match = '\(\?[imx-]+\)';
  39. },
  40. { name = 'meta.group.assertion.regexp';
  41. begin = '(\()((\?=)|(\?!)|(\?<=)|(\?<!))';
  42. end = '(\))';
  43. beginCaptures =
  44. { 1 = { name = 'keyword.control.group.regexp'; };
  45. 3 = { name = 'meta.assertion.look-ahead.regexp'; };
  46. 4 = { name = 'meta.assertion.negative-look-ahead.regexp'; };
  47. 5 = { name = 'meta.assertion.look-behind.regexp'; };
  48. 6 = { name = 'meta.assertion.negative-look-behind.regexp'; };
  49. };
  50. endCaptures = { 1 = { name = 'keyword.control.group.regexp'; }; };
  51. patterns = ( { include = '$self'; } );
  52. },
  53. { name = 'meta.group.regexp';
  54. begin = '(\()((\?(>|[imx-]*:))|(\?<)([a-z]\w*)(>))?';
  55. end = '(\))';
  56. beginCaptures =
  57. { 1 = { name = 'keyword.control.group.regexp'; };
  58. 3 = { name = 'keyword.other.group-options.regexp'; };
  59. 5 = { name = 'keyword.other.group-options.regexp'; };
  60. 6 = { name = 'entity.name.group.regexp'; };
  61. 7 = { name = 'keyword.other.group-options.regexp'; };
  62. };
  63. endCaptures = { 1 = { name = 'keyword.control.group.regexp'; }; };
  64. patterns = ( { include = '$self'; } );
  65. },
  66. { include = '#character-class'; },
  67. );
  68. repository = { character-class = { patterns = (
  69. { name = 'constant.character.character-class.regexp';
  70. match = '\\[wWsSdDhH]|\.';
  71. },
  72. { name = 'constant.character.escape.backslash.regexp';
  73. match = '\\.';
  74. },
  75. { name = 'constant.other.character-class.set.regexp';
  76. begin = '(\[)(\^)?';
  77. end = '(\])';
  78. beginCaptures =
  79. { 1 = { name = 'keyword.control.character-class.regexp'; };
  80. 2 = { name = 'keyword.operator.negation.regexp'; };
  81. };
  82. endCaptures = { 1 = { name = 'keyword.control.character-class.regexp'; }; };
  83. patterns = (
  84. { name = 'constant.other.character-class.range.regexp';
  85. match = '(.|(\\.))\-([^\]]|(\\.))';
  86. captures =
  87. { 2 = { name = 'constant.character.escape.backslash.regexp'; };
  88. 4 = { name = 'constant.character.escape.backslash.regexp'; };
  89. };
  90. },
  91. { name = 'keyword.operator.intersection.regexp';
  92. match = '&&';
  93. },
  94. { include = '#character-class'; },
  95. );
  96. },
  97. );
  98. };
  99. };
  100. }
Add Comment
Please, Sign In to add comment