Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { scopeName = 'source.plist.language-definition.test';
- firstLineMatch = '^\{(\s*[a-zA-Z])?$';
- foldingStartMarker = '(\{|\()';
- foldingStopMarker = '(\}|\))';
- patterns = (
- { begin = '(\{)';
- end = '(\})';
- captures = { 1 = { name = 'keyword.operator.dictionary.tm-language-def'; }; };
- patterns = (
- { include = '#comment'; },
- { comment = 'scopeName';
- name = 'meta.rule.tm-language-def';
- begin = '\b(scopeName)\s*(=)';
- end = '(;)';
- beginCaptures =
- { 1 = { name = 'support.constant.tm-language-def'; };
- 2 = { name = 'keyword.operator.dictionary.tm-language-def'; };
- };
- endCaptures = { 1 = { name = 'keyword.operator.dictionary.tm-language-def'; }; };
- patterns = (
- { include = '#scope-name'; },
- { include = '#comment'; },
- { include = '#catch-all'; },
- );
- },
- { comment = 'fileTypes';
- begin = '\b(fileTypes)\s*(=)';
- end = '(;)';
- beginCaptures =
- { 1 = { name = 'support.constant.tm-language-def'; };
- 2 = { name = 'keyword.operator.dictionary.tm-language-def'; };
- };
- endCaptures = { 1 = { name = 'keyword.operator.dictionary.tm-language-def'; }; };
- patterns = (
- { begin = '(\()';
- end = '(\))';
- captures = { 1 = { name = 'keyword.operator.array.tm-language-def'; }; };
- patterns = (
- { include = '#comment'; },
- { begin = '(?=[^\s,])';
- end = '(,)|(?=\))';
- endCaptures = { 1 = { name = 'keyword.operator.array-separator.tm-language-def'; }; };
- patterns = (
- { match = '\s+(?=//|/\*)'; },
- { include = '#comment'; },
- { name = 'invalid.illegal.missing-comma.tm-language-def';
- begin = '[[^\n]&&\s](?!\s*(,|\)|$)).*';
- end = '^(?=not)possible$';
- },
- { include = '#string'; },
- );
- },
- { include = '#catch-all'; },
- );
- }
- );
- },
- { comment = 'firstLineMatch, foldingStartMarker, foldingStopMarker';
- begin = '\b(firstLineMatch|folding(Start|Stop)Marker)\s*(=)';
- end = '(;)';
- beginCaptures =
- { 1 = { name = 'support.constant.tm-language-def'; };
- 3 = { name = 'keyword.operator.dictionary.tm-language-def'; };
- };
- endCaptures = { 1 = { name = 'keyword.operator.dictionary.tm-language-def'; }; };
- patterns = (
- { include = '#regexp'; },
- { include = '#comment'; },
- { include = '#catch-all'; },
- );
- },
- { include = '#patterns'; },
- { comment = 'repository';
- begin = '\b(repository)\s*(=)';
- end = '(;)';
- beginCaptures =
- { 1 = { name = 'support.constant.tm-language-def'; };
- 2 = { name = 'keyword.operator.dictionary.tm-language-def'; };
- };
- endCaptures = { 1 = { name = 'keyword.operator.dictionary.tm-language-def'; }; };
- patterns = (
- { begin = '(\{)';
- end = '(\})';
- captures = { 1 = { name = 'keyword.operator.dictionary.tm-language-def'; }; };
- patterns = (
- { begin = '(["'']?)([a-z][a-z0-9\-]+)\1\s*(=)';
- end = '(;)';
- beginCaptures =
- { 2 = { name = 'entity.name.repository.tm-language-def'; };
- 3 = { name = 'keyword.operator.dictionary.tm-language-def'; };
- };
- endCaptures = { 1 = { name = 'keyword.operator.dictionary.tm-language-def'; }; };
- patterns = (
- { include = '#rule';},
- { include = '#comment'; },
- { include = '#catch-all'; },
- );
- },
- { include = '#string'; },
- { include = '#comment'; },
- { begin = '(=)';
- end = '(;)';
- captures = { 1 = { name = 'keyword.operator.dictionary.tm-language-def'; }; };
- patterns = ( { include = '#any'; } );
- },
- { name = 'keyword.operator.dictionary.tm-language-def';
- match = ';';
- },
- { include = '#catch-all'; },
- );
- }
- );
- },
- { include = '#comment-keyword'; },
- { include = '#invalid-keyword'; },
- { include = '#string'; },
- { begin = '(=)';
- end = '(;)';
- captures = { 1 = { name = 'keyword.operator.dictionary.tm-language-def'; }; };
- patterns = ( { include = '#any'; } );
- },
- { name = 'keyword.operator.dictionary.tm-language-def';
- match = ';';
- },
- { include = '#catch-all'; },
- );
- }
- );
- repository =
- { comment = { patterns = (
- { name = 'comment.block.tm-language-def';
- begin = '/\*';
- end = '\*/';
- },
- { name = 'comment.line.double-slash.tm-language-def';
- match = '//.*$\n?';
- },
- );
- };
- patterns =
- { begin = '\b(patterns)\s*(=)';
- end = '(;)';
- beginCaptures =
- { 1 = { name = 'support.constant.tm-language-def'; };
- 2 = { name = 'keyword.operator.dictionary.tm-language-def'; };
- };
- endCaptures = { 1 = { name = 'keyword.operator.dictionary.tm-language-def'; }; };
- patterns = (
- { begin = '(\()';
- end = '(\))';
- captures = { 1 = { name = 'keyword.operator.array.tm-language-def'; }; };
- patterns = (
- { include = '#comment'; },
- { begin = '(?=[^\s,])';
- end = '(,)|(?=\))';
- endCaptures = { 1 = { name = 'keyword.operator.array-separator.tm-language-def'; }; };
- patterns = (
- { match = '\s+(?=//|/\*)'; },
- { include = '#comment'; },
- { name = 'invalid.illegal.missing-comma.tm-language-def';
- begin = '[[^\n]&&\s](?!\s*(,|\)|$)).*';
- end = '^(?=not)possible$';
- },
- { include = '#rule'; },
- );
- },
- { include = '#catch-all'; },
- );
- }
- );
- };
- any = { patterns = (
- { include = '#string'; },
- { include = '#array'; },
- { include = '#dictionary'; },
- { include = '#data'; },
- { include = '#comment'; },
- { include = '#catch-all'; },
- );
- };
- array =
- { begin = '(\()';
- end = '(\))';
- captures = { 1 = { name = 'keyword.operator.array.tm-language-def'; }; };
- patterns = (
- { include = '#comment'; },
- { begin = '(?=[^\s,])';
- end = '(,)|(?=\))';
- endCaptures = { 1 = { name = 'keyword.operator.array-separator.tm-language-def'; }; };
- patterns = (
- { match = '\s+(?=//|/\*)'; },
- { include = '#comment'; },
- { name = 'invalid.illegal.missing-comma.tm-language-def';
- begin = '[[^\n]&&\s](?!\s*(,|\)|$)).*';
- end = '^(?=not)possible$';
- },
- { include = '#any'; },
- );
- },
- { include = '#catch-all'; },
- );
- };
- catch-all = { patterns = (
- { match = '\s+'; },
- { name = 'invalid.illegal.unrecognized-character.tm-language-def';
- match = '.';
- },
- );
- };
- comment-keyword =
- { begin = '\b(comment)\s*(=)';
- end = '(;)';
- beginCaptures =
- { 1 = { name = 'support.constant.tm-language-def'; };
- 2 = { name = 'keyword.operator.dictionary.tm-language-def'; };
- };
- endCaptures = { 1 = { name = 'keyword.operator.dictionary.tm-language-def'; }; };
- patterns = (
- { name = 'string.quoted.single.tm-language-def';
- begin = "'";
- end = "'";
- contentName = 'comment.block.string.tm-language-def';
- },
- { name = 'string.quoted.double.tm-language-def';
- begin = '"';
- end = '"';
- contentName = 'comment.block.string.tm-language-def';
- },
- { include = '#comment'; },
- { include = '#catch-all'; },
- );
- };
- dictionary =
- { begin = '(\{)';
- end = '(\})';
- captures = { 1 = { name = 'keyword.operator.dictionary.tm-language-def'; }; };
- patterns = (
- { include = '#string'; },
- { include = '#comment'; },
- { begin = '(=)';
- end = '(;)';
- captures = { 1 = { name = 'keyword.operator.dictionary.tm-language-def'; }; };
- patterns = ( { include = '#any'; } );
- },
- { name = 'keyword.operator.dictionary.tm-language-def';
- match = ';';
- },
- { include = '#catch-all'; },
- );
- };
- invalid-keyword = { patterns = (
- { name = 'invalid.illegal.misplaced-keyword.tm-language-def';
- match = '\b(fileTypes|foldingStartMarker|foldingStopMarker|patterns|match|begin|end|include|scopeName|captures|beginCaptures|endCaptures|firstLineMatch|comment|repository|disabled|contentName|applyEndPatternLast)\b';
- },
- { name = 'invalid.illegal.deprecated-keyword.tm-language-def';
- match = '\b(swallow|foregroundColor|backgroundColor|fontStyle|elementForegroundColor|elementBackgroundColor|elementFontStyle|mode|highlightPairs|smartTypingPairs|increaseIndentPattern)\b';
- },
- { name = 'invalid.illegal.unknown-keyword.tm-language-def';
- match = '[-a-zA-Z_.]+(?=\s*=)';
- },
- );
- };
- regexp = { patterns = (
- { name = 'string.quoted.single.tm-language-def';
- begin = "'";
- end = "'";
- patterns = ( { include = 'source.regexp.oniguruma'; } );
- contentName = 'source.regexp.oniguruma.embedded.tm-language-def';
- },
- { name = 'string.quoted.double.tm-language-def';
- begin = '"';
- end = '"';
- patterns = ( { include = 'source.regexp.oniguruma'; } );
- contentName = 'source.regexp.oniguruma.embedded.tm-language-def';
- },
- );
- };
- rule = {
- begin = '(\{)';
- end = '(\})';
- captures = { 1 = { name = 'keyword.operator.dictionary.tm-language-def'; }; };
- patterns = (
- { include = '#comment'; },
- { comment = 'name, contentName';
- name = 'meta.rule.tm-language-def';
- begin = '\b((contentN|n)ame)\s*(=)';
- end = '(;)';
- beginCaptures =
- { 1 = { name = 'support.constant.tm-language-def'; };
- 3 = { name = 'keyword.operator.dictionary.tm-language-def'; };
- };
- endCaptures = { 1 = { name = 'keyword.operator.dictionary.tm-language-def'; }; };
- patterns = (
- { include = '#scope-name'; },
- { include = '#comment'; },
- { include = '#catch-all'; },
- );
- },
- { comment = 'begin, end, match';
- begin = '\b(begin|end|match)\s*(=)';
- end = '(;)';
- beginCaptures =
- { 1 = { name = 'support.constant.tm-language-def'; };
- 2 = { name = 'keyword.operator.dictionary.tm-language-def'; };
- };
- endCaptures = { 1 = { name = 'keyword.operator.dictionary.tm-language-def'; }; };
- patterns = (
- { include = '#regexp'; },
- { include = '#comment'; },
- { include = '#catch-all'; },
- );
- },
- { comment = 'include';
- begin = '\b(include)\s*(=)';
- end = '(;)';
- beginCaptures =
- { 1 = { name = 'support.constant.tm-language-def'; };
- 2 = { name = 'keyword.operator.dictionary.tm-language-def'; };
- };
- endCaptures = { 1 = { name = 'keyword.operator.dictionary.tm-language-def'; }; };
- patterns = (
- { include = '#string'; },
- { include = '#comment'; },
- { include = '#catch-all'; },
- );
- },
- { comment = ;},
- { include = '#patterns'; },
- { include = '#comment-keyword';},
- { include = '#invalid-keyword';},
- { include = '#string'; },
- { begin = '(=)';
- end = '(;)';
- captures = { 1 = { name = 'keyword.operator.dictionary.tm-language-def'; }; };
- patterns = ( { include = '#any'; } );
- },
- { name = 'keyword.operator.dictionary.tm-language-def';
- match = ';';
- },
- { include = '#catch-all'; },
- );
- };
- scope-name = { patterns = (
- { name = 'string.quoted.single.tm-language-def';
- match = "'([a-z][a-z0-9.\-]+)'";
- captures = { 1 = { name = 'entity.name.scope.tm-language-def'; }; };
- },
- { name = 'string.quoted.double.tm-language-def';
- match = '"([a-z][a-z0-9.\-]+)"';
- captures = { 1 = { name = 'entity.name.scope.tm-language-def'; }; };
- },
- );
- };
- string = { patterns = (
- { name = 'constant.numeric.tm-language-def';
- match = '\b[0-9]+\b';
- },
- { name = 'string.unquoted.tm-language-def';
- match = '[-a-zA-Z0-9_.]+';
- },
- { name = 'string.quoted.single.tm-language-def';
- begin = "'";
- end = "'";
- patterns = ( { include = '#string-constant'; } );
- },
- { name = 'string.quoted.double.tm-language-def';
- begin = '"';
- end = '"';
- patterns = ( { include = '#string-constant'; } );
- },
- );
- };
- string-constant =
- { name = 'constant.character.escape.tm-language-def';
- match = '\\([uU](\h{4}|\h{2})|\d{1,3}|.)';
- };
- };
- }
Add Comment
Please, Sign In to add comment