Created
January 7, 2014 15:54
-
-
Save louisremi/8301424 to your computer and use it in GitHub Desktop.
Prototypo Glyph Formula Highlighting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# [PackageDev] target_format: plist, ext: tmLanguage | |
--- | |
name: Prototypo Glyph Formula | |
scopeName: source.prototypo_glyph_formula | |
fileTypes: [pgf, pcf] | |
uuid: e87ec56d-d1cc-417c-98df-6507c710898f | |
patterns: | |
- include: '#line-comment' | |
- name: meta.segment.pgf | |
begin: ^(r?[A-Za-z])\b | |
beginCaptures: | |
'1': { name: support.constant.pgf } | |
end: $ | |
patterns: | |
- include: '#template' | |
- include: '#number' | |
- name: meta.component.pgf | |
begin: ^(add|replace) | |
beginCaptures: | |
'1': { name: support.function.pgf } | |
end: $ | |
patterns: | |
- include: '#template' | |
- include: '#self' | |
- include: '#number' | |
- name: keyword.other.pgf | |
match: inverted | |
repository: | |
template: | |
patterns: | |
- name: meta.template.values.pgf | |
begin: \{\{ | |
beginCaptures: | |
'0': { name: keyword.operator.pgf } | |
end: (?=\|)|\}\} | |
endCaptures: | |
'0': { name: keyword.operator.pgf } | |
patterns: | |
- include: source.js | |
- include: '#self' | |
- name: meta.template.filters.pgf | |
begin: (?=\|) | |
end: \}\} | |
endCaptures: | |
'0': { name: keyword.operator.pgf } | |
patterns: | |
- match: (\|)\s*([^:\s]*) | |
captures: | |
'1': { name: keyword.operator.pgf } | |
'2': { name: entity.name.function.pgf } | |
- include: source.js | |
- include: '#self' | |
self: | |
name: variable.language.pgf | |
match: self | |
number: | |
name: constant.numeric.pgf | |
match: \d+(?:\.\d+)?|\.\d+ | |
line-comment: | |
name: comment.line.double-slash | |
match: //.*?$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment