mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-04 22:20:20 +09:00
Improve new syntax files and fix a region glitch
This commit is contained in:
@@ -78,6 +78,10 @@ func findAllIndex(regex *regexp.Regexp, str []byte, canMatchStart, canMatchEnd b
|
|||||||
|
|
||||||
func (h *Highlighter) highlightRegion(start int, canMatchEnd bool, lineNum int, line []byte, region *Region) LineMatch {
|
func (h *Highlighter) highlightRegion(start int, canMatchEnd bool, lineNum int, line []byte, region *Region) LineMatch {
|
||||||
fullHighlights := make([]uint8, len(line))
|
fullHighlights := make([]uint8, len(line))
|
||||||
|
for i := 0; i < len(fullHighlights); i++ {
|
||||||
|
fullHighlights[i] = region.group
|
||||||
|
}
|
||||||
|
|
||||||
highlights := make(LineMatch)
|
highlights := make(LineMatch)
|
||||||
|
|
||||||
if start == 0 {
|
if start == 0 {
|
||||||
@@ -130,15 +134,13 @@ func (h *Highlighter) highlightRegion(start int, canMatchEnd bool, lineNum int,
|
|||||||
for i := m[0]; i < m[1]; i++ {
|
for i := m[0]; i < m[1]; i++ {
|
||||||
fullHighlights[i] = p.group
|
fullHighlights[i] = p.group
|
||||||
}
|
}
|
||||||
// highlights[start+m[0]] = p.group
|
|
||||||
// if _, ok := highlights[start+m[1]]; !ok {
|
|
||||||
// highlights[start+m[1]] = region.group
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for i, h := range fullHighlights {
|
for i, h := range fullHighlights {
|
||||||
if i == 0 || h != fullHighlights[i-1] {
|
if i == 0 || h != fullHighlights[i-1] {
|
||||||
highlights[start+i] = h
|
if _, ok := highlights[start+i]; !ok {
|
||||||
|
highlights[start+i] = h
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,15 +185,13 @@ func (h *Highlighter) highlightEmptyRegion(start int, canMatchEnd bool, lineNum
|
|||||||
for i := m[0]; i < m[1]; i++ {
|
for i := m[0]; i < m[1]; i++ {
|
||||||
fullHighlights[i] = p.group
|
fullHighlights[i] = p.group
|
||||||
}
|
}
|
||||||
// highlights[start+m[0]] = p.group
|
|
||||||
// if _, ok := highlights[start+m[1]]; !ok {
|
|
||||||
// highlights[start+m[1]] = 0
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for i, h := range fullHighlights {
|
for i, h := range fullHighlights {
|
||||||
if i == 0 || h != fullHighlights[i-1] {
|
if i == 0 || h != fullHighlights[i-1] {
|
||||||
highlights[start+i] = h
|
if _, ok := highlights[start+i]; !ok {
|
||||||
|
highlights[start+i] = h
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
1337
cmd/micro/runtime.go
1337
cmd/micro/runtime.go
File diff suppressed because one or more lines are too long
@@ -1,10 +1,9 @@
|
|||||||
filetype: apacheconf
|
filetype: apacheconf
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "httpd\\.conf|mime\\.types|vhosts\\.d\\\\*|\\.htaccess"
|
filename: "httpd\\.conf|mime\\.types|vhosts\\.d\\\\*|\\.htaccess"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- special: ".+"
|
|
||||||
- identifier: "(AcceptMutex|AcceptPathInfo|AccessFileName|Action|AddAlt|AddAltByEncoding|AddAltByType|AddCharset|AddDefaultCharset|AddDescription|AddEncoding)"
|
- identifier: "(AcceptMutex|AcceptPathInfo|AccessFileName|Action|AddAlt|AddAltByEncoding|AddAltByType|AddCharset|AddDefaultCharset|AddDescription|AddEncoding)"
|
||||||
- identifier: "(AddHandler|AddIcon|AddIconByEncoding|AddIconByType|AddInputFilter|AddLanguage|AddModuleInfo|AddOutputFilter|AddOutputFilterByType|AddType|Alias|AliasMatch)"
|
- identifier: "(AddHandler|AddIcon|AddIconByEncoding|AddIconByType|AddInputFilter|AddLanguage|AddModuleInfo|AddOutputFilter|AddOutputFilterByType|AddType|Alias|AliasMatch)"
|
||||||
- identifier: "(Allow|AllowCONNECT|AllowEncodedSlashes|AllowOverride|Anonymous|Anonymous_Authoritative|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID)"
|
- identifier: "(Allow|AllowCONNECT|AllowEncodedSlashes|AllowOverride|Anonymous|Anonymous_Authoritative|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID)"
|
||||||
@@ -44,5 +43,15 @@ rules:
|
|||||||
- symbol.tag: "<[^>]+>"
|
- symbol.tag: "<[^>]+>"
|
||||||
- identifier: "</?[A-Za-z]+"
|
- identifier: "</?[A-Za-z]+"
|
||||||
- identifier: "(<|</|>)"
|
- identifier: "(<|</|>)"
|
||||||
- constant.string: "\\\"(\\\\.|[^\\\"])*\\\""
|
|
||||||
- comment: "#.*"
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "#"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|||||||
@@ -1,43 +1,98 @@
|
|||||||
filetype: ino
|
filetype: ino
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.?ino$"
|
filename: "\\.?ino$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- identifier.macro: "\\b[A-Z_][0-9A-Z_]+\\b"
|
- identifier: "\\b[A-Z_][0-9A-Z_]+\\b"
|
||||||
- type: "\\b((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\\b"
|
|
||||||
- constant: "\\b(HIGH|LOW|INPUT|OUTPUT)\\b"
|
##
|
||||||
- identifier.macro: "\\b(DEC|BIN|HEX|OCT|BYTE)\\b"
|
- type: "\\b((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\\b"
|
||||||
- constant: "\\b(PI|HALF_PI|TWO_PI)\\b"
|
|
||||||
- constant: "\\b(LSBFIRST|MSBFIRST)\\b"
|
## Constants
|
||||||
- constant: "\\b(CHANGE|FALLING|RISING)\\b"
|
- constant: "(?i)\\b(HIGH|LOW|INPUT|OUTPUT)\\b"
|
||||||
- constant: "\\b(DEFAULT|EXTERNAL|INTERNAL|INTERNAL1V1|INTERNAL2V56)\\b"
|
|
||||||
- type: "\\b(boolean|byte|char|float|int|long|word)\\b"
|
## Serial Print
|
||||||
- statement: "\\b(case|class|default|do|double|else|false|for|if|new|null|private|protected|public|short|signed|static|String|switch|this|throw|try|true|unsigned|void|while)\\b"
|
- constant: "(?i)\\b(DEC|BIN|HEX|OCT|BYTE)\\b"
|
||||||
- special: "\\b(goto|continue|break|return)\\b"
|
|
||||||
- statement: "\\b(abs|acos|asin|atan|atan2|ceil|constrain|cos|degrees|exp|floor|log|map|max|min|radians|random|randomSeed|round|sin|sq|sqrt|tan)\\b"
|
## PI Constants
|
||||||
- statement: "\\b(bitRead|bitWrite|bitSet|bitClear|bit|highByte|lowByte)\\b"
|
- constant: "(?i)\\b(PI|HALF_PI|TWO_PI)\\b"
|
||||||
- statement: "\\b(analogReference|analogRead|analogWrite)\\b"
|
|
||||||
- statement: "\\b(attachInterrupt|detachInterrupt)\\b"
|
## ShiftOut
|
||||||
- statement: "\\b(delay|delayMicroseconds|millis|micros)\\b"
|
- constant: "(?i)\\b(LSBFIRST|MSBFIRST)\\b"
|
||||||
- statement: "\\b(pinMode|digitalWrite|digitalRead)\\b"
|
|
||||||
- statement: "\\b(interrupts|noInterrupts)\\b"
|
## Attach Interrupt
|
||||||
- statement: "\\b(noTone|pulseIn|shiftIn|shiftOut|tone)\\b"
|
- constant: "(?i)\\b(CHANGE|FALLING|RISING)\\b"
|
||||||
- special: "\\b(Serial|Serial1|Serial2|Serial3|begin|end|peek|read|print|println|available|flush)\\b"
|
|
||||||
- statement: "\\b(setup|loop)\\b"
|
## Analog Reference
|
||||||
- preproc: "^[[:space:]]*#[[:space:]]*(define|include(_next)?|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma)"
|
- constant: "(?i)\\b(DEFAULT|EXTERNAL|INTERNAL|INTERNAL1V1|INTERNAL2V56)\\b"
|
||||||
- constant.specialChar: "'([^']|(\\\\[\"'abfnrtv\\\\]))'|'\\\\(([0-3]?[0-7]{1,2}))'|'\\\\x[0-9A-Fa-f]{1,2}'"
|
|
||||||
- preproc: "__attribute__[[:space:]]*\\(\\([^)]*\\)\\)|__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
|
## === FUNCTIONS === ##
|
||||||
- constant.string: "<[^= ]*>|\"(\\\\.|[^\"])*\""
|
|
||||||
- constant.string:
|
## Data Types
|
||||||
start: "\"(\\\\.|[^\"])*\\\\[[:space:]]*$"
|
- type: "\\b(boolean|byte|char|float|int|long|word)\\b"
|
||||||
end: "^(\\\\.|[^\"])*\""
|
|
||||||
rules: []
|
## Control Structions
|
||||||
|
- statement: "\\b(case|class|default|do|double|else|false|for|if|new|null|private|protected|public|short|signed|static|String|switch|this|throw|try|true|unsigned|void|while)\\b"
|
||||||
|
- statement: "\\b(goto|continue|break|return)\\b"
|
||||||
|
|
||||||
|
## Math
|
||||||
|
- identifier: "\\b(abs|acos|asin|atan|atan2|ceil|constrain|cos|degrees|exp|floor|log|map|max|min|radians|random|randomSeed|round|sin|sq|sqrt|tan)\\b"
|
||||||
|
|
||||||
|
## Bits & Bytes
|
||||||
|
- identifier: "\\b(bitRead|bitWrite|bitSet|bitClear|bit|highByte|lowByte)\\b"
|
||||||
|
|
||||||
|
## Analog I/O
|
||||||
|
- identifier: "\\b(analogReference|analogRead|analogWrite)\\b"
|
||||||
|
|
||||||
|
## External Interrupts
|
||||||
|
- identifier: "\\b(attachInterrupt|detachInterrupt)\\b"
|
||||||
|
|
||||||
|
## Time
|
||||||
|
- identifier: "\\b(delay|delayMicroseconds|millis|micros)\\b"
|
||||||
|
|
||||||
|
## Digital I/O
|
||||||
|
- identifier: "\\b(pinMode|digitalWrite|digitalRead)\\b"
|
||||||
|
|
||||||
|
## Interrupts
|
||||||
|
- identifier: "\\b(interrupts|noInterrupts)\\b"
|
||||||
|
|
||||||
|
## Advanced I/O
|
||||||
|
- identifier: "\\b(noTone|pulseIn|shiftIn|shiftOut|tone)\\b"
|
||||||
|
|
||||||
|
## Serial
|
||||||
|
- identifier: "\\b(Serial|Serial1|Serial2|Serial3|begin|end|peek|read|print|println|available|flush)\\b"
|
||||||
|
|
||||||
|
## Structure
|
||||||
|
- identifier: "\\b(setup|loop)\\b"
|
||||||
|
|
||||||
|
##
|
||||||
|
- statement: "^[[:space:]]*#[[:space:]]*(define|include(_next)?|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma)"
|
||||||
|
|
||||||
|
## GCC builtins
|
||||||
|
- constant: "(__attribute__[[:space:]]*\\(\\([^)]*\\)\\)|__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__)"
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- preproc: "..+"
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "//"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|
||||||
- comment: "//.*"
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "/\\*"
|
start: "/\\*"
|
||||||
end: "\\*/"
|
end: "\\*/"
|
||||||
rules: []
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
- indent-char.whitespace: "[[:space:]]+$"
|
|
||||||
|
|||||||
@@ -1,24 +1,37 @@
|
|||||||
filetype: asciidoc
|
filetype: asciidoc
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.(asc|asciidoc|adoc)$"
|
filename: "\\.(asc|asciidoc|adoc)$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
|
# main header
|
||||||
- preproc: "^====+$"
|
- preproc: "^====+$"
|
||||||
|
# h1
|
||||||
- statement: "^==[[:space:]].*$"
|
- statement: "^==[[:space:]].*$"
|
||||||
- statement: "^----+$"
|
- statement: "^----+$"
|
||||||
|
# h2
|
||||||
- symbol: "^===[[:space:]].*$"
|
- symbol: "^===[[:space:]].*$"
|
||||||
- symbol: "^~~~~+$"
|
- symbol: "^~~~~+$"
|
||||||
|
# h4
|
||||||
- type: "^====[[:space:]].*$"
|
- type: "^====[[:space:]].*$"
|
||||||
- type: "^\\^\\^\\^\\^+$"
|
- type: "^\\^\\^\\^\\^+$"
|
||||||
|
# h5
|
||||||
- constant: "^=====[[:space:]].*$"
|
- constant: "^=====[[:space:]].*$"
|
||||||
- constant: "^\\+\\+\\+\\++$"
|
- constant: "^\\+\\+\\+\\++$"
|
||||||
|
|
||||||
|
# attributes
|
||||||
- type.keyword: ":.*:"
|
- type.keyword: ":.*:"
|
||||||
- identifier.macro: "\\{[a-z0-9]*\\}"
|
- identifier.macro: "\\{[a-z0-9]*\\}"
|
||||||
- identifier: "\\\\\\{[a-z0-9]*\\}"
|
- identifier: "\\\\\\{[a-z0-9]*\\}"
|
||||||
- identifier: "\\+\\+\\+\\{[a-z0-9]*\\}\\+\\+\\+"
|
- identifier: "\\+\\+\\+\\{[a-z0-9]*\\}\\+\\+\\+"
|
||||||
|
|
||||||
|
# Paragraph Title
|
||||||
- statement: "^\\..*$"
|
- statement: "^\\..*$"
|
||||||
|
|
||||||
|
# source
|
||||||
- identifier: "^\\[(source,.+|NOTE|TIP|IMPORTANT|WARNING|CAUTION)\\]"
|
- identifier: "^\\[(source,.+|NOTE|TIP|IMPORTANT|WARNING|CAUTION)\\]"
|
||||||
|
|
||||||
|
# Other markup
|
||||||
- constant.string: ".*[[:space:]]\\+$"
|
- constant.string: ".*[[:space:]]\\+$"
|
||||||
- constant.string: "_[^_]+_"
|
- constant.string: "_[^_]+_"
|
||||||
- constant.string: "\\*[^\\*]+\\*"
|
- constant.string: "\\*[^\\*]+\\*"
|
||||||
@@ -27,7 +40,12 @@ rules:
|
|||||||
- constant.string: "\\^[^\\^]+\\^"
|
- constant.string: "\\^[^\\^]+\\^"
|
||||||
- constant.string: "~[^~]+~"
|
- constant.string: "~[^~]+~"
|
||||||
- constant.string: "'[^']+'"
|
- constant.string: "'[^']+'"
|
||||||
|
|
||||||
- constant: "`{1,2}[^']+'{1,2}"
|
- constant: "`{1,2}[^']+'{1,2}"
|
||||||
|
|
||||||
|
# bullets
|
||||||
- symbol: "^[[:space:]]*[\\*\\.-]{1,5}[[:space:]]"
|
- symbol: "^[[:space:]]*[\\*\\.-]{1,5}[[:space:]]"
|
||||||
- bold default: "\\[\\[.*\\]\\]"
|
|
||||||
- bold default: "<<.*>>"
|
# anchors
|
||||||
|
- "bold default": "\\[\\[.*\\]\\]"
|
||||||
|
- "bold default": "<<.*>>"
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
filetype: asm
|
filetype: asm
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.(S|s|asm)$"
|
filename: "\\.(S|s|asm)$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
|
# This file is made for NASM assembly
|
||||||
|
|
||||||
|
## Instructions
|
||||||
|
# x86
|
||||||
- statement: "\\b(?i)(mov|aaa|aad|aam|aas|adc|add|and|call|cbw|clc|cld|cli|cmc|cmp|cmpsb|cmpsw|cwd|daa|das|dec|div|esc|hlt|idiv|imul|in|inc|int|into|iret|ja|jae|jb|jbe|jc|je|jg|jge|jl|jle|jna|jnae|jnb|jnbe|jnc|jne|jng|jnge|jnl|jnle|jno|jnp|jns|jnz|jo|jp|jpe|jpo|js|jz|jcxz|jmp|lahf|lds|lea|les|lock|lodsb|lodsw|loop|loope|loopne|loopnz|loopz|movsb|movsw|mul|neg|nop|or|pop|popf|push|pushf|rcl|rcr|rep|repe|repne|repnz|repz|ret|retn|retf|rol|ror|sahf|sal|sar|sbb|scasb|scasw|shl|shr|stc|std|sti|stosb|stosw|sub|test|wait|xchg|xlat|xor)(?-i)\\b"
|
- statement: "\\b(?i)(mov|aaa|aad|aam|aas|adc|add|and|call|cbw|clc|cld|cli|cmc|cmp|cmpsb|cmpsw|cwd|daa|das|dec|div|esc|hlt|idiv|imul|in|inc|int|into|iret|ja|jae|jb|jbe|jc|je|jg|jge|jl|jle|jna|jnae|jnb|jnbe|jnc|jne|jng|jnge|jnl|jnle|jno|jnp|jns|jnz|jo|jp|jpe|jpo|js|jz|jcxz|jmp|lahf|lds|lea|les|lock|lodsb|lodsw|loop|loope|loopne|loopnz|loopz|movsb|movsw|mul|neg|nop|or|pop|popf|push|pushf|rcl|rcr|rep|repe|repne|repnz|repz|ret|retn|retf|rol|ror|sahf|sal|sar|sbb|scasb|scasw|shl|shr|stc|std|sti|stosb|stosw|sub|test|wait|xchg|xlat|xor)(?-i)\\b"
|
||||||
- statement: "\\b(?i)(bound|enter|ins|leave|outs|popa|pusha)(?-i)\\b"
|
- statement: "\\b(?i)(bound|enter|ins|leave|outs|popa|pusha)(?-i)\\b"
|
||||||
- statement: "\\b(?i)(arpl|clts|lar|lgdt|lidt|lldt|lmsw|loadall|lsl|ltr|sgdt|sidt|sldt|smsw|str|verr|verw)(?-i)\\b"
|
- statement: "\\b(?i)(arpl|clts|lar|lgdt|lidt|lldt|lmsw|loadall|lsl|ltr|sgdt|sidt|sldt|smsw|str|verr|verw)(?-i)\\b"
|
||||||
@@ -21,6 +25,8 @@ rules:
|
|||||||
- statement: "\\b(?i)(vmptrdl|vmptrst|vmclear|vmread|vmwrite|vmcall|vmlaunch|vmresume|vmxoff|vmxon)(?-i)\\b"
|
- statement: "\\b(?i)(vmptrdl|vmptrst|vmclear|vmread|vmwrite|vmcall|vmlaunch|vmresume|vmxoff|vmxon)(?-i)\\b"
|
||||||
- statement: "\\b(?i)(lzcnt|popcnt)(?-i)\\b"
|
- statement: "\\b(?i)(lzcnt|popcnt)(?-i)\\b"
|
||||||
- statement: "\\b(?i)(bextr|blcfill|blci|blcic|blcmask|blcs|blsfill|blsic|t1mskc|tzmsk)(?-i)\\b"
|
- statement: "\\b(?i)(bextr|blcfill|blci|blcic|blcmask|blcs|blsfill|blsic|t1mskc|tzmsk)(?-i)\\b"
|
||||||
|
|
||||||
|
# x87
|
||||||
- statement: "\\b(?i)(f2xm1|fabs|fadd|faddp|fbld|fbstp|fchs|fclex|fcom|fcomp|fcompp|fdecstp|fdisi|fdiv|fvidp|fdivr|fdivrp|feni|ffree|fiadd|ficom|ficomp|fidiv|fidivr|fild|fimul|fincstp|finit|fist|fistp|fisub|fisubr|fld|fld1|fldcw|fldenv|fldenvw|fldl2e|fldl2t|fldlg2|fldln2|fldpi|fldz|fmul|fmulp|fnclex|fndisi|fneni|fninit|fnop|fnsave|fnsavenew|fnstcw|fnstenv|fnstenvw|fnstsw|fpatan|fprem|fptan|frndint|frstor|frstorw|fsave|fsavew|fscale|fsqrt|fst|fstcw|fstenv|fstenvw|fstp|fstpsw|fsub|fsubp|fsubr|fsubrp|ftst|fwait|fxam|fxch|fxtract|fyl2x|fyl2xp1)(?-i)\\b"
|
- statement: "\\b(?i)(f2xm1|fabs|fadd|faddp|fbld|fbstp|fchs|fclex|fcom|fcomp|fcompp|fdecstp|fdisi|fdiv|fvidp|fdivr|fdivrp|feni|ffree|fiadd|ficom|ficomp|fidiv|fidivr|fild|fimul|fincstp|finit|fist|fistp|fisub|fisubr|fld|fld1|fldcw|fldenv|fldenvw|fldl2e|fldl2t|fldlg2|fldln2|fldpi|fldz|fmul|fmulp|fnclex|fndisi|fneni|fninit|fnop|fnsave|fnsavenew|fnstcw|fnstenv|fnstenvw|fnstsw|fpatan|fprem|fptan|frndint|frstor|frstorw|fsave|fsavew|fscale|fsqrt|fst|fstcw|fstenv|fstenvw|fstp|fstpsw|fsub|fsubp|fsubr|fsubrp|ftst|fwait|fxam|fxch|fxtract|fyl2x|fyl2xp1)(?-i)\\b"
|
||||||
- statement: "\\b(?i)(fsetpm)(?-i)\\b"
|
- statement: "\\b(?i)(fsetpm)(?-i)\\b"
|
||||||
- statement: "\\b(?i)(fcos|fldenvd|fsaved|fstenvd|fprem1|frstord|fsin|fsincos|fstenvd|fucom|fucomp|fucompp)(?-i)\\b"
|
- statement: "\\b(?i)(fcos|fldenvd|fsaved|fstenvd|fprem1|frstord|fsin|fsincos|fstenvd|fucom|fucomp|fucompp)(?-i)\\b"
|
||||||
@@ -29,6 +35,8 @@ rules:
|
|||||||
- statement: "\\b(?i)(fxrstor|fxsave)(?-i)\\b"
|
- statement: "\\b(?i)(fxrstor|fxsave)(?-i)\\b"
|
||||||
- statement: "\\b(?i)(fisttp)(?-i)\\b"
|
- statement: "\\b(?i)(fisttp)(?-i)\\b"
|
||||||
- statement: "\\b(?i)(ffreep)(?-i)\\b"
|
- statement: "\\b(?i)(ffreep)(?-i)\\b"
|
||||||
|
|
||||||
|
# SIMD
|
||||||
- statement: "\\b(?i)(emms|movd|movq|packssdw|packsswb|packuswb|paddb|paddw|paddd|paddsb|paddsw|paddusb|paddusw|pand|pandn|por|pxor|pcmpeqb|pcmpeqw|pcmpeqd|pcmpgtb|pcmpgtw|pcmpgtd|pmaddwd|pmulhw|pmullw|psllw|pslld|psllq|psrad|psraw|psrlw|psrld|psrlq|psubb|psubw|psubd|psubsb|psubsw|psubusb|punpckhbw|punpckhwd|punpckhdq|punkcklbw|punpckldq|punpcklwd)(?-i)\\b"
|
- statement: "\\b(?i)(emms|movd|movq|packssdw|packsswb|packuswb|paddb|paddw|paddd|paddsb|paddsw|paddusb|paddusw|pand|pandn|por|pxor|pcmpeqb|pcmpeqw|pcmpeqd|pcmpgtb|pcmpgtw|pcmpgtd|pmaddwd|pmulhw|pmullw|psllw|pslld|psllq|psrad|psraw|psrlw|psrld|psrlq|psubb|psubw|psubd|psubsb|psubsw|psubusb|punpckhbw|punpckhwd|punpckhdq|punkcklbw|punpckldq|punpcklwd)(?-i)\\b"
|
||||||
- statement: "\\b(?i)(paveb|paddsiw|pmagw|pdistib|psubsiw|pmwzb|pmulhrw|pmvnzb|pmvlzb|pmvgezb|pmulhriw|pmachriw)(?-i)\\b"
|
- statement: "\\b(?i)(paveb|paddsiw|pmagw|pdistib|psubsiw|pmwzb|pmulhrw|pmvnzb|pmvlzb|pmvgezb|pmulhriw|pmachriw)(?-i)\\b"
|
||||||
- statement: "\\b(?i)(femms|pavgusb|pf2id|pfacc|pfadd|pfcmpeq|pfcmpge|pfcmpgt|pfmax|pfmin|pfmul|pfrcp|pfrcpit1|pfrcpit2|pfrsqit1|pfrsqrt|pfsub|pfsubr|pi2fd|pmulhrw|prefetch|prefetchw)(?-i)\\b"
|
- statement: "\\b(?i)(femms|pavgusb|pf2id|pfacc|pfadd|pfcmpeq|pfcmpge|pfcmpgt|pfmax|pfmin|pfmul|pfrcp|pfrcpit1|pfrcpit2|pfrsqit1|pfrsqrt|pfsub|pfsubr|pi2fd|pmulhrw|prefetch|prefetchw)(?-i)\\b"
|
||||||
@@ -48,9 +56,15 @@ rules:
|
|||||||
- statement: "\\b(?i)(extrq|insertq|movntsd|movntss)(?-i)\\b"
|
- statement: "\\b(?i)(extrq|insertq|movntsd|movntss)(?-i)\\b"
|
||||||
- statement: "\\b(?i)(crc32|pcmpestri|pcmpestrm|pcmpistri|pcmpistrm|pcmpgtq)(?-i)\\b"
|
- statement: "\\b(?i)(crc32|pcmpestri|pcmpestrm|pcmpistri|pcmpistrm|pcmpgtq)(?-i)\\b"
|
||||||
- statement: "\\b(?i)(vfmaddpd|vfmaddps|vfmaddsd|vfmaddss|vfmaddsubpd|vfmaddsubps|vfmsubaddpd|vfmsubaddps|vfmsubpd|vfmsubps|vfmsubsd|vfmsubss|vfnmaddpd|vfnmaddps|vfnmaddsd|vfnmaddss|vfnmsubps|vfnmsubsd|vfnmsubss)(?-i)\\b"
|
- statement: "\\b(?i)(vfmaddpd|vfmaddps|vfmaddsd|vfmaddss|vfmaddsubpd|vfmaddsubps|vfmsubaddpd|vfmsubaddps|vfmsubpd|vfmsubps|vfmsubsd|vfmsubss|vfnmaddpd|vfnmaddps|vfnmaddsd|vfnmaddss|vfnmsubps|vfnmsubsd|vfnmsubss)(?-i)\\b"
|
||||||
|
|
||||||
|
# Crypto
|
||||||
- statement: "\\b(?i)(aesenc|aesenclast|aesdec|aesdeclast|aeskeygenassist|aesimc)(?-i)\\b"
|
- statement: "\\b(?i)(aesenc|aesenclast|aesdec|aesdeclast|aeskeygenassist|aesimc)(?-i)\\b"
|
||||||
- statement: "\\b(?i)(sha1rnds4|sha1nexte|sha1msg1|sha1msg2|sha256rnds2|sha256msg1|sha256msg2)(?-i)\\b"
|
- statement: "\\b(?i)(sha1rnds4|sha1nexte|sha1msg1|sha1msg2|sha256rnds2|sha256msg1|sha256msg2)(?-i)\\b"
|
||||||
|
|
||||||
|
# Undocumented
|
||||||
- statement: "\\b(?i)(aam|aad|salc|icebp|loadall|loadalld|ud1)(?-i)\\b"
|
- statement: "\\b(?i)(aam|aad|salc|icebp|loadall|loadalld|ud1)(?-i)\\b"
|
||||||
|
|
||||||
|
## Registers
|
||||||
- identifier: "\\b(?i)(al|ah|bl|bh|cl|ch|dl|dh|bpl|sil|r8b|r9b|r10b|r11b|dil|spl|r12b|r13b|r14b|r15)(?-i)\\b"
|
- identifier: "\\b(?i)(al|ah|bl|bh|cl|ch|dl|dh|bpl|sil|r8b|r9b|r10b|r11b|dil|spl|r12b|r13b|r14b|r15)(?-i)\\b"
|
||||||
- identifier: "\\b(?i)(cw|sw|tw|fp_ds|fp_opc|fp_ip|fp_dp|fp_cs|cs|ss|ds|es|fs|gs|gdtr|idtr|tr|ldtr|ax|bx|cx|dx|bp|si|r8w|r9w|r10w|r11w|di|sp|r12w|r13w|r14w|r15w|ip)(?-i)\\b"
|
- identifier: "\\b(?i)(cw|sw|tw|fp_ds|fp_opc|fp_ip|fp_dp|fp_cs|cs|ss|ds|es|fs|gs|gdtr|idtr|tr|ldtr|ax|bx|cx|dx|bp|si|r8w|r9w|r10w|r11w|di|sp|r12w|r13w|r14w|r15w|ip)(?-i)\\b"
|
||||||
- identifier: "\\b(?i)(fp_dp|fp_ip|eax|ebx|ecx|edx|ebp|esi|r8d|r9d|r10d|r11d|edi|esp|r12d|r13d|r14d|r15d|eip|eflags|mxcsr)(?-i)\\b"
|
- identifier: "\\b(?i)(fp_dp|fp_ip|eax|ebx|ecx|edx|ebp|esi|r8d|r9d|r10d|r11d|edi|esp|r12d|r13d|r14d|r15d|eip|eflags|mxcsr)(?-i)\\b"
|
||||||
@@ -59,13 +73,35 @@ rules:
|
|||||||
- identifier: "\\b(?i)(xmm0|xmm1|xmm2|xmm3|xmm4|xmm5|xmm6|xmm7|xmm8|xmm9|xmm10|xmm11|xmm12|xmm13|xmm14|xmm15)(?-i)\\b"
|
- identifier: "\\b(?i)(xmm0|xmm1|xmm2|xmm3|xmm4|xmm5|xmm6|xmm7|xmm8|xmm9|xmm10|xmm11|xmm12|xmm13|xmm14|xmm15)(?-i)\\b"
|
||||||
- identifier: "\\b(?i)(ymm0|ymm1|ymm2|ymm3|ymm4|ymm5|ymm6|ymm7|ymm8|ymm9|ymm10|ymm11|ymm12|ymm13|ymm14|ymm15)(?-i)\\b"
|
- identifier: "\\b(?i)(ymm0|ymm1|ymm2|ymm3|ymm4|ymm5|ymm6|ymm7|ymm8|ymm9|ymm10|ymm11|ymm12|ymm13|ymm14|ymm15)(?-i)\\b"
|
||||||
- identifier: "\\b(?i)(zmm0|zmm1|zmm2|zmm3|zmm4|zmm5|zmm6|zmm7|zmm8|zmm9|zmm10|zmm11|zmm12|zmm13|zmm14|zmm15|zmm16|zmm17|zmm18|zmm19|zmm20|zmm21|zmm22|zmm23|zmm24|zmm25|zmm26|zmm27|zmm28|zmm29|zmm30|zmm31)(?-i)\\b"
|
- identifier: "\\b(?i)(zmm0|zmm1|zmm2|zmm3|zmm4|zmm5|zmm6|zmm7|zmm8|zmm9|zmm10|zmm11|zmm12|zmm13|zmm14|zmm15|zmm16|zmm17|zmm18|zmm19|zmm20|zmm21|zmm22|zmm23|zmm24|zmm25|zmm26|zmm27|zmm28|zmm29|zmm30|zmm31)(?-i)\\b"
|
||||||
|
|
||||||
|
## Constants
|
||||||
|
# Number - it works
|
||||||
- constant.number: "\\b(|h|A|0x)+[0-9]+(|h|A)+\\b"
|
- constant.number: "\\b(|h|A|0x)+[0-9]+(|h|A)+\\b"
|
||||||
- constant.number: "\\b0x[0-9 a-f A-F]+\\b"
|
- constant.number: "\\b0x[0-9 a-f A-F]+\\b"
|
||||||
|
|
||||||
|
## Preprocessor (NASM)
|
||||||
- preproc: "%+(\\+|\\?|\\?\\?|)[a-z A-Z 0-9]+"
|
- preproc: "%+(\\+|\\?|\\?\\?|)[a-z A-Z 0-9]+"
|
||||||
- preproc: "%\\[[. a-z A-Z 0-9]*\\]"
|
- preproc: "%\\[[. a-z A-Z 0-9]*\\]"
|
||||||
|
|
||||||
|
## Other
|
||||||
- statement: "\\b(?i)(extern|global|section|segment|_start|\\.text|\\.data|\\.bss)(?-i)\\b"
|
- statement: "\\b(?i)(extern|global|section|segment|_start|\\.text|\\.data|\\.bss)(?-i)\\b"
|
||||||
- statement: "\\b(?i)(db|dw|dd|dq|dt|ddq|do)(?-i)\\b"
|
- statement: "\\b(?i)(db|dw|dd|dq|dt|ddq|do)(?-i)\\b"
|
||||||
- identifier: "[a-z A-Z 0-9 _]+:"
|
- identifier: "[a-z A-Z 0-9 _]+:"
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\""
|
|
||||||
- constant.string: "'(\\\\.|[^'])*'"
|
- constant.string:
|
||||||
- comment: ";.*"
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: ";"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
filetype: awk
|
filetype: awk
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.awk$"
|
filename: "\\.awk$"
|
||||||
header: "^#!.*bin/(env +)?awk( |$)"
|
header: "^#!.*bin/(env +)?awk( |$)"
|
||||||
|
|
||||||
@@ -11,8 +11,8 @@ rules:
|
|||||||
- preproc: "\\b(PROCINFO|RS|RT|RSTART|RLENGTH|SUBSEP|TEXTDOMAIN)\\b"
|
- preproc: "\\b(PROCINFO|RS|RT|RSTART|RLENGTH|SUBSEP|TEXTDOMAIN)\\b"
|
||||||
- identifier.class: "\\b(function|extension|BEGIN|END)\\b"
|
- identifier.class: "\\b(function|extension|BEGIN|END)\\b"
|
||||||
- symbol.operator: "[\\-+*/%^|!=&<>?;:]|\\\\|\\[|\\]"
|
- symbol.operator: "[\\-+*/%^|!=&<>?;:]|\\\\|\\[|\\]"
|
||||||
- statement: "\\b(for|if|while|do|else|in|delete|exit)\\b"
|
- statement: "\\b(for|if|while|do|else|in|delete|exit)\\b"
|
||||||
- special: "\\b(break|continue|return)\\b"
|
- special: "\\b(break|continue|return)\\b"
|
||||||
- statement: "\\b(close|getline|next|nextfile|print|printf|system|fflush)\\b"
|
- statement: "\\b(close|getline|next|nextfile|print|printf|system|fflush)\\b"
|
||||||
- statement: "\\b(atan2|cos|exp|int|log|rand|sin|sqrt|srand)\\b"
|
- statement: "\\b(atan2|cos|exp|int|log|rand|sin|sqrt|srand)\\b"
|
||||||
- statement: "\\b(asort|asorti|gensub|gsub|index|length|match)\\b"
|
- statement: "\\b(asort|asorti|gensub|gsub|index|length|match)\\b"
|
||||||
@@ -20,10 +20,22 @@ rules:
|
|||||||
- statement: "\\b(mktime|strftime|systime)\\b"
|
- statement: "\\b(mktime|strftime|systime)\\b"
|
||||||
- statement: "\\b(and|compl|lshift|or|rshift|xor)\\b"
|
- statement: "\\b(and|compl|lshift|or|rshift|xor)\\b"
|
||||||
- statement: "\\b(bindtextdomain|dcgettext|dcngettext)\\b"
|
- statement: "\\b(bindtextdomain|dcgettext|dcngettext)\\b"
|
||||||
- special: "/.*[^\\\\]/"
|
- special: "/.*[^\\\\]/"
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
|
||||||
- constant.specialChar: "\\\\."
|
- constant.string:
|
||||||
- comment: "(^|[[:space:]])#([^{].*)?$"
|
start: "\""
|
||||||
- todo: "TODO:?"
|
end: "\""
|
||||||
- indent-char.: "[[:space:]]+$"
|
rules:
|
||||||
- indent-char: " + +| + +"
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "#"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|||||||
@@ -1,30 +1,51 @@
|
|||||||
filetype: c
|
filetype: c
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.(c|C)$|\\.(h|H)$|\\.ii?$|\\.(def)$"
|
filename: "(\\.(c|C)$|\\.(h|H)$|\\.ii?$|\\.(def)$)"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- identifier: "\\b[A-Z_][0-9A-Z_]+\\b"
|
- identifier: "\\b[A-Z_][0-9A-Z_]+\\b"
|
||||||
- type: "\\b(float|double|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\\b"
|
- type: "\\b(float|double|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\\b"
|
||||||
- type: "\\b((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\\b"
|
- type: "\\b((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\\b"
|
||||||
- type.extended: "\\b(bool)\\b"
|
- type.extended: "\\b(bool)\\b"
|
||||||
- statement: "\\b(typename|mutable|volatile|register|explicit)\\b"
|
- statement: "\\b(typename|mutable|volatile|register|explicit)\\b"
|
||||||
- statement: "\\b(for|if|while|do|else|case|default|switch)\\b"
|
- statement: "\\b(for|if|while|do|else|case|default|switch)\\b"
|
||||||
- statement: "\\b(try|throw|catch|operator|new|delete)\\b"
|
- statement: "\\b(try|throw|catch|operator|new|delete)\\b"
|
||||||
- special: "\\b(goto|continue|break|return)\\b"
|
- statement: "\\b(goto|continue|break|return)\\b"
|
||||||
- preproc: "^[[:space:]]*#[[:space:]]*(define|pragma|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
|
- preproc: "^[[:space:]]*#[[:space:]]*(define|pragma|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
|
||||||
- constant: "'([^'\\\\]|(\\\\[\"'abfnrtv\\\\]))'|'\\\\(([0-3]?[0-7]{1,2}))'|'\\\\x[0-9A-Fa-f]{1,2}'"
|
- constant: "'([^'\\\\]|(\\\\[\"'abfnrtv\\\\]))'"
|
||||||
- statement: "__attribute__[[:space:]]*\\(\\([^)]*\\)\\)|__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
|
- constant: "'\\\\(([0-3]?[0-7]{1,2}))'"
|
||||||
- constant.string: "<.+?>"
|
- constant: "'\\\\x[0-9A-Fa-f]{1,2}'"
|
||||||
- symbol.operator: "[.:;,+*|=!\\%]|<|>|/|-|&"
|
# GCC builtins
|
||||||
|
- statement: "__attribute__[[:space:]]*\\(\\([^)]*\\)\\)"
|
||||||
|
- statement: "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
|
||||||
|
# Operator Color
|
||||||
|
- symbol.operator: "([.:;,+*|=!\\%]|<|>|/|-|&)"
|
||||||
- symbol.brackets: "[(){}]|\\[|\\]"
|
- symbol.brackets: "[(){}]|\\[|\\]"
|
||||||
- constant.number: "\\b[0-9]+\\b|\\b0x[0-9A-Fa-f]+\\b"
|
- constant.number: "(\\b[0-9]+\\b|\\b0x[0-9A-Fa-f]+\\b)"
|
||||||
- constant.number: "NULL"
|
- constant.number: "NULL"
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\""
|
|
||||||
- comment: "//.*"
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- preproc: "..+"
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "//"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "/\\*"
|
start: "/\\*"
|
||||||
end: "\\*/"
|
end: "\\*/"
|
||||||
rules: []
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
- indent-char.whitespace: "[[:space:]]+$"
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
filetype: caddyfile
|
filetype: caddyfile
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "Caddyfile"
|
filename: "Caddyfile"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
@@ -9,11 +9,13 @@ rules:
|
|||||||
- constant.specialChar: "\\s{$"
|
- constant.specialChar: "\\s{$"
|
||||||
- constant.specialChar: "^\\s*}$"
|
- constant.specialChar: "^\\s*}$"
|
||||||
- constant.string:
|
- constant.string:
|
||||||
start: "\\\""
|
start: "\""
|
||||||
end: "\\\""
|
end: "\""
|
||||||
rules: []
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
- preproc: "\\{(\\w+|\\$\\w+|%\\w+%)\\}"
|
- preproc: "\\{(\\w+|\\$\\w+|%\\w+%)\\}"
|
||||||
- comment: "#.*"
|
- comment:
|
||||||
- indent-char: "([[:space:]]{2,}|\\t){$"
|
start: "#"
|
||||||
- indent-char: "[[:space:]]+$"
|
end: "$"
|
||||||
|
rules: []
|
||||||
|
|||||||
@@ -1,19 +1,36 @@
|
|||||||
filetype: clojure
|
filetype: clojure
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.(clj)$"
|
filename: "\\.(clj)$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- constant: ""
|
|
||||||
|
# Constants
|
||||||
- constant.bool: "\\b(true|false)\\b"
|
- constant.bool: "\\b(true|false)\\b"
|
||||||
- constant.macro: "\\b(nil)\\b"
|
- constant.macro: "\\b(nil)\\b"
|
||||||
|
# Valid numbers
|
||||||
- constant.number: "[\\-]?[0-9]+?\\b"
|
- constant.number: "[\\-]?[0-9]+?\\b"
|
||||||
- constant.number: "0x[0-9][A-Fa-f]+?\\b"
|
- constant.number: "0x[0-9][A-Fa-f]+?\\b"
|
||||||
- constant.number: "[\\-]?(3[0-6]|2[0-9]|1[0-9]|[2-9])r[0-9A-Z]+?\\b"
|
- constant.number: "[\\-]?(3[0-6]|2[0-9]|1[0-9]|[2-9])r[0-9A-Z]+?\\b"
|
||||||
|
# Invalid numbers
|
||||||
- error: "[\\-]?([4-9][0-9]|3[7-9]|1|0)r[0-9A-Z]+?\\b"
|
- error: "[\\-]?([4-9][0-9]|3[7-9]|1|0)r[0-9A-Z]+?\\b"
|
||||||
|
|
||||||
|
# Symbols
|
||||||
- symbol.operator: "[=>+\\-*/'?]"
|
- symbol.operator: "[=>+\\-*/'?]"
|
||||||
|
|
||||||
|
# Types/casting
|
||||||
- type: "\\b(byte|short|(big)?int(eger)?|long|float|num|bigdec|rationalize)\\b"
|
- type: "\\b(byte|short|(big)?int(eger)?|long|float|num|bigdec|rationalize)\\b"
|
||||||
- special: ""
|
|
||||||
- constant.string: ""
|
# String highlighting
|
||||||
- constant.specialChar: "(\\\\u[0-9A-fa-f]{4,4}|\\\\newline|\\\\space|\\\\tab|\\\\formfeed|\\\\backspace|\\\\return|\\\\.)"
|
- constant.string:
|
||||||
- comment: ";.*$"
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "(\\\\u[0-9A-fa-f]{4,4}|\\\\newline|\\\\space|\\\\tab|\\\\formfeed|\\\\backspace|\\\\return|\\\\.)"
|
||||||
|
|
||||||
|
# Comments
|
||||||
|
- comment:
|
||||||
|
start: ";"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|||||||
@@ -1,22 +1,39 @@
|
|||||||
filetype: cmake
|
filetype: cmake
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "(CMakeLists\\.txt|\\.cmake)$"
|
filename: "(CMakeLists\\.txt|\\.cmake)$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- identifier.var: "^[[:space:]]*[A-Z0-9_]+"
|
- identifier.var: "^[[:space:]]*[A-Z0-9_]+"
|
||||||
- preproc: "^[[:space:]]*(include|include_directories|include_external_msproject)\\b"
|
- preproc: "^[[:space:]]*(include|include_directories|include_external_msproject)\\b"
|
||||||
|
|
||||||
- statement: "^[[:space:]]*\\b((else|end)?if|else|(end)?while|(end)?foreach|break)\\b"
|
- statement: "^[[:space:]]*\\b((else|end)?if|else|(end)?while|(end)?foreach|break)\\b"
|
||||||
- statement: "\\b(COPY|NOT|COMMAND|PROPERTY|POLICY|TARGET|EXISTS|IS_(DIRECTORY|ABSOLUTE)|DEFINED)\\b[[:space:]]"
|
- statement: "\\b(COPY|NOT|COMMAND|PROPERTY|POLICY|TARGET|EXISTS|IS_(DIRECTORY|ABSOLUTE)|DEFINED)\\b[[:space:]]"
|
||||||
- statement: "[[:space:]]\\b(OR|AND|IS_NEWER_THAN|MATCHES|(STR|VERSION_)?(LESS|GREATER|EQUAL))\\b[[:space:]]"
|
- statement: "[[:space:]]\\b(OR|AND|IS_NEWER_THAN|MATCHES|(STR|VERSION_)?(LESS|GREATER|EQUAL))\\b[[:space:]]"
|
||||||
|
|
||||||
- special: "^[[:space:]]*\\b((end)?(function|macro)|return)"
|
- special: "^[[:space:]]*\\b((end)?(function|macro)|return)"
|
||||||
- constant.string: "['][^']*[^\\\\][']|[']{3}.*[^\\\\][']{3}"
|
|
||||||
- constant.string: "[\"][^\"]*[^\\\\][\"]|[\"]{3}.*[^\\\\][\"]{3}"
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
- preproc:
|
- preproc:
|
||||||
start: "\\$(\\{|ENV\\{)"
|
start: "\\$(\\{|ENV\\{)"
|
||||||
end: "\\}"
|
end: "\\}"
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
- identifier.macro: "\\b(APPLE|UNIX|WIN32|CYGWIN|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\\b"
|
- identifier.macro: "\\b(APPLE|UNIX|WIN32|CYGWIN|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\\b"
|
||||||
- comment: "^([[:space:]]*)?#.*"
|
|
||||||
- comment: "[[:space:]]#.*"
|
- comment:
|
||||||
|
start: "#"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|||||||
@@ -1,21 +1,27 @@
|
|||||||
filetype: coffeescript
|
filetype: coffeescript
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.coffee$"
|
filename: "\\.coffee$"
|
||||||
header: "^#!.*/(env +)?coffee"
|
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- symbol.operator: "[!&|=/*+\\-<>]|\\b(and|or|is|isnt|not)\\b"
|
- symbol.operator: "[!&|=/*+-<>]|\\b(and|or|is|isnt|not)\\b"
|
||||||
- identifier.class: "[A-Za-z_][A-Za-z0-9_]*:[[:space:]]*(->|\\()|->"
|
- identifier.class: "([A-Za-z_][A-Za-z0-9_]*:[[:space:]]*(->|\\()|->)"
|
||||||
- symbol.brackets: "[()]"
|
- symbol.brackets: "[()]"
|
||||||
- statement: "\\b(for|of|continue|break|isnt|null|unless|this|else|if|return)\\b"
|
- statement: "\\b(for|of|continue|break|isnt|null|unless|this|else|if|return)\\b"
|
||||||
- statement: "\\b(try|catch|finally|throw|new|delete|typeof|in|instanceof)\\b"
|
- statement: "\\b(try|catch|finally|throw|new|delete|typeof|in|instanceof)\\b"
|
||||||
- statement: "\\b(debugger|switch|while|do|class|extends|super)\\b"
|
- statement: "\\b(debugger|switch|while|do|class|extends|super)\\b"
|
||||||
- statement: "\\b(undefined|then|unless|until|loop|of|by|when)\\b"
|
- statement: "\\b(undefined|then|unless|until|loop|of|by|when)\\b"
|
||||||
- constant.bool: "\\b(true|false|yes|no|on|off)\\b"
|
- constant.bool: "\\b(true|false|yes|no|on|off)\\b"
|
||||||
- identifier: "@[A-Za-z0-9_]*"
|
- identifier: "@[A-Za-z0-9_]*"
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
|
||||||
- comment: "(^|[[:space:]])#([^{].*)?$"
|
- constant.string:
|
||||||
- indent-char.whitespace: "[[:space:]]+$"
|
start: "\""
|
||||||
- indent-char: " + +| + +"
|
end: "\""
|
||||||
- preproc.shebang: "#!.+$"
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "#"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
filetype: colortest
|
filetype: colortest
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "ColorTest$"
|
filename: "ColorTest$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
filetype: conf
|
filetype: conf
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.c[o]?nf$"
|
filename: "\\.c[o]?nf$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\""
|
- constant.string:
|
||||||
- comment: "^[[:space:]]*#.*$"
|
start: "\""
|
||||||
- comment: "^[[:space:]]*##.*$"
|
end: "\""
|
||||||
|
rules: []
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "#"
|
||||||
|
end: "$"
|
||||||
|
rules: []
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
filetype: conky
|
filetype: conky
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "(\\.*conkyrc.*$|conky.conf)"
|
filename: "(\\.*conkyrc.*$|conky.conf)"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- type: "\\b(alignment|append_file|background|border_inner_margin|border_outer_margin|border_width|color0|color1|color2|color3|color4|color5|color6|color7|color8|color9|colorN|cpu_avg_samples|default_bar_height|default_bar_width|default_color|default_gauge_height|default_gauge_width|default_graph_height|default_graph_width|default_outline_color|default_shade_color|diskio_avg_samples|display|double_buffer|draw_borders|draw_graph_borders|draw_outline|draw_shades|extra_newline|font|format_human_readable|gap_x|gap_y|http_refresh|if_up_strictness|imap|imlib_cache_flush_interval|imlib_cache_size|lua_draw_hook_post|lua_draw_hook_pre|lua_load|lua_shutdown_hook|lua_startup_hook|mail_spool|max_port_monitor_connections|max_text_width|max_user_text|maximum_width|minimum_height|minimum_width|mpd_host|mpd_password|mpd_port|music_player_interval|mysql_host|mysql_port|mysql_user|mysql_password|mysql_db|net_avg_samples|no_buffers|nvidia_display|out_to_console|out_to_http|out_to_ncurses|out_to_stderr|out_to_x|override_utf8_locale|overwrite_file|own_window|own_window_class|own_window_colour|own_window_hints|own_window_title|own_window_transparent|own_window_type|pad_percents|pop3|sensor_device|short_units|show_graph_range|show_graph_scale|stippled_borders|temperature_unit|template|template0|template1|template2|template3|template4|template5|template6|template7|template8|template9|text|text_buffer_size|times_in_seconds|top_cpu_separate|top_name_width|total_run_times|update_interval|update_interval_on_battery|uppercase|use_spacer|use_xft|xftalpha|xftfont)\\b"
|
- type: "\\b(alignment|append_file|background|border_inner_margin|border_outer_margin|border_width|color0|color1|color2|color3|color4|color5|color6|color7|color8|color9|colorN|cpu_avg_samples|default_bar_height|default_bar_width|default_color|default_gauge_height|default_gauge_width|default_graph_height|default_graph_width|default_outline_color|default_shade_color|diskio_avg_samples|display|double_buffer|draw_borders|draw_graph_borders|draw_outline|draw_shades|extra_newline|font|format_human_readable|gap_x|gap_y|http_refresh|if_up_strictness|imap|imlib_cache_flush_interval|imlib_cache_size|lua_draw_hook_post|lua_draw_hook_pre|lua_load|lua_shutdown_hook|lua_startup_hook|mail_spool|max_port_monitor_connections|max_text_width|max_user_text|maximum_width|minimum_height|minimum_width|mpd_host|mpd_password|mpd_port|music_player_interval|mysql_host|mysql_port|mysql_user|mysql_password|mysql_db|net_avg_samples|no_buffers|nvidia_display|out_to_console|out_to_http|out_to_ncurses|out_to_stderr|out_to_x|override_utf8_locale|overwrite_file|own_window|own_window_class|own_window_colour|own_window_hints|own_window_title|own_window_transparent|own_window_type|pad_percents|pop3|sensor_device|short_units|show_graph_range|show_graph_scale|stippled_borders|temperature_unit|template|template0|template1|template2|template3|template4|template5|template6|template7|template8|template9|text|text_buffer_size|times_in_seconds|top_cpu_separate|top_name_width|total_run_times|update_interval|update_interval_on_battery|uppercase|use_spacer|use_xft|xftalpha|xftfont)\\b"
|
||||||
|
|
||||||
|
# Configuration item constants
|
||||||
- statement: "\\b(above|below|bottom_left|bottom_right|bottom_middle|desktop|dock|no|none|normal|override|skip_pager|skip_taskbar|sticky|top_left|top_right|top_middle|middle_left|middle_right|middle_middle|undecorated|yes)\\b"
|
- statement: "\\b(above|below|bottom_left|bottom_right|bottom_middle|desktop|dock|no|none|normal|override|skip_pager|skip_taskbar|sticky|top_left|top_right|top_middle|middle_left|middle_right|middle_middle|undecorated|yes)\\b"
|
||||||
|
|
||||||
|
# Variables
|
||||||
- preproc: "\\b(acpiacadapter|acpifan|acpitemp|addr|addrs|alignc|alignr|apcupsd|apcupsd_cable|apcupsd_charge|apcupsd_lastxfer|apcupsd_linev|apcupsd_load|apcupsd_loadbar|apcupsd_loadgauge|apcupsd_loadgraph|apcupsd_model|apcupsd_name|apcupsd_status|apcupsd_temp|apcupsd_timeleft|apcupsd_upsmode|apm_adapter|apm_battery_life|apm_battery_time|audacious_bar|audacious_bitrate|audacious_channels|audacious_filename|audacious_frequency|audacious_length|audacious_length_seconds|audacious_main_volume|audacious_playlist_length|audacious_playlist_position|audacious_position|audacious_position_seconds|audacious_status|audacious_title|battery|battery_bar|battery_percent|battery_short|battery_time|blink|bmpx_album|bmpx_artist|bmpx_bitrate|bmpx_title|bmpx_track|bmpx_uri|buffers|cached|cmdline_to_pid|color|color0|color1|color2|color3|color4|color5|color6|color7|color8|color9|combine|conky_build_arch|conky_build_date|conky_version|cpu|cpubar|cpugauge|cpugraph|curl|desktop|desktop_name|desktop_number|disk_protect|diskio|diskio_read|diskio_write|diskiograph|diskiograph_read|diskiograph_write|distribution|downspeed|downspeedf|downspeedgraph|draft_mails|else|endif|entropy_avail|entropy_bar|entropy_perc|entropy_poolsize|eval|eve|exec|execbar|execgauge|execgraph|execi|execibar|execigauge|execigraph|execp|execpi|flagged_mails|font|format_time|forwarded_mails|freq|freq_g|fs_bar|fs_bar_free|fs_free|fs_free_perc|fs_size|fs_type|fs_used|fs_used_perc|goto|gw_iface|gw_ip|hddtemp|head|hr|hwmon|i2c|i8k_ac_status|i8k_bios|i8k_buttons_status|i8k_cpu_temp|i8k_left_fan_rpm|i8k_left_fan_status|i8k_right_fan_rpm|i8k_right_fan_status|i8k_serial|i8k_version|ibm_brightness|ibm_fan|ibm_temps|ibm_volume|ical|iconv_start|iconv_stop|if_empty|if_existing|if_gw|if_match|if_mixer_mute|if_mounted|if_mpd_playing|if_running|if_smapi_bat_installed|if_up|if_updatenr|if_xmms2_connected|image|imap_messages|imap_unseen|ioscheduler|irc|kernel|laptop_mode|lines|loadavg|loadgraph|lua|lua_bar|lua_gauge|lua_graph|lua_parse|machine|mails|mboxscan|mem|memwithbuffers|membar|memwithbuffersbar|memeasyfree|memfree|memgauge|memgraph|memmax|memperc|mixer|mixerbar|mixerl|mixerlbar|mixerr|mixerrbar|moc_album|moc_artist|moc_bitrate|moc_curtime|moc_file|moc_rate|moc_song|moc_state|moc_timeleft|moc_title|moc_totaltime|monitor|monitor_number|mpd_album|mpd_artist|mpd_bar|mpd_bitrate|mpd_elapsed|mpd_file|mpd_length|mpd_name|mpd_percent|mpd_random|mpd_repeat|mpd_smart|mpd_status|mpd_title|mpd_track|mpd_vol|mysql|nameserver|new_mails|nodename|nodename_short|no_update|nvidia|obsd_product|obsd_sensors_fan|obsd_sensors_temp|obsd_sensors_volt|obsd_vendor|offset|outlinecolor|pb_battery|pid_chroot|pid_cmdline|pid_cwd|pid_environ|pid_environ_list|pid_exe|pid_nice|pid_openfiles|pid_parent|pid_priority|pid_state|pid_state_short|pid_stderr|pid_stdin|pid_stdout|pid_threads|pid_thread_list|pid_time_kernelmode|pid_time_usermode|pid_time|pid_uid|pid_euid|pid_suid|pid_fsuid|pid_gid|pid_egid|pid_sgid|pid_fsgid|pid_read|pid_vmpeak|pid_vmsize|pid_vmlck|pid_vmhwm|pid_vmrss|pid_vmdata|pid_vmstk|pid_vmexe|pid_vmlib|pid_vmpte|pid_write|platform|pop3_unseen|pop3_used|processes|read_tcp|read_udp|replied_mails|rss|running_processes|running_threads|scroll|seen_mails|shadecolor|smapi|smapi_bat_bar|smapi_bat_perc|smapi_bat_power|smapi_bat_temp|sony_fanspeed|stippled_hr|stock|swap|swapbar|swapfree|swapmax|swapperc|sysname|tab|tail|tcp_ping|tcp_portmon|template0|template1|template2|template3|template4|template5|template6|template7|template8|template9|texeci|texecpi|threads|time|to_bytes|top|top_io|top_mem|top_time|totaldown|totalup|trashed_mails|tztime|gid_name|uid_name|unflagged_mails|unforwarded_mails|unreplied_mails|unseen_mails|updates|upspeed|upspeedf|upspeedgraph|uptime|uptime_short|user_names|user_number|user_terms|user_times|user_time|utime|voffset|voltage_mv|voltage_v|weather|wireless_ap|wireless_bitrate|wireless_essid|wireless_link_bar|wireless_link_qual|wireless_link_qual_max|wireless_link_qual_perc|wireless_mode|words|xmms2_album|xmms2_artist|xmms2_bar|xmms2_bitrate|xmms2_comment|xmms2_date|xmms2_duration|xmms2_elapsed|xmms2_genre|xmms2_id|xmms2_percent|xmms2_playlist|xmms2_size|xmms2_smart|xmms2_status|xmms2_timesplayed|xmms2_title|xmms2_tracknr|xmms2_url)\\b"
|
- preproc: "\\b(acpiacadapter|acpifan|acpitemp|addr|addrs|alignc|alignr|apcupsd|apcupsd_cable|apcupsd_charge|apcupsd_lastxfer|apcupsd_linev|apcupsd_load|apcupsd_loadbar|apcupsd_loadgauge|apcupsd_loadgraph|apcupsd_model|apcupsd_name|apcupsd_status|apcupsd_temp|apcupsd_timeleft|apcupsd_upsmode|apm_adapter|apm_battery_life|apm_battery_time|audacious_bar|audacious_bitrate|audacious_channels|audacious_filename|audacious_frequency|audacious_length|audacious_length_seconds|audacious_main_volume|audacious_playlist_length|audacious_playlist_position|audacious_position|audacious_position_seconds|audacious_status|audacious_title|battery|battery_bar|battery_percent|battery_short|battery_time|blink|bmpx_album|bmpx_artist|bmpx_bitrate|bmpx_title|bmpx_track|bmpx_uri|buffers|cached|cmdline_to_pid|color|color0|color1|color2|color3|color4|color5|color6|color7|color8|color9|combine|conky_build_arch|conky_build_date|conky_version|cpu|cpubar|cpugauge|cpugraph|curl|desktop|desktop_name|desktop_number|disk_protect|diskio|diskio_read|diskio_write|diskiograph|diskiograph_read|diskiograph_write|distribution|downspeed|downspeedf|downspeedgraph|draft_mails|else|endif|entropy_avail|entropy_bar|entropy_perc|entropy_poolsize|eval|eve|exec|execbar|execgauge|execgraph|execi|execibar|execigauge|execigraph|execp|execpi|flagged_mails|font|format_time|forwarded_mails|freq|freq_g|fs_bar|fs_bar_free|fs_free|fs_free_perc|fs_size|fs_type|fs_used|fs_used_perc|goto|gw_iface|gw_ip|hddtemp|head|hr|hwmon|i2c|i8k_ac_status|i8k_bios|i8k_buttons_status|i8k_cpu_temp|i8k_left_fan_rpm|i8k_left_fan_status|i8k_right_fan_rpm|i8k_right_fan_status|i8k_serial|i8k_version|ibm_brightness|ibm_fan|ibm_temps|ibm_volume|ical|iconv_start|iconv_stop|if_empty|if_existing|if_gw|if_match|if_mixer_mute|if_mounted|if_mpd_playing|if_running|if_smapi_bat_installed|if_up|if_updatenr|if_xmms2_connected|image|imap_messages|imap_unseen|ioscheduler|irc|kernel|laptop_mode|lines|loadavg|loadgraph|lua|lua_bar|lua_gauge|lua_graph|lua_parse|machine|mails|mboxscan|mem|memwithbuffers|membar|memwithbuffersbar|memeasyfree|memfree|memgauge|memgraph|memmax|memperc|mixer|mixerbar|mixerl|mixerlbar|mixerr|mixerrbar|moc_album|moc_artist|moc_bitrate|moc_curtime|moc_file|moc_rate|moc_song|moc_state|moc_timeleft|moc_title|moc_totaltime|monitor|monitor_number|mpd_album|mpd_artist|mpd_bar|mpd_bitrate|mpd_elapsed|mpd_file|mpd_length|mpd_name|mpd_percent|mpd_random|mpd_repeat|mpd_smart|mpd_status|mpd_title|mpd_track|mpd_vol|mysql|nameserver|new_mails|nodename|nodename_short|no_update|nvidia|obsd_product|obsd_sensors_fan|obsd_sensors_temp|obsd_sensors_volt|obsd_vendor|offset|outlinecolor|pb_battery|pid_chroot|pid_cmdline|pid_cwd|pid_environ|pid_environ_list|pid_exe|pid_nice|pid_openfiles|pid_parent|pid_priority|pid_state|pid_state_short|pid_stderr|pid_stdin|pid_stdout|pid_threads|pid_thread_list|pid_time_kernelmode|pid_time_usermode|pid_time|pid_uid|pid_euid|pid_suid|pid_fsuid|pid_gid|pid_egid|pid_sgid|pid_fsgid|pid_read|pid_vmpeak|pid_vmsize|pid_vmlck|pid_vmhwm|pid_vmrss|pid_vmdata|pid_vmstk|pid_vmexe|pid_vmlib|pid_vmpte|pid_write|platform|pop3_unseen|pop3_used|processes|read_tcp|read_udp|replied_mails|rss|running_processes|running_threads|scroll|seen_mails|shadecolor|smapi|smapi_bat_bar|smapi_bat_perc|smapi_bat_power|smapi_bat_temp|sony_fanspeed|stippled_hr|stock|swap|swapbar|swapfree|swapmax|swapperc|sysname|tab|tail|tcp_ping|tcp_portmon|template0|template1|template2|template3|template4|template5|template6|template7|template8|template9|texeci|texecpi|threads|time|to_bytes|top|top_io|top_mem|top_time|totaldown|totalup|trashed_mails|tztime|gid_name|uid_name|unflagged_mails|unforwarded_mails|unreplied_mails|unseen_mails|updates|upspeed|upspeedf|upspeedgraph|uptime|uptime_short|user_names|user_number|user_terms|user_times|user_time|utime|voffset|voltage_mv|voltage_v|weather|wireless_ap|wireless_bitrate|wireless_essid|wireless_link_bar|wireless_link_qual|wireless_link_qual_max|wireless_link_qual_perc|wireless_mode|words|xmms2_album|xmms2_artist|xmms2_bar|xmms2_bitrate|xmms2_comment|xmms2_date|xmms2_duration|xmms2_elapsed|xmms2_genre|xmms2_id|xmms2_percent|xmms2_playlist|xmms2_size|xmms2_smart|xmms2_status|xmms2_timesplayed|xmms2_title|xmms2_tracknr|xmms2_url)\\b"
|
||||||
|
|
||||||
- identifier.var: "\\$\\{?[0-9A-Z_!@#$*?-]+\\}?"
|
- identifier.var: "\\$\\{?[0-9A-Z_!@#$*?-]+\\}?"
|
||||||
- symbol.operator: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|!|=|&|\\|)"
|
- symbol.operator: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|!|=|&|\\|)"
|
||||||
- constant.macro: "^TEXT$"
|
- constant.macro: "^TEXT$"
|
||||||
|
|||||||
@@ -15,15 +15,16 @@ rules:
|
|||||||
- preproc: "^[[:space:]]*#[[:space:]]*(define|pragma|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
|
- preproc: "^[[:space:]]*#[[:space:]]*(define|pragma|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
|
||||||
- constant: "('([^'\\\\]|(\\\\[\"'abfnrtv\\\\]))'|'\\\\(([0-3]?[0-7]{1,2}))'|'\\\\x[0-9A-Fa-f]{1,2}')"
|
- constant: "('([^'\\\\]|(\\\\[\"'abfnrtv\\\\]))'|'\\\\(([0-3]?[0-7]{1,2}))'|'\\\\x[0-9A-Fa-f]{1,2}')"
|
||||||
|
|
||||||
##
|
# GCC builtins
|
||||||
## GCC builtins
|
|
||||||
- statement: "(__attribute__[[:space:]]*\\(\\([^)]*\\)\\)|__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__)"
|
- statement: "(__attribute__[[:space:]]*\\(\\([^)]*\\)\\)|__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__)"
|
||||||
|
|
||||||
#Operator Color
|
# Operator Color
|
||||||
- statement: "([.:;,+*|=!\\%]|<|>|/|-|&)"
|
- symbol.operator: "([.:;,+*|=!\\%]|<|>|/|-|&)"
|
||||||
|
# Parenthetical Color
|
||||||
|
- symbol.brackets: "[(){}]|\\[|\\]"
|
||||||
|
|
||||||
- constant.number: "(\\b[0-9]+\\b|\\b0x[0-9A-Fa-f]+\\b)"
|
- constant.number: "(\\b[0-9]+\\b|\\b0x[0-9A-Fa-f]+\\b)"
|
||||||
- constant.number: "(\\b(true|false)\\b|NULL)"
|
- constant.bool: "(\\b(true|false)\\b|NULL)"
|
||||||
|
|
||||||
- constant.string:
|
- constant.string:
|
||||||
start: "\""
|
start: "\""
|
||||||
|
|||||||
@@ -1,25 +1,60 @@
|
|||||||
filetype: crystal
|
filetype: crystal
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.cr$|Gemfile|config.ru|Rakefile|Capfile|Vagrantfile"
|
filename: "\\.cr$|Gemfile|config.ru|Rakefile|Capfile|Vagrantfile"
|
||||||
header: "^#!.*/(env +)?crystal( |$)"
|
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
|
# Asciibetical list of reserved words
|
||||||
- statement: "\\b(BEGIN|END|abstract|alias|and|begin|break|case|class|def|defined\\?|do|else|elsif|end|ensure|enum|false|for|fun|if|in|include|lib|loop|macro|module|next|nil|not|of|or|pointerof|private|protected|raise|redo|require|rescue|retry|return|self|sizeof|spawn|struct|super|then|true|type|undef|union|uninitialized|unless|until|when|while|yield)\\b"
|
- statement: "\\b(BEGIN|END|abstract|alias|and|begin|break|case|class|def|defined\\?|do|else|elsif|end|ensure|enum|false|for|fun|if|in|include|lib|loop|macro|module|next|nil|not|of|or|pointerof|private|protected|raise|redo|require|rescue|retry|return|self|sizeof|spawn|struct|super|then|true|type|undef|union|uninitialized|unless|until|when|while|yield)\\b"
|
||||||
|
# Constants
|
||||||
- constant: "(\\$|@|@@)?\\b[A-Z]+[0-9A-Z_a-z]*"
|
- constant: "(\\$|@|@@)?\\b[A-Z]+[0-9A-Z_a-z]*"
|
||||||
- constant.number: "\\b[0-9]+\\b"
|
- constant.number: "\\b[0-9]+\\b"
|
||||||
- constant: "([ ]|^):[0-9A-Z_]+\\b"
|
# Crystal "symbols"
|
||||||
|
- constant: "([ ]|^):[0-9A-Z_]+\\b"
|
||||||
|
# Some unique things we want to stand out
|
||||||
- constant: "\\b(__FILE__|__LINE__)\\b"
|
- constant: "\\b(__FILE__|__LINE__)\\b"
|
||||||
|
# Regular expressions
|
||||||
- constant: "/([^/]|(\\\\/))*/[iomx]*|%r\\{([^}]|(\\\\}))*\\}[iomx]*"
|
- constant: "/([^/]|(\\\\/))*/[iomx]*|%r\\{([^}]|(\\\\}))*\\}[iomx]*"
|
||||||
|
|
||||||
|
# Shell command expansion is in `backticks` or like %x{this}. These are
|
||||||
|
# "double-quotish" (to use a perlism).
|
||||||
- constant.string: "`[^`]*`|%x\\{[^}]*\\}"
|
- constant.string: "`[^`]*`|%x\\{[^}]*\\}"
|
||||||
- constant.string: "\"([^\"]|(\\\\\"))*\"|%[QW]?\\{[^}]*\\}|%[QW]?\\([^)]*\\)|%[QW]?<[^>]*>|%[QW]?\\[[^]]*\\]|%[QW]?\\$[^$]*\\$|%[QW]?\\^[^^]*\\^|%[QW]?![^!]*!"
|
|
||||||
- special: "#\\{[^}]*\\}"
|
- constant.string:
|
||||||
- constant.string.char: "'([^']|(\\\\'))*'|%[qw]\\{[^}]*\\}|%[qw]\\([^)]*\\)|%[qw]<[^>]*>|%[qw]\\[[^]]*\\]|%[qw]\\$[^$]*\\$|%[qw]\\^[^^]*\\^|%[qw]![^!]*!"
|
start: "`"
|
||||||
- comment: "#[^{].*$|#$"
|
end: "`"
|
||||||
- comment.bright: "##[^{].*$|##$"
|
rules: []
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "%x\\{"
|
||||||
|
end: "\\}"
|
||||||
|
rules: []
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialchar: "\\\\."
|
||||||
|
- special: "#\\{[^}]*\\}"
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules: []
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "#"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|
||||||
|
- comment.bright:
|
||||||
|
start: "##"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|
||||||
- constant:
|
- constant:
|
||||||
start: "<<-?'?EOT'?"
|
start: "<<-?'?EOT'?"
|
||||||
end: "^EOT"
|
end: "^EOT"
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
- todo: "(XXX|TODO|FIXME|\\?\\?\\?)"
|
|
||||||
|
|||||||
@@ -1,29 +1,48 @@
|
|||||||
filetype: c#
|
filetype: csharp
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.cs$"
|
filename: "\\.cs"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
|
# Class
|
||||||
- identifier.class: "class +[A-Za-z0-9]+ *((:) +[A-Za-z0-9.]+)?"
|
- identifier.class: "class +[A-Za-z0-9]+ *((:) +[A-Za-z0-9.]+)?"
|
||||||
|
|
||||||
|
# Annotation
|
||||||
- identifier.var: "@[A-Za-z]+"
|
- identifier.var: "@[A-Za-z]+"
|
||||||
|
|
||||||
- identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
|
- identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
|
||||||
- type: "\\b(bool|byte|sbyte|char|decimal|double|float|IntPtr|int|uint|long|ulong|object|short|ushort|string|base|this|var|void)\\b"
|
- type: "\\b(bool|byte|sbyte|char|decimal|double|float|IntPtr|int|uint|long|ulong|object|short|ushort|string|base|this|var|void)\\b"
|
||||||
- statement: "\\b(alias|as|case|catch|checked|default|do|dynamic|else|finally|fixed|for|foreach|goto|if|is|lock|new|null|return|switch|throw|try|unchecked|while)\\b"
|
- statement: "\\b(alias|as|case|catch|checked|default|do|dynamic|else|finally|fixed|for|foreach|goto|if|is|lock|new|null|return|switch|throw|try|unchecked|while)\\b"
|
||||||
- statement: "\\b(abstract|async|class|const|delegate|enum|event|explicit|extern|get|implicit|in|internal|interface|namespace|operator|out|override|params|partial|private|protected|public|readonly|ref|sealed|set|sizeof|stackalloc|static|struct|typeof|unsafe|using|value|virtual|volatile|yield)\\b"
|
- statement: "\\b(abstract|async|class|const|delegate|enum|event|explicit|extern|get|implicit|in|internal|interface|namespace|operator|out|override|params|partial|private|protected|public|readonly|ref|sealed|set|sizeof|stackalloc|static|struct|typeof|unsafe|using|value|virtual|volatile|yield)\\b"
|
||||||
|
# LINQ-only keywords (ones that cannot be used outside of a LINQ query - lots others can)
|
||||||
- statement: "\\b(from|where|select|group|info|orderby|join|let|in|on|equals|by|ascending|descending)\\b"
|
- statement: "\\b(from|where|select|group|info|orderby|join|let|in|on|equals|by|ascending|descending)\\b"
|
||||||
- special: "\\b(break|continue)\\b"
|
- special: "\\b(break|continue)\\b"
|
||||||
- constant.bool: "\\b(true|false)\\b"
|
- constant.bool: "\\b(true|false)\\b"
|
||||||
- symbol.operator: "[\\-+/*=<>?:!~%&|]"
|
- symbol.operator: "[\\-+/*=<>?:!~%&|]"
|
||||||
- constant.number: "\\b([0-9._]+|0x[A-Fa-f0-9_]+|0b[0-1_]+)[FL]?\\b"
|
- constant.number: "\\b([0-9._]+|0x[A-Fa-f0-9_]+|0b[0-1_]+)[FL]?\\b"
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
|
||||||
- constant.specialChar: "\\\\([btnfr]|'|\\\"|\\\\)"
|
- constant.string:
|
||||||
- constant.specialChar: "\\\\u[A-Fa-f0-9]{4}"
|
start: "\""
|
||||||
- comment: "(^|[[:space:]])//.*"
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\([btnfr]|'|\\\"|\\\\)"
|
||||||
|
- constant.specialChar: "\\\\u[A-Fa-f0-9]{4}"
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\([btnfr]|'|\\\"|\\\\)"
|
||||||
|
- constant.specialChar: "\\\\u[A-Fa-f0-9]{4}"
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "//"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "/\\*"
|
start: "/\\*"
|
||||||
end: "\\*/"
|
end: "\\*/"
|
||||||
rules: []
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
- todo: "TODO:?"
|
|
||||||
- indent-char.whitespace: "[[:space:]]+$"
|
|
||||||
- indent-char: " + +| + +"
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,23 +1,49 @@
|
|||||||
filetype: cython
|
filetype: cython
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.pyx$|\\.pxd$|\\.pyi$"
|
filename: "\\.pyx$|\\.pxd$|\\.pyi$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- preproc: "def [ 0-9A-Z_]+"
|
# Python Keyword Color
|
||||||
- preproc: "cpdef [0-9A-Z_]+\\(.*\\):"
|
|
||||||
- preproc: "cdef cppclass [ 0-9A-Z_]+\\(.*\\):"
|
|
||||||
- statement: "\\b(and|as|assert|class|def|DEF|del|elif|ELIF|else|ELSE|except|exec|finally|for|from|global|if|IF|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with|yield)\\b"
|
- statement: "\\b(and|as|assert|class|def|DEF|del|elif|ELIF|else|ELSE|except|exec|finally|for|from|global|if|IF|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with|yield)\\b"
|
||||||
- special: "\\b(continue|break|return)\\b"
|
- special: "\\b(continue|break|return)\\b"
|
||||||
|
|
||||||
|
# Cython Keyword Color
|
||||||
- identifier.macro: "\\b(cdef|cimport|cpdef|cppclass|ctypedef|extern|include|namespace|property|struct)\\b"
|
- identifier.macro: "\\b(cdef|cimport|cpdef|cppclass|ctypedef|extern|include|namespace|property|struct)\\b"
|
||||||
- type: "\\b(bint|char|double|int|public|void|unsigned)\\b"
|
- type: "\\b(bint|char|double|int|public|void|unsigned)\\b"
|
||||||
- symbol: "[.:;,+*|=!\\%]|<|>|/|-|&"
|
|
||||||
- symbol.brackets: "[(){}]|\\[|\\]"
|
|
||||||
- constant.string: "['][^']*[^\\\\][']|[']{3}.*[^\\\\][']{3}"
|
|
||||||
- constant.string: "[\"][^\"]*[^\\\\][\"]|[\"]{3}.*[^\\\\][\"]{3}"
|
|
||||||
- constant.string:
|
|
||||||
start: "\"\"\"[^\"]\" end=\"\"\"\"\" start=\"'''[^']"
|
|
||||||
end: "'''"
|
|
||||||
rules: []
|
|
||||||
|
|
||||||
- comment: "#.*$"
|
# Operator Color
|
||||||
|
- symbol: "[.:;,+*|=!\\%]|<|>|/|-|&"
|
||||||
|
|
||||||
|
# Parenthetical Color
|
||||||
|
- symbol.brackets: "[(){}]|\\[|\\]"
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "\"\"\""
|
||||||
|
end: "\"\"\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'''"
|
||||||
|
end: "'''"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "#"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|||||||
@@ -1,57 +1,118 @@
|
|||||||
filetype: d
|
filetype: d
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.(d(i|d)?)$"
|
filename: "\\.(d(i|d)?)$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
|
# Operators and punctuation
|
||||||
- statement: "(\\*|/|%|\\+|-|>>|<<|>>>|&|\\^(\\^)?|\\||~)?="
|
- statement: "(\\*|/|%|\\+|-|>>|<<|>>>|&|\\^(\\^)?|\\||~)?="
|
||||||
- statement: "\\.\\.(\\.)?|!|\\*|&|~|\\(|\\)|\\[|\\]|\\\\|/|\\+|-|%|<|>|\\?|:|;"
|
- statement: "\\.\\.(\\.)?|!|\\*|&|~|\\(|\\)|\\[|\\]|\\\\|/|\\+|-|%|<|>|\\?|:|;"
|
||||||
|
# Octal integer literals are deprecated
|
||||||
- error: "(0[0-7_]*)(L[uU]?|[uU]L?)?"
|
- error: "(0[0-7_]*)(L[uU]?|[uU]L?)?"
|
||||||
|
# Decimal integer literals
|
||||||
- constant.number: "([0-9]|[1-9][0-9_]*)(L[uU]?|[uU]L?)?"
|
- constant.number: "([0-9]|[1-9][0-9_]*)(L[uU]?|[uU]L?)?"
|
||||||
|
# Binary integer literals
|
||||||
- constant: "(0[bB][01_]*)(L[uU]?|[uU]L?)?"
|
- constant: "(0[bB][01_]*)(L[uU]?|[uU]L?)?"
|
||||||
|
# Decimal float literals
|
||||||
- constant.number: "[0-9][0-9_]*\\.([0-9][0-9_]*)([eE][+-]?([0-9][0-9_]*))?[fFL]?i?"
|
- constant.number: "[0-9][0-9_]*\\.([0-9][0-9_]*)([eE][+-]?([0-9][0-9_]*))?[fFL]?i?"
|
||||||
- constant.number: "[0-9][0-9_]*([eE][+-]?([0-9][0-9_]*))[fFL]?i?"
|
- constant.number: "[0-9][0-9_]*([eE][+-]?([0-9][0-9_]*))[fFL]?i?"
|
||||||
- constant.number: "[^.]\\.([0-9][0-9_]*)([eE][+-]?([0-9][0-9_]*))?[fFL]?i?"
|
- constant.number: "[^.]\\.([0-9][0-9_]*)([eE][+-]?([0-9][0-9_]*))?[fFL]?i?"
|
||||||
- constant.number: "[0-9][0-9_]*([fFL]?i|[fF])"
|
- constant.number: "[0-9][0-9_]*([fFL]?i|[fF])"
|
||||||
|
# Hexadecimal integer literals
|
||||||
- constant.number: "(0[xX]([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F]))(L[uU]?|[uU]L?)?"
|
- constant.number: "(0[xX]([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F]))(L[uU]?|[uU]L?)?"
|
||||||
|
# Hexadecimal float literals
|
||||||
- constant.number: "0[xX]([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])(\\.[0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])?[pP][+-]?([0-9][0-9_]*)[fFL]?i?"
|
- constant.number: "0[xX]([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])(\\.[0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])?[pP][+-]?([0-9][0-9_]*)[fFL]?i?"
|
||||||
- constant.number: "0[xX]\\.([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])[pP][+-]?([0-9][0-9_]*)[fFL]?i?"
|
- constant.number: "0[xX]\\.([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])[pP][+-]?([0-9][0-9_]*)[fFL]?i?"
|
||||||
- constant.string: "'([^\\']|\\\\(['\"?\\abfnrtv]|x[[:xdigit:]]{2}|[0-7]{1,3}|u[[:xdigit:]]{4}|U[[:xdigit:]]{8}|&.*;))'"
|
# Character literals
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
# Keywords
|
||||||
|
# a-e
|
||||||
- statement: "\\b(abstract|alias|align|asm|assert|auto|body|break|case|cast|catch|class|const|continue|debug|default|delegate|do|else|enum|export|extern)\\b"
|
- statement: "\\b(abstract|alias|align|asm|assert|auto|body|break|case|cast|catch|class|const|continue|debug|default|delegate|do|else|enum|export|extern)\\b"
|
||||||
|
# f-l
|
||||||
- statement: "\\b(false|final|finally|for|foreach|foreach_reverse|function|goto|if|immutable|import|in|inout|interface|invariant|is|lazy)\\b"
|
- statement: "\\b(false|final|finally|for|foreach|foreach_reverse|function|goto|if|immutable|import|in|inout|interface|invariant|is|lazy)\\b"
|
||||||
|
# m-r
|
||||||
- statement: "\\b(macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|public|pure|ref|return)\\b"
|
- statement: "\\b(macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|public|pure|ref|return)\\b"
|
||||||
|
# s-w
|
||||||
- statement: "\\b(scope|shared|static|struct|super|switch|synchronized|template|this|throw|true|try|typeid|typeof|union|unittest|version|while|with)\\b"
|
- statement: "\\b(scope|shared|static|struct|super|switch|synchronized|template|this|throw|true|try|typeid|typeof|union|unittest|version|while|with)\\b"
|
||||||
|
# __
|
||||||
- statement: "\\b(__FILE__|__MODULE__|__LINE__|__FUNCTION__|__PRETTY_FUNCTION__|__gshared|__traits|__vector|__parameters)\\b"
|
- statement: "\\b(__FILE__|__MODULE__|__LINE__|__FUNCTION__|__PRETTY_FUNCTION__|__gshared|__traits|__vector|__parameters)\\b"
|
||||||
|
# Deprecated keywords
|
||||||
- error: "\\b(delete|deprecated|typedef|volatile)\\b"
|
- error: "\\b(delete|deprecated|typedef|volatile)\\b"
|
||||||
|
# Primitive types
|
||||||
- type: "\\b(bool|byte|cdouble|cent|cfloat|char|creal|dchar|double|float|idouble|ifloat|int|ireal|long|real|short|ubyte|ucent|uint|ulong|ushort|void|wchar)\\b"
|
- type: "\\b(bool|byte|cdouble|cent|cfloat|char|creal|dchar|double|float|idouble|ifloat|int|ireal|long|real|short|ubyte|ucent|uint|ulong|ushort|void|wchar)\\b"
|
||||||
|
# Globally defined symbols
|
||||||
- type: "\\b(string|wstring|dstring|size_t|ptrdiff_t)\\b"
|
- type: "\\b(string|wstring|dstring|size_t|ptrdiff_t)\\b"
|
||||||
|
# Special tokens
|
||||||
- constant: "\\b(__DATE__|__EOF__|__TIME__|__TIMESTAMP__|__VENDOR__|__VERSION__)\\b"
|
- constant: "\\b(__DATE__|__EOF__|__TIME__|__TIMESTAMP__|__VENDOR__|__VERSION__)\\b"
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\""
|
# String literals
|
||||||
|
# DoubleQuotedString
|
||||||
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
# WysiwygString
|
||||||
- constant.string:
|
- constant.string:
|
||||||
start: "r\""
|
start: "r\""
|
||||||
end: "\""
|
end: "\""
|
||||||
rules: []
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
- constant.string: "`[^`]*`"
|
- constant.string:
|
||||||
- constant.string: "x\"([[:space:]]*[[:xdigit:]][[:space:]]*[[:xdigit:]])*[[:space:]]*\""
|
start: "`"
|
||||||
- constant.string: "q\"\\(.*\\)\""
|
end: "`"
|
||||||
- constant.string: "q\"\\{.*\\}\""
|
rules:
|
||||||
- constant.string: "q\"\\[.*\\]\""
|
- constant.specialChar: "\\\\."
|
||||||
- constant.string: "q\"<.*>\""
|
# HexString
|
||||||
|
- constant.string:
|
||||||
|
start: "x\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
# DelimitedString
|
||||||
|
- constant.string:
|
||||||
|
start: "q\"\\("
|
||||||
|
end: "\\)\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
- constant.string:
|
||||||
|
start: "q\"\\{"
|
||||||
|
end: "q\"\\}"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
- constant.string:
|
||||||
|
start: "q\"\\["
|
||||||
|
end: "q\"\\]"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
- constant.string:
|
||||||
|
start: "q\"<"
|
||||||
|
end: "q\">"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
- constant.string:
|
- constant.string:
|
||||||
start: "q\"[^({[<\"][^\"]*$"
|
start: "q\"[^({[<\"][^\"]*$"
|
||||||
end: "^[^\"]+\""
|
end: "^[^\"]+\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
- constant.string:
|
||||||
|
start: "q\"([^({[<\"])"
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
# Comments
|
||||||
|
- comment:
|
||||||
|
start: "//"
|
||||||
|
end: "$"
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
- constant.string: "q\"([^({[<\"]).*\""
|
|
||||||
- comment: "//.*"
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "/\\*"
|
start: "/\\*"
|
||||||
end: "\\*/"
|
end: "\\*/"
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "/\\+"
|
start: "/\\+"
|
||||||
end: "\\+/"
|
end: "\\+/"
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
filetype: dart
|
filetype: dart
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.dart$"
|
filename: "\\.dart$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
@@ -11,13 +11,33 @@ rules:
|
|||||||
- statement: "\\b(break|case|catch|continue|default|else|finally)\\b"
|
- statement: "\\b(break|case|catch|continue|default|else|finally)\\b"
|
||||||
- statement: "\\b(for|function|get|if|in|as|is|new|return|set|switch|final|await|async|sync)\\b"
|
- statement: "\\b(for|function|get|if|in|as|is|new|return|set|switch|final|await|async|sync)\\b"
|
||||||
- statement: "\\b(switch|this|throw|try|var|void|while|with|import|library|part|const|export)\\b"
|
- statement: "\\b(switch|this|throw|try|var|void|while|with|import|library|part|const|export)\\b"
|
||||||
- constant.bool: "\\b(true|false|null)\\b"
|
- constant: "\\b(true|false|null)\\b"
|
||||||
- type: "\\b(List|String)\\b"
|
- type: "\\b(List|String)\\b"
|
||||||
- type: "\\b(int|num|double|bool)\\b"
|
- type: "\\b(int|num|double|bool)\\b"
|
||||||
- symbol.operator: "[-+/*=<>!~%?:&|]"
|
- statement: "[-+/*=<>!~%?:&|]"
|
||||||
- constant: "/[^*]([^/]|(\\\\/))*[^\\\\]/[gim]*"
|
- constant: "/[^*]([^/]|(\\\\/))*[^\\\\]/[gim]*"
|
||||||
- constant: "\\\\[0-7][0-7]?[0-7]?|\\\\x[0-9a-fA-F]+|\\\\[bfnrt'\"\\?\\\\]"
|
- constant: "\\\\[0-7][0-7]?[0-7]?|\\\\x[0-9a-fA-F]+|\\\\[bfnrt'\"\\?\\\\]"
|
||||||
- comment: "(^|[[:space:]])//.*"
|
|
||||||
- comment: "/\\*.+\\*/"
|
- comment:
|
||||||
- todo: "TODO:?"
|
start: "//"
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "TODO:?"
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "/\\*"
|
||||||
|
end: "\\*/"
|
||||||
|
rules:
|
||||||
|
- todo: "TODO:?"
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|||||||
@@ -1,12 +1,33 @@
|
|||||||
filetype: dockerfile
|
filetype: dockerfile
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "Dockerfile[^/]*$|\\.dockerfile$"
|
filename: "(Dockerfile[^/]*$|\\.dockerfile$)"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- statement: "^(FROM|MAINTAINER|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD|ARG|HEALTHCHECK|STOPSIGNAL|SHELL)[[:space:]]"
|
## Keywords
|
||||||
- symbol.brackets: "(\\(|\\)|\\[|\\])"
|
- keyword: "(?i)^(FROM|MAINTAINER|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD|ARG|HEALTHCHECK|STOPSIGNAL|SHELL)[[:space:]]"
|
||||||
|
|
||||||
|
## Brackets & parenthesis
|
||||||
|
- statement: "(\\(|\\)|\\[|\\])"
|
||||||
|
|
||||||
|
## Double ampersand
|
||||||
- special: "&&"
|
- special: "&&"
|
||||||
- comment: "^[[:space:]]*#.*$"
|
|
||||||
- constant.string: "'([^']|(\\\\'))*'|%[qw]\\{[^}]*\\}|%[qw]\\([^)]*\\)|%[qw]<[^>]*>|%[qw]\\[[^]]*\\]|%[qw]\\$[^$]*\\$|%[qw]\\^[^^]*\\^|%[qw]![^!]*!"
|
## Comments
|
||||||
- constant.string: "\"([^\"]|(\\\\\"))*\"|%[QW]?\\{[^}]*\\}|%[QW]?\\([^)]*\\)|%[QW]?<[^>]*>|%[QW]?\\[[^]]*\\]|%[QW]?\\$[^$]*\\$|%[QW]?\\^[^^]*\\^|%[QW]?![^!]*!"
|
- comment:
|
||||||
|
start: "#"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|||||||
@@ -1,16 +1,27 @@
|
|||||||
filetype: dot
|
filetype: dot
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.(dot|gv)$"
|
filename: "\\.(dot|gv)$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- type: "\\b(digraph|edge|graph|node|subgraph)\\b"
|
- type: "\\b(digraph|edge|graph|node|subgraph)\\b"
|
||||||
- statement: "\\b(arrow(head|size|tail)|(bg|fill|font)?color|center|constraint|decorateP|dir|distortion|font(name|size)|head(clip|label)|height|label(angle|distance|font(color|name|size))?|layer(s)?|margin|mclimit|minlen|name|nodesep|nslimit|ordering|orientation|page(dir)?|peripheries|port_label_distance|rank(dir|sep)?|ratio|regular|rotate|same(head|tail)|shape(file)?|sides|size|skew|style|tail(clip|label)|URL|weight|width)\\b"
|
- statement: "\\b(arrow(head|size|tail)|(bg|fill|font)?color|center|constraint|decorateP|dir|distortion|font(name|size)|head(clip|label)|height|label(angle|distance|font(color|name|size))?|layer(s)?|margin|mclimit|minlen|name|nodesep|nslimit|ordering|orientation|page(dir)?|peripheries|port_label_distance|rank(dir|sep)?|ratio|regular|rotate|same(head|tail)|shape(file)?|sides|size|skew|style|tail(clip|label)|URL|weight|width)\\b"
|
||||||
- symbol: "=|->|--"
|
- symbol: "=|->|--"
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
|
||||||
- comment: "(^|[[:space:]])//.*"
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "//"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "/\\*"
|
start: "/\\*"
|
||||||
end: "\\*/"
|
end: "\\*/"
|
||||||
rules: []
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|||||||
@@ -1,25 +1,45 @@
|
|||||||
filetype: fish
|
filetype: fish
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.fish$"
|
filename: "\\.fish$"
|
||||||
header: "^#!.*/(env +)?fish( |$)"
|
header: "^#!.*/(env +)?fish( |$)"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- constant.number: "\\b[0-9]+\\b"
|
# Numbers
|
||||||
- statement: "\\b(and|begin|case|else|end|for|function|if|in|not|or|select|shift|switch|while)\\b"
|
- constant: "\\b[0-9]+\\b"
|
||||||
- special: "\\b(break|continue|return)\\b"
|
|
||||||
- symbol: "(\\;|`|\\\\|\\$|<|>|^|!|=|&|\\|)"
|
# Conditionals and control flow
|
||||||
- symbol.brackets: "\\{|\\}|\\(|\\)|\\[|\\]"
|
- statement: "\\b(and|begin|break|case|continue|else|end|for|function|if|in|not|or|return|select|shift|switch|while)\\b"
|
||||||
|
- special: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|^|!|=|&|\\|)"
|
||||||
|
|
||||||
|
# Fish commands
|
||||||
- type: "\\b(bg|bind|block|breakpoint|builtin|cd|count|command|commandline|complete|dirh|dirs|echo|emit|eval|exec|exit|fg|fish|fish_config|fish_ident|fish_pager|fish_prompt|fish_right_prompt|fish_update_completions|fishd|funced|funcsave|functions|help|history|jobs|math|mimedb|nextd|open|popd|prevd|psub|pushd|pwd|random|read|set|set_color|source|status|string|trap|type|ulimit|umask|vared)\\b"
|
- type: "\\b(bg|bind|block|breakpoint|builtin|cd|count|command|commandline|complete|dirh|dirs|echo|emit|eval|exec|exit|fg|fish|fish_config|fish_ident|fish_pager|fish_prompt|fish_right_prompt|fish_update_completions|fishd|funced|funcsave|functions|help|history|jobs|math|mimedb|nextd|open|popd|prevd|psub|pushd|pwd|random|read|set|set_color|source|status|string|trap|type|ulimit|umask|vared)\\b"
|
||||||
|
|
||||||
|
# Common linux commands
|
||||||
- type: "\\b((g|ig)?awk|bash|dash|find|\\w{0,4}grep|kill|killall|\\w{0,4}less|make|pkill|sed|sh|tar)\\b"
|
- type: "\\b((g|ig)?awk|bash|dash|find|\\w{0,4}grep|kill|killall|\\w{0,4}less|make|pkill|sed|sh|tar)\\b"
|
||||||
|
|
||||||
|
# Coreutils commands
|
||||||
- type: "\\b(base64|basename|cat|chcon|chgrp|chmod|chown|chroot|cksum|comm|cp|csplit|cut|date|dd|df|dir|dircolors|dirname|du|env|expand|expr|factor|false|fmt|fold|head|hostid|id|install|join|link|ln|logname|ls|md5sum|mkdir|mkfifo|mknod|mktemp|mv|nice|nl|nohup|nproc|numfmt|od|paste|pathchk|pinky|pr|printenv|printf|ptx|pwd|readlink|realpath|rm|rmdir|runcon|seq|(sha1|sha224|sha256|sha384|sha512)sum|shred|shuf|sleep|sort|split|stat|stdbuf|stty|sum|sync|tac|tail|tee|test|time|timeout|touch|tr|true|truncate|tsort|tty|uname|unexpand|uniq|unlink|users|vdir|wc|who|whoami|yes)\\b"
|
- type: "\\b(base64|basename|cat|chcon|chgrp|chmod|chown|chroot|cksum|comm|cp|csplit|cut|date|dd|df|dir|dircolors|dirname|du|env|expand|expr|factor|false|fmt|fold|head|hostid|id|install|join|link|ln|logname|ls|md5sum|mkdir|mkfifo|mknod|mktemp|mv|nice|nl|nohup|nproc|numfmt|od|paste|pathchk|pinky|pr|printenv|printf|ptx|pwd|readlink|realpath|rm|rmdir|runcon|seq|(sha1|sha224|sha256|sha384|sha512)sum|shred|shuf|sleep|sort|split|stat|stdbuf|stty|sum|sync|tac|tail|tee|test|time|timeout|touch|tr|true|truncate|tsort|tty|uname|unexpand|uniq|unlink|users|vdir|wc|who|whoami|yes)\\b"
|
||||||
|
|
||||||
|
# Conditional flags
|
||||||
- statement: "--[a-z-]+"
|
- statement: "--[a-z-]+"
|
||||||
- statement: "\\ -[a-z]+"
|
- statement: "\\ -[a-z]+"
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\""
|
|
||||||
- constant.string: "'(\\\\.|[^'])*'"
|
- identifier: "(?i)\\$\\{?[0-9A-Z_!@#$*?-]+\\}?"
|
||||||
- constant.specialChar: "\""
|
|
||||||
- constant.specialChar: "'"
|
- constant.string:
|
||||||
- identifier: "\\$\\{?[0-9A-Za-z_!@#$*?-]+\\}?"
|
start: "\""
|
||||||
- comment: "(^|[[:space:]])#.*$"
|
end: "\""
|
||||||
- todo: "(TODO|XXX|FIXME):?"
|
rules:
|
||||||
- preproc.shebang: "^#!.+?( |$)"
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules: []
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "#"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|||||||
@@ -1,37 +1,60 @@
|
|||||||
filetype: fortran
|
filetype: fortran
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.([Ff]|[Ff]90|[Ff]95|[Ff][Oo][Rr])$"
|
filename: "\\.([Ff]|[Ff]90|[Ff]95|[Ff][Oo][Rr])$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- constant.number: "\\b[0-9]+\\b"
|
- type: "(?i)\\b(action|advance|all|allocatable|allocated|any|apostrophe)\\b"
|
||||||
- type: "(?i)\\b(action|advance|all|allocatable|allocated|any|apostrophe)\\b"
|
- type: "(?i)\\b(append|asis|assign|assignment|associated|character|common)\\b"
|
||||||
- type: "(?i)\\b(append|asis|assign|assignment|associated|character|common)\\b"
|
- type: "(?i)\\b(complex|data|default|delim|dimension|double precision)\\b"
|
||||||
- type: "(?i)\\b(complex|data|default|delim|dimension|double precision)\\b"
|
- type: "(?i)\\b(elemental|epsilon|external|file|fmt|form|format|huge)\\b"
|
||||||
- type: "(?i)\\b(elemental|epsilon|external|file|fmt|form|format|huge)\\b"
|
- type: "(?i)\\b(implicit|include|index|inquire|integer|intent|interface)\\b"
|
||||||
- type: "(?i)\\b(implicit|include|index|inquire|integer|intent|interface)\\b"
|
- type: "(?i)\\b(intrinsic|iostat|kind|logical|module|none|null|only)\\\\b"
|
||||||
- type: "(?i)\\b(intrinsic|iostat|kind|logical|module|none|null|only)\\\\b"
|
- type: "(?i)\\b(operator|optional|pack|parameter|pointer|position|private)\\b"
|
||||||
- type: "(?i)\\b(operator|optional|pack|parameter|pointer|position|private)\\b"
|
- type: "(?i)\\b(program|public|real|recl|recursive|selected_int_kind)\\b"
|
||||||
- type: "(?i)\\b(program|public|real|recl|recursive|selected_int_kind)\\b"
|
- type: "(?i)\\b(selected_real_kind|subroutine|status)\\b"
|
||||||
- type: "(?i)\\b(selected_real_kind|subroutine|status)\\b"
|
|
||||||
- constant: "(?i)\\b(abs|achar|adjustl|adjustr|allocate|bit_size|call|char)\\b"
|
- constant: "(?i)\\b(abs|achar|adjustl|adjustr|allocate|bit_size|call|char)\\b"
|
||||||
- constant: "(?i)\\b(close|contains|count|cpu_time|cshift|date_and_time)\\b"
|
- constant: "(?i)\\b(close|contains|count|cpu_time|cshift|date_and_time)\\b"
|
||||||
- constant: "(?i)\\b(deallocate|digits|dot_product|eor|eoshift|function|iachar)\\b"
|
- constant: "(?i)\\b(deallocate|digits|dot_product|eor|eoshift|function|iachar)\\b"
|
||||||
- constant: "(?i)\\b(iand|ibclr|ibits|ibset|ichar|ieor|iolength|ior|ishft|ishftc)\\b"
|
- constant: "(?i)\\b(iand|ibclr|ibits|ibset|ichar|ieor|iolength|ior|ishft|ishftc)\\b"
|
||||||
- constant: "(?i)\\b(lbound|len|len_trim|matmul|maxexponent|maxloc|maxval|merge)\\b"
|
- constant: "(?i)\\b(lbound|len|len_trim|matmul|maxexponent|maxloc|maxval|merge)\\b"
|
||||||
- constant: "(?i)\\b(minexponent|minloc|minval|mvbits|namelist|nearest|nullify)\\b"
|
- constant: "(?i)\\b(minexponent|minloc|minval|mvbits|namelist|nearest|nullify)\\b"
|
||||||
- constant: "(?i)\\b(open|pad|present|print|product|pure|quote|radix)\\b"
|
- constant: "(?i)\\b(open|pad|present|print|product|pure|quote|radix)\\b"
|
||||||
- constant: "(?i)\\b(random_number|random_seed|range|read|readwrite|replace)\\b"
|
- constant: "(?i)\\b(random_number|random_seed|range|read|readwrite|replace)\\b"
|
||||||
- constant: "(?i)\\b(reshape|rewind|save|scan|sequence|shape|sign|size|spacing)\\b"
|
- constant: "(?i)\\b(reshape|rewind|save|scan|sequence|shape|sign|size|spacing)\\b"
|
||||||
- constant: "(?i)\\b(spread|sum|system_clock|target|transfer|transpose|trim)\\b"
|
- constant: "(?i)\\b(spread|sum|system_clock|target|transfer|transpose|trim)\\b"
|
||||||
- constant: "(?i)\\b(ubound|unpack|verify|write|tiny|type|use|yes)\\b"
|
- constant: "(?i)\\b(ubound|unpack|verify|write|tiny|type|use|yes)\\b"
|
||||||
|
|
||||||
- statement: "(?i)\\b(.and.|case|do|else|else?if|else?where|end|end?do|end?if)\\b"
|
- statement: "(?i)\\b(.and.|case|do|else|else?if|else?where|end|end?do|end?if)\\b"
|
||||||
- statement: "(?i)\\b(end?select|.eqv.|forall|if|lge|lgt|lle|llt|.neqv.|.not.)\\b"
|
- statement: "(?i)\\b(end?select|.eqv.|forall|if|lge|lgt|lle|llt|.neqv.|.not.)\\b"
|
||||||
- statement: "(?i)\\b(.or.|repeat|select case|then|where|while)\\b"
|
- statement: "(?i)\\b(.or.|repeat|select case|then|where|while)\\b"
|
||||||
|
|
||||||
- special: "(?i)\\b(continue|cycle|exit|go?to|result|return)\\b"
|
- special: "(?i)\\b(continue|cycle|exit|go?to|result|return)\\b"
|
||||||
- symbol.operator: "[.:;,+*|=!\\%]|\\b|\\b|/|-|&"
|
|
||||||
|
#Operator Color
|
||||||
|
- symbol.operator: "[.:;,+*|=!\\%]|/|-|&"
|
||||||
|
|
||||||
|
#Parenthetical Color
|
||||||
- symbol.bracket: "[(){}]|\\[|\\]"
|
- symbol.bracket: "[(){}]|\\[|\\]"
|
||||||
|
|
||||||
|
# Add preprocessor commands.
|
||||||
- preproc: "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
|
- preproc: "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
|
||||||
- constant.string: "\\b[^= ]*\\b|\"(\\\\.|[^\"])*\""
|
|
||||||
- constant.string: "\\b[^= ]*\\b|'(\\\\.|[^\"])*'"
|
- constant.string:
|
||||||
- comment: "!.*$|(^[Cc]| [Cc]) .*$"
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "!"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|||||||
@@ -1,31 +1,68 @@
|
|||||||
filetype: gdscript
|
filetype: gdscript
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.gd$"
|
filename: "\\.gd$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
|
# built-in objects
|
||||||
- constant: "\\b(null|self|true|false)\\b"
|
- constant: "\\b(null|self|true|false)\\b"
|
||||||
|
# built-in attributes
|
||||||
|
# color constant "\\b()\\b"
|
||||||
|
# built-in functions
|
||||||
- identifier: "\\b(abs|acos|asin|atan|atan2|ceil|clamp|convert|cos|cosh|db2linear|decimals|deg2rad|ease|exp|float|floor|fmod|fposmod|hash|int|isinf|isnan|lerp|linear2db|load|log|max|min|nearest_po2|pow|preload|print|printerr|printraw|prints|printt|rad2deg|rand_range|rand_seed|randomize|randi|randf|range|round|seed|sin|slerp|sqrt|str|str2var|tan|typeof|var2str|weakref)\\b"
|
- identifier: "\\b(abs|acos|asin|atan|atan2|ceil|clamp|convert|cos|cosh|db2linear|decimals|deg2rad|ease|exp|float|floor|fmod|fposmod|hash|int|isinf|isnan|lerp|linear2db|load|log|max|min|nearest_po2|pow|preload|print|printerr|printraw|prints|printt|rad2deg|rand_range|rand_seed|randomize|randi|randf|range|round|seed|sin|slerp|sqrt|str|str2var|tan|typeof|var2str|weakref)\\b"
|
||||||
|
# special method names
|
||||||
- identifier: "\\b(AnimationPlayer|AnimationTreePlayer|Button|Control|HTTPClient|HTTPRequest|Input|InputEvent|MainLoop|Node|Node2D|SceneTree|Spatial|SteamPeer|PacketPeer|PacketPeerUDP|Timer|Tween)\\b"
|
- identifier: "\\b(AnimationPlayer|AnimationTreePlayer|Button|Control|HTTPClient|HTTPRequest|Input|InputEvent|MainLoop|Node|Node2D|SceneTree|Spatial|SteamPeer|PacketPeer|PacketPeerUDP|Timer|Tween)\\b"
|
||||||
|
# types
|
||||||
- type: "\\b(Vector2|Vector3)\\b"
|
- type: "\\b(Vector2|Vector3)\\b"
|
||||||
- identifier: "func [a-zA-Z_0-9]+"
|
# definitions
|
||||||
- statement: "\\b(and|as|assert|break|breakpoint|class|const|continue|elif|else|export|extends|for|func|if|in|map|not|onready|or|pass|return|signal|var|while|yield)\\b"
|
- identifier: "func [a-zA-Z_0-9]+"
|
||||||
|
# keywords
|
||||||
|
- statement: "\\b(and|as|assert|break|breakpoint|class|const|continue|elif|else|export|extends|for|func|if|in|map|not|onready|or|pass|return|signal|var|while|yield)\\b"
|
||||||
|
|
||||||
|
# decorators
|
||||||
- special: "@.*[(]"
|
- special: "@.*[(]"
|
||||||
|
|
||||||
|
# operators
|
||||||
- statement: "[.:;,+*|=!\\%@]|<|>|/|-|&"
|
- statement: "[.:;,+*|=!\\%@]|<|>|/|-|&"
|
||||||
|
|
||||||
|
# parentheses
|
||||||
- statement: "[(){}]|\\[|\\]"
|
- statement: "[(){}]|\\[|\\]"
|
||||||
|
|
||||||
|
# numbers
|
||||||
- constant: "\\b[0-9]+\\b"
|
- constant: "\\b[0-9]+\\b"
|
||||||
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b|'.'"
|
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b|'.'"
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
|
||||||
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
- constant.string:
|
||||||
- constant.string: "`[^`]*`"
|
start: "\""
|
||||||
- comment: "#.*$"
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "`"
|
||||||
|
end: "`"
|
||||||
|
rules: []
|
||||||
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "\"\"\"([^\"]|$)"
|
start: "#"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "\"\"\""
|
||||||
end: "\"\"\""
|
end: "\"\"\""
|
||||||
rules: []
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "'''([^']|$)"
|
start: "'''"
|
||||||
end: "'''"
|
end: "'''"
|
||||||
rules: []
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|||||||
@@ -1,17 +1,21 @@
|
|||||||
filetype: ebuild
|
filetype: ebuild
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.e(build|class)$"
|
filename: "\\.e(build|class)$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
|
# All the standard portage functions
|
||||||
- identifier: "^src_(unpack|compile|install|test)|^pkg_(config|nofetch|setup|(pre|post)(inst|rm))"
|
- identifier: "^src_(unpack|compile|install|test)|^pkg_(config|nofetch|setup|(pre|post)(inst|rm))"
|
||||||
|
# Highlight bash related syntax
|
||||||
- statement: "\\b(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while|continue|break)\\b"
|
- statement: "\\b(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while|continue|break)\\b"
|
||||||
- statement: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|!|=|&|\\|)"
|
- statement: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|!|=|&|\\|)"
|
||||||
- statement: "-(e|d|f|r|g|u|w|x|L)\\b"
|
- statement: "-(e|d|f|r|g|u|w|x|L)\\b"
|
||||||
- statement: "-(eq|ne|gt|lt|ge|le|s|n|z)\\b"
|
- statement: "-(eq|ne|gt|lt|ge|le|s|n|z)\\b"
|
||||||
|
# Highlight variables ... official portage ones in red, all others in bright red
|
||||||
- preproc: "\\$\\{?[a-zA-Z_0-9]+\\}?"
|
- preproc: "\\$\\{?[a-zA-Z_0-9]+\\}?"
|
||||||
- special: "\\b(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\\b"
|
- special: "\\b(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\\b"
|
||||||
- special: "\\b(S|D|T|PV|PF|P|PN|A)\\b|\\bC(XX)?FLAGS\\b|\\bLDFLAGS\\b|\\bC(HOST|TARGET|BUILD)\\b"
|
- special: "\\b(S|D|T|PV|PF|P|PN|A)\\b|\\bC(XX)?FLAGS\\b|\\bLDFLAGS\\b|\\bC(HOST|TARGET|BUILD)\\b"
|
||||||
|
# Highlight portage commands
|
||||||
- identifier: "\\buse(_(with|enable))?\\b [!a-zA-Z0-9_+ -]*|inherit.*"
|
- identifier: "\\buse(_(with|enable))?\\b [!a-zA-Z0-9_+ -]*|inherit.*"
|
||||||
- statement: "\\be(begin|end|conf|install|make|warn|infon?|error|log|patch|new(group|user))\\b"
|
- statement: "\\be(begin|end|conf|install|make|warn|infon?|error|log|patch|new(group|user))\\b"
|
||||||
- statement: "\\bdie\\b|\\buse(_(with|enable))?\\b|\\binherit\\b|\\bhas\\b|\\b(has|best)_version\\b|\\bunpack\\b"
|
- statement: "\\bdie\\b|\\buse(_(with|enable))?\\b|\\binherit\\b|\\bhas\\b|\\b(has|best)_version\\b|\\bunpack\\b"
|
||||||
@@ -19,6 +23,23 @@ rules:
|
|||||||
- statement: "\\bdo(python|sed|dir|hard|sym|html|jar|mo)\\b|\\bkeepdir\\b"
|
- statement: "\\bdo(python|sed|dir|hard|sym|html|jar|mo)\\b|\\bkeepdir\\b"
|
||||||
- statement: "prepall(docs|info|man|strip)|prep(info|lib|lib\\.(so|a)|man|strip)"
|
- statement: "prepall(docs|info|man|strip)|prep(info|lib|lib\\.(so|a)|man|strip)"
|
||||||
- statement: "\\b(doc|ins|exe)into\\b|\\bf(owners|perms)\\b|\\b(exe|ins|dir)opts\\b"
|
- statement: "\\b(doc|ins|exe)into\\b|\\bf(owners|perms)\\b|\\b(exe|ins|dir)opts\\b"
|
||||||
|
# Highlight common commands used in ebuilds
|
||||||
- type: "\\bmake\\b|\\b(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\\b"
|
- type: "\\bmake\\b|\\b(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\\b"
|
||||||
- comment: "#.*$"
|
|
||||||
- constant.string: "\"(\\\\.|[^\\\"])*\"|'(\\\\.|[^'])*'"
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "#"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|||||||
@@ -1,15 +1,23 @@
|
|||||||
filetype: etc-portage
|
filetype: etc-portage
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.(keywords|mask|unmask|use)$"
|
filename: "\\.(keywords|mask|unmask|use)$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- default: "^.+$"
|
# Use flags:
|
||||||
- constant.bool.false: "[[:space:]]+\\+?[a-zA-Z0-9_-]+"
|
- constant.bool.false: "[[:space:]]+\\+?[a-zA-Z0-9_-]+"
|
||||||
- constant.bool.true: "[[:space:]]+-[a-zA-Z0-9_-]+"
|
- constant.bool.true: "[[:space:]]+-[a-zA-Z0-9_-]+"
|
||||||
|
# Likely version numbers:
|
||||||
- special: "-[[:digit:]].*([[:space:]]|$)"
|
- special: "-[[:digit:]].*([[:space:]]|$)"
|
||||||
|
# Accepted arches:
|
||||||
- identifier.class: "[~-]?\\b(alpha|amd64|arm|hppa|ia64|mips|ppc|ppc64|s390|sh|sparc|x86|x86-fbsd)\\b"
|
- identifier.class: "[~-]?\\b(alpha|amd64|arm|hppa|ia64|mips|ppc|ppc64|s390|sh|sparc|x86|x86-fbsd)\\b"
|
||||||
- identifier.class: "[[:space:]][~-]?\\*"
|
- identifier.class: "[[:space:]][~-]?\\*"
|
||||||
|
# Categories:
|
||||||
- statement: "^[[:space:]]*.*/"
|
- statement: "^[[:space:]]*.*/"
|
||||||
|
# Masking regulators:
|
||||||
- symbol: "^[[:space:]]*(=|~|<|<=|=<|>|>=|=>)"
|
- symbol: "^[[:space:]]*(=|~|<|<=|=<|>|>=|=>)"
|
||||||
- comment: "#.*$"
|
# Comments:
|
||||||
|
- comment:
|
||||||
|
start: "#"
|
||||||
|
end: "$"
|
||||||
|
rules: []
|
||||||
|
|||||||
@@ -1,20 +1,28 @@
|
|||||||
filetype: git-commit
|
filetype: git-commit
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "COMMIT_EDITMSG|TAG_EDITMSG"
|
filename: "COMMIT_EDITMSG|TAG_EDITMSG"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
|
# Commit message
|
||||||
- ignore: ".*"
|
- ignore: ".*"
|
||||||
- comment: "^#.*"
|
# Comments
|
||||||
- statement: "#[[:space:]](deleted|modified|new file|renamed):[[:space:]].*"
|
- comment:
|
||||||
- statement: "#[[:space:]]deleted:"
|
start: "#"
|
||||||
- statement: "#[[:space:]]modified:"
|
end: "$"
|
||||||
- statement: "#[[:space:]]new file:"
|
rules: []
|
||||||
- statement: "#[[:space:]]renamed:"
|
# File changes
|
||||||
|
- keyword: "#[[:space:]](deleted|modified|new file|renamed):[[:space:]].*"
|
||||||
|
- keyword: "#[[:space:]]deleted:"
|
||||||
|
- keyword: "#[[:space:]]modified:"
|
||||||
|
- keyword: "#[[:space:]]new file:"
|
||||||
|
- keyword: "#[[:space:]]renamed:"
|
||||||
|
# Untracked filenames
|
||||||
- error: "^# [^/?*:;{}\\\\]+\\.[^/?*:;{}\\\\]+$"
|
- error: "^# [^/?*:;{}\\\\]+\\.[^/?*:;{}\\\\]+$"
|
||||||
- statement: "^#[[:space:]]Changes.*[:]"
|
- keyword: "^#[[:space:]]Changes.*[:]"
|
||||||
- statement: "^#[[:space:]]Your branch and '[^']+"
|
- keyword: "^#[[:space:]]Your branch and '[^']+"
|
||||||
- statement: "^#[[:space:]]Your branch and '"
|
- keyword: "^#[[:space:]]Your branch and '"
|
||||||
- statement: "^#[[:space:]]On branch [^ ]+"
|
- keyword: "^#[[:space:]]On branch [^ ]+"
|
||||||
- statement: "^#[[:space:]]On branch"
|
- keyword: "^#[[:space:]]On branch"
|
||||||
|
# Recolor hash symbols
|
||||||
- special: "#"
|
- special: "#"
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
filetype: git-config
|
filetype: git-config
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "git(config|modules)$|\\.git/config$"
|
filename: "git(config|modules)$|\\.git/config$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- constant.bool.true: "\\btrue\\b"
|
- constant: "\\<(true|false)\\>"
|
||||||
- constant.bool.false: "\\bfalse\\b"
|
- keyword: "^[[:space:]]*[^=]*="
|
||||||
- statement: "^[[:space:]]*[^=]*="
|
|
||||||
- constant: "^[[:space:]]*\\[.*\\]$"
|
- constant: "^[[:space:]]*\\[.*\\]$"
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
- constant: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
||||||
- comment: "(^|[[:space:]])#([^{].*)?$"
|
- comment:
|
||||||
|
start: "#"
|
||||||
|
end: "$"
|
||||||
|
rules: []
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
filetype: git-rebase-todo
|
filetype: git-rebase-todo
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "git-rebase-todo"
|
filename: "git-rebase-todo"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- ignore: ".*"
|
# Comments
|
||||||
- comment: "^#.*"
|
- comment:
|
||||||
|
start: "#"
|
||||||
|
end: "$"
|
||||||
|
rules: []
|
||||||
|
# Rebase commands
|
||||||
- statement: "^(e|edit) [0-9a-f]{7,40}"
|
- statement: "^(e|edit) [0-9a-f]{7,40}"
|
||||||
- statement: "^# (e, edit)"
|
- statement: "^# (e, edit)"
|
||||||
- statement: "^(f|fixup) [0-9a-f]{7,40}"
|
- statement: "^(f|fixup) [0-9a-f]{7,40}"
|
||||||
@@ -18,5 +22,7 @@ rules:
|
|||||||
- statement: "^# (s, squash)"
|
- statement: "^# (s, squash)"
|
||||||
- statement: "^(x|exec) [^ ]+ [0-9a-f]{7,40}"
|
- statement: "^(x|exec) [^ ]+ [0-9a-f]{7,40}"
|
||||||
- statement: "^# (x, exec)"
|
- statement: "^# (x, exec)"
|
||||||
|
# Recolor hash symbols
|
||||||
- special: "#"
|
- special: "#"
|
||||||
|
# Commit IDs
|
||||||
- identifier: "[0-9a-f]{7,40}"
|
- identifier: "[0-9a-f]{7,40}"
|
||||||
|
|||||||
@@ -1,23 +1,26 @@
|
|||||||
filetype: glsl
|
filetype: glsl
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.(frag|vert|fp|vp|glsl)$"
|
filename: "\\.(frag|vert|fp|vp|glsl)$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- identifier.class: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
|
- identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
|
||||||
- type: "\\b(void|bool|bvec2|bvec3|bvec4|int|ivec2|ivec3|ivec4|float|vec2|vec3|vec4|mat2|mat3|mat4|struct|sampler1D|sampler2D|sampler3D|samplerCUBE|sampler1DShadow|sampler2DShadow)\\b"
|
- type: "\\b(void|bool|bvec2|bvec3|bvec4|int|ivec2|ivec3|ivec4|float|vec2|vec3|vec4|mat2|mat3|mat4|struct|sampler1D|sampler2D|sampler3D|samplerCUBE|sampler1DShadow|sampler2DShadow)\\b"
|
||||||
- identifier: "\\bgl_(DepthRangeParameters|PointParameters|MaterialParameters|LightSourceParameters|LightModelParameters|LightModelProducts|LightProducts|FogParameters)\\b"
|
- identifier: "\\bgl_(DepthRangeParameters|PointParameters|MaterialParameters|LightSourceParameters|LightModelParameters|LightModelProducts|LightProducts|FogParameters)\\b"
|
||||||
- statement: "\\b(const|attribute|varying|uniform|in|out|inout|if|else|discard|while|for|do)\\b"
|
- statement: "\\b(const|attribute|varying|uniform|in|out|inout|if|else|return|discard|while|for|do)\\b"
|
||||||
- special: "\\b(break|continue|return)\\b"
|
- statement: "\\b(break|continue)\\b"
|
||||||
- constant.bool: "\\b(true|false)\\b"
|
- constant.bool: "\\b(true|false)\\b"
|
||||||
- symbol.operator: "[\\-+/*=<>?:!~%&|^]"
|
- symbol.operator: "[-+/*=<>?:!~%&|^]"
|
||||||
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b"
|
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b"
|
||||||
- comment: "(^|[[:space:]])//.*"
|
|
||||||
|
- comment:
|
||||||
|
start: "//"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "TODO:?"
|
||||||
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "/\\*"
|
start: "/\\*"
|
||||||
end: "\\*/"
|
end: "\\*/"
|
||||||
rules: []
|
rules:
|
||||||
|
- todo: "TODO:?"
|
||||||
- todo: "TODO:?"
|
|
||||||
- indent-char.whitespace: "[[:space:]]+$"
|
|
||||||
- indent-char: " + +| + +"
|
|
||||||
|
|||||||
@@ -1,31 +1,62 @@
|
|||||||
filetype: go
|
filetype: go
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.go$"
|
filename: "\\.go$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
|
# Conditionals and control flow
|
||||||
- special: "\\b(break|case|continue|default|go|goto|range|return)\\b"
|
- special: "\\b(break|case|continue|default|go|goto|range|return)\\b"
|
||||||
- statement: "\\b(else|for|if|switch)\\b"
|
- statement: "\\b(else|for|if|switch)\\b"
|
||||||
- preproc: "\\b(package|import|const|var|type|struct|func|go|defer|iota)\\b"
|
- preproc: "\\b(package|import|const|var|type|struct|func|go|defer|iota)\\b"
|
||||||
- symbol.operator: "[-+/*=<>!~%&|^]|:="
|
- symbol.operator: "[-+/*=<>!~%&|^]|:="
|
||||||
|
|
||||||
|
# Types
|
||||||
- special: "[a-zA-Z0-9]*\\("
|
- special: "[a-zA-Z0-9]*\\("
|
||||||
- symbol: "(,|\\.)"
|
- symbol: "(,|\\.)"
|
||||||
- type: "\\b(u?int(8|16|32|64)?|float(32|64)|complex(64|128))\\b"
|
- type: "\\b(u?int(8|16|32|64)?|float(32|64)|complex(64|128))\\b"
|
||||||
- type: "\\b(uintptr|byte|rune|string|interface|bool|map|chan|error)\\b"
|
- type: "\\b(uintptr|byte|rune|string|interface|bool|map|chan|error)\\b"
|
||||||
|
##I'm... not sure, but aren't structs a type?
|
||||||
- type.keyword: "\\b(struct)\\b"
|
- type.keyword: "\\b(struct)\\b"
|
||||||
- constant.bool: "\\b(true|false|nil)\\b"
|
- constant.bool: "\\b(true|false|nil)\\b"
|
||||||
|
|
||||||
|
# Brackets
|
||||||
- symbol.brackets: "(\\{|\\})"
|
- symbol.brackets: "(\\{|\\})"
|
||||||
- symbol.brackets: "(\\(|\\))"
|
- symbol.brackets: "(\\(|\\))"
|
||||||
- symbol.brackets: "(\\[|\\])"
|
- symbol.brackets: "(\\[|\\])"
|
||||||
|
|
||||||
|
# Numbers and strings
|
||||||
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b|'.'"
|
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b|'.'"
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
|
||||||
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
|
- constant.string:
|
||||||
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
start: "\""
|
||||||
- constant.string: "`[^`]*`"
|
end: "\""
|
||||||
- comment: "(^|[[:space:]])//.*"
|
rules:
|
||||||
|
- constant.specialChar: "%."
|
||||||
|
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
|
||||||
|
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- error: "..+"
|
||||||
|
- constant.specialChar: "%."
|
||||||
|
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
|
||||||
|
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "`"
|
||||||
|
end: "`"
|
||||||
|
rules: []
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "//"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "/\\*"
|
start: "/\\*"
|
||||||
end: "\\*/"
|
end: "\\*/"
|
||||||
rules: []
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
- todo: "(TODO|XXX|FIXME):?"
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
filetype: golo
|
filetype: golo
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.golo$"
|
filename: "\\.golo$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
@@ -8,6 +8,7 @@ rules:
|
|||||||
- type: "\\b(struct|DynamicObject|union|AdapterFabric|Adapter|DynamicVariable|Observable)\\b"
|
- type: "\\b(struct|DynamicObject|union|AdapterFabric|Adapter|DynamicVariable|Observable)\\b"
|
||||||
- type: "\\b(list|set|array|vector|tuple|map)\\b"
|
- type: "\\b(list|set|array|vector|tuple|map)\\b"
|
||||||
- type: "\\b(Ok|Error|Empty|None|Some|Option|Result|Result.ok|Result.fail|Result.error|Result.empty|Optional.empty|Optional.of)\\b"
|
- type: "\\b(Ok|Error|Empty|None|Some|Option|Result|Result.ok|Result.fail|Result.error|Result.empty|Optional.empty|Optional.of)\\b"
|
||||||
|
|
||||||
- identifier.class: "\\b(augment|pimp)\\b"
|
- identifier.class: "\\b(augment|pimp)\\b"
|
||||||
- identifier.class: "\\b(interfaces|implements|extends|overrides|maker|newInstance)\\b"
|
- identifier.class: "\\b(interfaces|implements|extends|overrides|maker|newInstance)\\b"
|
||||||
- identifier.class: "\\b(isEmpty|isNone|isPresent|isSome|iterator|flattened|toList|flatMap|`and|orElseGet|`or|toResult|apply|either)\\b"
|
- identifier.class: "\\b(isEmpty|isNone|isPresent|isSome|iterator|flattened|toList|flatMap|`and|orElseGet|`or|toResult|apply|either)\\b"
|
||||||
@@ -29,6 +30,7 @@ rules:
|
|||||||
- identifier.class: "\\b(newWithSameType|destruct|append|add|addIfAbsent|prepend|insert|last|unmodifiableView|find|filter|map|join|reverse|reversed|order|ordered|removeAt|include|exclude|remove|delete|has|contains|getOrElse|toArray)\\b"
|
- identifier.class: "\\b(newWithSameType|destruct|append|add|addIfAbsent|prepend|insert|last|unmodifiableView|find|filter|map|join|reverse|reversed|order|ordered|removeAt|include|exclude|remove|delete|has|contains|getOrElse|toArray)\\b"
|
||||||
- identifier.class: "\\b(add|addTo|succ|pred|mul|neg|sub|rsub|div|rdiv|mod|rmod|pow|rpow|str|lt|gt|eq|ne|ge|le|`and|`or|`not|xor|even|odd|contains|isEmpty|`is|`isnt|`oftype|`orIfNull|fst|snd|getitem|setitem|getter|id|const|False|True|Null|curry|uncurry|unary|spreader|varargs|swapArgs|swapCurry|swapCouple|swap|invokeWith|pipe|compose|io|andThen|until|recur|cond)\\b"
|
- identifier.class: "\\b(add|addTo|succ|pred|mul|neg|sub|rsub|div|rdiv|mod|rmod|pow|rpow|str|lt|gt|eq|ne|ge|le|`and|`or|`not|xor|even|odd|contains|isEmpty|`is|`isnt|`oftype|`orIfNull|fst|snd|getitem|setitem|getter|id|const|False|True|Null|curry|uncurry|unary|spreader|varargs|swapArgs|swapCurry|swapCouple|swap|invokeWith|pipe|compose|io|andThen|until|recur|cond)\\b"
|
||||||
- identifier.class: "\\b(toUpperCase|equals|startsWith)\\b"
|
- identifier.class: "\\b(toUpperCase|equals|startsWith)\\b"
|
||||||
|
|
||||||
- statement: "\\b(if|else|then|when|case|match|otherwise)\\b"
|
- statement: "\\b(if|else|then|when|case|match|otherwise)\\b"
|
||||||
- special: "\\b(with|break|continue|return)\\b"
|
- special: "\\b(with|break|continue|return)\\b"
|
||||||
- error: "\\b(try|catch|finally|throw)\\b"
|
- error: "\\b(try|catch|finally|throw)\\b"
|
||||||
@@ -36,15 +38,33 @@ rules:
|
|||||||
- symbol.brackets: "[(){}]|\\[|\\]"
|
- symbol.brackets: "[(){}]|\\[|\\]"
|
||||||
- statement: "\\b(for|while|foreach|in)\\b"
|
- statement: "\\b(for|while|foreach|in)\\b"
|
||||||
- constant: "\\b(and|in|is|not|or|isnt|orIfNull)\\b"
|
- constant: "\\b(and|in|is|not|or|isnt|orIfNull)\\b"
|
||||||
|
|
||||||
- constant.bool: "\\b(true|false)\\b"
|
- constant.bool: "\\b(true|false)\\b"
|
||||||
- constant: "\\b(null|undefined)\\b"
|
- constant: "\\b(null|undefined)\\b"
|
||||||
|
|
||||||
- symbol.operator: "[\\-+/*=<>!~%&|^]|:="
|
- symbol.operator: "[\\-+/*=<>!~%&|^]|:="
|
||||||
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b|'.'"
|
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b|'.'"
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
|
||||||
- comment: "#.*$"
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "#"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "----"
|
start: "----"
|
||||||
end: "----"
|
end: "----"
|
||||||
rules: []
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
- todo: "TODO:?"
|
|
||||||
|
|||||||
@@ -1,24 +1,49 @@
|
|||||||
filetype: haskell
|
filetype: haskell
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.hs$"
|
filename: "\\.hs$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
|
# Keywords
|
||||||
- statement: "[ ](as|case|of|class|data|default|deriving|do|forall|foreign|hiding|if|then|else|import|infix|infixl|infixr|instance|let|in|mdo|module|newtype|qualified|type|where)[ ]"
|
- statement: "[ ](as|case|of|class|data|default|deriving|do|forall|foreign|hiding|if|then|else|import|infix|infixl|infixr|instance|let|in|mdo|module|newtype|qualified|type|where)[ ]"
|
||||||
- statement: "(^data|^foreign|^import|^infix|^infixl|^infixr|^instance|^module|^newtype|^type)[ ]"
|
- statement: "(^data|^foreign|^import|^infix|^infixl|^infixr|^instance|^module|^newtype|^type)[ ]"
|
||||||
- statement: "[ ](as$|case$|of$|class$|data$|default$|deriving$|do$|forall$|foreign$|hiding$|if$|then$|else$|import$|infix$|infixl$|infixr$|instance$|let$|in$|mdo$|module$|newtype$|qualified$|type$|where$)"
|
- statement: "[ ](as$|case$|of$|class$|data$|default$|deriving$|do$|forall$|foreign$|hiding$|if$|then$|else$|import$|infix$|infixl$|infixr$|instance$|let$|in$|mdo$|module$|newtype$|qualified$|type$|where$)"
|
||||||
|
|
||||||
|
# Various symbols
|
||||||
- symbol: "(\\||@|!|:|_|~|=|\\\\|;|\\(\\)|,|\\[|\\]|\\{|\\})"
|
- symbol: "(\\||@|!|:|_|~|=|\\\\|;|\\(\\)|,|\\[|\\]|\\{|\\})"
|
||||||
|
|
||||||
|
# Operators
|
||||||
- symbol.operator: "(==|/=|&&|\\|\\||<|>|<=|>=)"
|
- symbol.operator: "(==|/=|&&|\\|\\||<|>|<=|>=)"
|
||||||
|
|
||||||
|
# Various symbols
|
||||||
- special: "(->|<-)"
|
- special: "(->|<-)"
|
||||||
- symbol: "\\.|\\$"
|
- symbol: "\\.|\\$"
|
||||||
|
|
||||||
|
# Data constructors
|
||||||
- constant.bool: "\\b(True|False)\\b"
|
- constant.bool: "\\b(True|False)\\b"
|
||||||
- constant: "(Nothing|Just|Left|Right|LT|EQ|GT)"
|
- constant: "(Nothing|Just|Left|Right|LT|EQ|GT)"
|
||||||
|
|
||||||
|
# Data classes
|
||||||
- identifier.class: "[ ](Read|Show|Enum|Eq|Ord|Data|Bounded|Typeable|Num|Real|Fractional|Integral|RealFrac|Floating|RealFloat|Monad|MonadPlus|Functor)"
|
- identifier.class: "[ ](Read|Show|Enum|Eq|Ord|Data|Bounded|Typeable|Num|Real|Fractional|Integral|RealFrac|Floating|RealFloat|Monad|MonadPlus|Functor)"
|
||||||
- constant.string: "\"[^\\\"]*\""
|
|
||||||
- comment: "--.*"
|
# Strings
|
||||||
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
# Comments
|
||||||
|
- comment:
|
||||||
|
start: "--"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "\\{-"
|
start: "\\{-"
|
||||||
end: "-\\}"
|
end: "-\\}"
|
||||||
rules: []
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|
||||||
- identifier.micro: "undefined"
|
- identifier.micro: "undefined"
|
||||||
|
|||||||
@@ -1,24 +1,26 @@
|
|||||||
filetype: html
|
filetype: html
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.htm[l]?$"
|
filename: "\\.htm[l]?$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- error: "<[^!].*?>"
|
- identifier: "<.*?>"
|
||||||
- symbol.tag: "(?i)<[/]?(a(bbr|cronym|ddress|pplet|rea|rticle|side|udio)?|b(ase(font)?|d(i|o)|ig|lockquote|r)?|ca(nvas|ption)|center|cite|co(de|l|lgroup)|d(ata(list)?|d|el|etails|fn|ialog|ir|l|t)|em(bed)?|fieldset|fig(caption|ure)|font|form|(i)?frame|frameset|h[1-6]|hr|i|img|in(put|s)|kbd|keygen|label|legend|li(nk)?|ma(in|p|rk)|menu(item)?|met(a|er)|nav|no(frames|script)|o(l|pt(group|ion)|utput)|p(aram|icture|re|rogress)?|q|r(p|t|uby)|s(trike)?|samp|se(ction|lect)|small|source|span|strong|su(b|p|mmary)|textarea|time|track|u(l)?|var|video|wbr)( .*|>)*?>"
|
|
||||||
- symbol.tag.extended: "(?i)<[/]?(body|div|html|head(er)?|footer|title|table|t(body|d|h(ead)?|r|foot))( .*)*?>"
|
|
||||||
- preproc: "(?i)<[/]?(script|style)( .*)*?>"
|
|
||||||
- special: "&[^;[[:space:]]]*;"
|
- special: "&[^;[[:space:]]]*;"
|
||||||
- symbol: "[:=]"
|
- statement: "(alt|bgcolor|height|href|label|longdesc|name|onclick|onfocus|onload|onmouseover|size|span|src|style|target|type|value|width)="
|
||||||
- identifier: "(alt|bgcolor|height|href|id|label|longdesc|name|on(click|focus|load|mouseover)|size|span|src|style|target|type|value|width)="
|
|
||||||
- constant.string: "\"[^\"]*\""
|
- constant.string:
|
||||||
- constant.number: "(?i)#[0-9A-F]{6,6}"
|
start: "\""
|
||||||
- default:
|
end: "\""
|
||||||
start: ">"
|
|
||||||
end: "<"
|
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
- symbol.tag: "<|>"
|
- default:
|
||||||
- constant.string.url: "(ftp(s)?|http(s)?|git|chrome)://[^ ]+"
|
start: "<script.*?>"
|
||||||
- comment: "<!--.+?-->"
|
end: "</script.*?>"
|
||||||
- preproc: "<!DOCTYPE.+?>"
|
rules:
|
||||||
|
- include: "javascript"
|
||||||
|
|
||||||
|
- default:
|
||||||
|
start: "<style.*?>"
|
||||||
|
end: "</style.*?>"
|
||||||
|
rules:
|
||||||
|
- include: "css"
|
||||||
|
|||||||
@@ -1,23 +1,34 @@
|
|||||||
filetype: java
|
filetype: java
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.java$"
|
filename: "\\.java$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- type: "\\b(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\\b"
|
- type: "\\b(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\\b"
|
||||||
- statement: "\\b(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\\b"
|
- statement: "\\b(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\\b"
|
||||||
- type.keyword: "\\b(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\\b"
|
- type: "\\b(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\\b"
|
||||||
- constant.string: "\"[^\"]*\""
|
- constant: "\\b(true|false|null)\\b"
|
||||||
- constant.bool: "\\b(true|false|null)\\b"
|
|
||||||
- constant.number: "\\b[0-9]+\\b"
|
- constant.number: "\\b[0-9]+\\b"
|
||||||
- comment: "//.*"
|
|
||||||
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- preproc: "..+"
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "//"
|
||||||
|
end: "$"
|
||||||
|
rules: []
|
||||||
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "/\\*"
|
start: "/\\*"
|
||||||
end: "\\*/"
|
end: "\\*/"
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
- comment:
|
|
||||||
start: "/\\*\\*"
|
|
||||||
end: "\\*/"
|
|
||||||
rules: []
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,24 +1,42 @@
|
|||||||
filetype: javascript
|
filetype: javascript
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.js$"
|
filename: "\\.js$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- constant.number: "\\b[\\-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
|
- constant.number: "\\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
|
||||||
- constant.number: "\\b[\\-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+\\-]?[0-9]+)?[fFlL]?"
|
- constant.number: "\\b[-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
|
||||||
- constant.number: "\\b[\\-+]?([0-9]+[EePp][+\\-]?[0-9]+)[fFlL]?"
|
- constant.number: "\\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
|
||||||
- identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
|
- identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
|
||||||
- statement: "\\b(break|case|catch|continue|default|delete|do|else|finally)\\b"
|
- statement: "\\b(break|case|catch|continue|default|delete|do|else|finally)\\b"
|
||||||
- statement: "\\b(for|function|get|if|in|instanceof|new|return|set|switch)\\b"
|
- statement: "\\b(for|function|get|if|in|instanceof|new|return|set|switch)\\b"
|
||||||
- statement: "\\b(switch|this|throw|try|typeof|var|void|while|with)\\b"
|
- statement: "\\b(switch|this|throw|try|typeof|var|void|while|with)\\b"
|
||||||
- constant.bool: "\\b(null|undefined|NaN)\\b"
|
- constant: "\\b(null|undefined|NaN)\\b"
|
||||||
- constant.bool: "\\b(true|false)\\b"
|
- constant: "\\b(true|false)\\b"
|
||||||
- type: "\\b(Array|Boolean|Date|Enumerator|Error|Function|Math)\\b"
|
- type: "\\b(Array|Boolean|Date|Enumerator|Error|Function|Math)\\b"
|
||||||
- type: "\\b(Number|Object|RegExp|String)\\b"
|
- type: "\\b(Number|Object|RegExp|String)\\b"
|
||||||
- symbol.operator: "[\\-+/*=<>!~%?:&|]"
|
- statement: "[-+/*=<>!~%?:&|]"
|
||||||
- constant: "/[^*]([^/]|(\\\\/))*[^\\\\]/[gim]*"
|
- constant: "/[^*]([^/]|(\\\\/))*[^\\\\]/[gim]*"
|
||||||
- constant: "\\\\[0-7][0-7]?[0-7]?|\\\\x[0-9a-fA-F]+|\\\\[bfnrt'\"\\?\\\\]"
|
- constant: "\\\\[0-7][0-7]?[0-7]?|\\\\x[0-9a-fA-F]+|\\\\[bfnrt'\"\\?\\\\]"
|
||||||
- comment: "(^|[[:space:]])//.*"
|
|
||||||
- comment: "/\\*.+\\*/"
|
- constant.string:
|
||||||
- todo: "TODO:?"
|
start: "\""
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "//"
|
||||||
|
end: "$"
|
||||||
|
rules: []
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "/\\*"
|
||||||
|
end: "\\*/"
|
||||||
|
rules: []
|
||||||
|
|||||||
@@ -1,18 +1,24 @@
|
|||||||
filetype: json
|
filetype: json
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.json$"
|
filename: "\\.json$"
|
||||||
header: "^\\{$"
|
header: "^\\{$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- constant.number: "\\b[\\-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
|
- constant.number: "\\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
|
||||||
- constant.number: "\\b[\\-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+\\-]?[0-9]+)?[fFlL]?"
|
- constant.number: "\\b[-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
|
||||||
- constant.number: "\\b[\\-+]?([0-9]+[EePp][+\\-]?[0-9]+)[fFlL]?"
|
- constant.number: "\\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
|
||||||
- constant.bool: "\\b(null)\\b"
|
- constant: "\\b(null)\\b"
|
||||||
- constant.bool.true: "\\b(true)\\b"
|
- constant: "\\b(true|false)\\b"
|
||||||
- constant.bool.false: "\\b(false)\\b"
|
- constant.string:
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
- statement: "\\\"(\\\\\"|[^\"])*\\\"[[:space:]]*:\" \"'(\\'|[^'])*'[[:space:]]*:"
|
- statement: "\\\"(\\\\\"|[^\"])*\\\"[[:space:]]*:\" \"'(\\'|[^'])*'[[:space:]]*:"
|
||||||
- constant: "\\\\u[0-9a-fA-F]{4}|\\\\[bfnrt'\"/\\\\]"
|
- constant: "\\\\u[0-9a-fA-F]{4}|\\\\[bfnrt'\"/\\\\]"
|
||||||
- indent-char.whitespace: "[[:space:]]+$"
|
|
||||||
- indent-char: " + +| + +"
|
|
||||||
|
|||||||
@@ -1,14 +1,24 @@
|
|||||||
filetype: keymap
|
filetype: keymap
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.(k|key)?map$|Xmodmap$"
|
filename: "\\.(k|key)?map$|Xmodmap$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- statement: "\\b(add|clear|compose|keycode|keymaps|keysym|remove|string)\\b"
|
- statement: "\\b(add|clear|compose|keycode|keymaps|keysym|remove|string)\\b"
|
||||||
- identifier: "\\b(control|alt|shift)\\b"
|
- statement: "\\b(control|alt|shift)\\b"
|
||||||
- constant.number: "\\b[0-9]+\\b"
|
- constant.number: "\\b[0-9]+\\b"
|
||||||
- symbol: "="
|
- special: "="
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
- constant.string:
|
||||||
- comment: "^!.*$"
|
start: "\""
|
||||||
- indent-char.whitespace: "[[:space:]]+$"
|
end: "\""
|
||||||
- indent-char: " + +| + +"
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
- comment:
|
||||||
|
start: "^!"
|
||||||
|
end: "$"
|
||||||
|
rules: []
|
||||||
|
|||||||
@@ -1,18 +1,24 @@
|
|||||||
filetype: lilypond
|
filetype: lilypond
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.ly$|\\.ily$|\\.lly$"
|
filename: "\\.ly$|\\.ily$|\\.lly$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- constant.number: "\\d+"
|
- constant.number: "\\d+"
|
||||||
- identifier: "[[:space:]](staff|spacing|signature|routine|notes|handler|corrected|beams|arpeggios|Volta_engraver|Voice|Vertical_align_engraver|Vaticana_ligature_engraver|VaticanaVoice|VaticanaStaff|Tweak_engraver|Tuplet_engraver|Trill_spanner_engraver|Timing_translator|Time_signature_performer|Time_signature_engraver|Tie_performer|Tie_engraver|Text_spanner_engraver|Text_engraver|Tempo_performer|Tab_tie_follow_engraver|Tab_staff_symbol_engraver|Tab_note_heads_engraver|TabVoice|TabStaff|System_start_delimiter_engraver|Stem_engraver|Stanza_number_engraver|Stanza_number_align_engraver|Staff_symbol_engraver|Staff_performer|Staff_collecting_engraver|StaffGroup|Staff|Spanner_break_forbid_engraver|Span_bar_stub_engraver|Span_bar_engraver|Span_arpeggio_engraver|Spacing_engraver|Slur_performer|Slur_engraver|Slash_repeat_engraver|Separating_line_group_engraver|Script_row_engraver|Script_engraver|Script_column_engraver|Score|Rhythmic_column_engraver|RhythmicStaff|Rest_engraver|Rest_collision_engraver|Repeat_tie_engraver|Repeat_acknowledge_engraver|Pure_from_neighbor_engraver|Pitched_trill_engraver|Pitch_squash_engraver|Piano_pedal_performer|Piano_pedal_engraver|Piano_pedal_align_engraver|PianoStaff|Phrasing_slur_engraver|PetrucciVoice|PetrucciStaff|Percent_repeat_engraver|Part_combine_engraver|Parenthesis_engraver|Paper_column_engraver|Output_property_engraver|Ottava_spanner_engraver|OneStaff|NullVoice|Note_spacing_engraver|Note_performer|Note_name_engraver|Note_heads_engraver|Note_head_line_engraver|NoteName\\|NoteHead|New_fingering_engraver|Multi_measure_rest_engraver|Midi_control_function_performer|Metronome_mark_engraver|Mensural_ligature_engraver|MensuralVoice|MensuralStaff|Mark_engraver|Lyrics|Lyric_performer|Lyric_engraver|Ligature_bracket_engraver|Ledger_line_engraver|Laissez_vibrer_engraver|Kievan_ligature_engraver|KievanVoice|KievanStaff|Key_performer|Key_engraver|Keep_alive_together_engraver|Instrument_switch_engraver|Instrument_name_engraver|Hyphen_engraver|Grob_pq_engraver|GregorianTranscriptionVoice|GregorianTranscriptionStaff|GrandStaff|Grace_spacing_engraver|Grace_engraver|Grace_beam_engraver|Grace_auto_beam_engraver|Global|Glissando_engraver|Fretboard_engraver|FretBoards|Forbid_line_break_engraver|Footnote_engraver|Font_size_engraver|Fingering_engraver|Fingering_column_engraver|Figured_bass_position_engraver|Figured_bass_engraver|FiguredBass|Extender_engraver|Episema_engraver|Dynamics|Dynamic_performer|Dynamic_engraver|Dynamic_align_engraver|Drum_notes_engraver|Drum_note_performer|DrumVoice|DrumStaff|Double_percent_repeat_engraver|Dots_engraver|Dot_column_engraver|Devnull|Default_bar_line_engraver|Custos_engraver|Cue_clef_engraver|CueVoice|Control_track_performer|Concurrent_hairpin_engraver|Collision_engraver|Cluster_spanner_engraver|Clef_engraver|Chord_tremolo_engraver|Chord_name_engraver|ChordNames|ChoirStaff|Breathing_sign_engraver|Break_align_engraver|Bend_engraver|Beam_performer|Beam_engraver|Beam_collision_engraver|Bar_number_engraver|Bar_engraver|Axis_group_engraver|Auto_beam_engraver|Arpeggio_engraver|Accidental_engraver|Score)[[:space:]]"
|
- identifier: "\\b(staff|spacing|signature|routine|notes|handler|corrected|beams|arpeggios|Volta_engraver|Voice|Vertical_align_engraver|Vaticana_ligature_engraver|VaticanaVoice|VaticanaStaff|Tweak_engraver|Tuplet_engraver|Trill_spanner_engraver|Timing_translator|Time_signature_performer|Time_signature_engraver|Tie_performer|Tie_engraver|Text_spanner_engraver|Text_engraver|Tempo_performer|Tab_tie_follow_engraver|Tab_staff_symbol_engraver|Tab_note_heads_engraver|TabVoice|TabStaff|System_start_delimiter_engraver|Stem_engraver|Stanza_number_engraver|Stanza_number_align_engraver|Staff_symbol_engraver|Staff_performer|Staff_collecting_engraver|StaffGroup|Staff|Spanner_break_forbid_engraver|Span_bar_stub_engraver|Span_bar_engraver|Span_arpeggio_engraver|Spacing_engraver|Slur_performer|Slur_engraver|Slash_repeat_engraver|Separating_line_group_engraver|Script_row_engraver|Script_engraver|Script_column_engraver|Score|Rhythmic_column_engraver|RhythmicStaff|Rest_engraver|Rest_collision_engraver|Repeat_tie_engraver|Repeat_acknowledge_engraver|Pure_from_neighbor_engraver|Pitched_trill_engraver|Pitch_squash_engraver|Piano_pedal_performer|Piano_pedal_engraver|Piano_pedal_align_engraver|PianoStaff|Phrasing_slur_engraver|PetrucciVoice|PetrucciStaff|Percent_repeat_engraver|Part_combine_engraver|Parenthesis_engraver|Paper_column_engraver|Output_property_engraver|Ottava_spanner_engraver|OneStaff|NullVoice|Note_spacing_engraver|Note_performer|Note_name_engraver|Note_heads_engraver|Note_head_line_engraver|NoteName\\|NoteHead|New_fingering_engraver|Multi_measure_rest_engraver|Midi_control_function_performer|Metronome_mark_engraver|Mensural_ligature_engraver|MensuralVoice|MensuralStaff|Mark_engraver|Lyrics|Lyric_performer|Lyric_engraver|Ligature_bracket_engraver|Ledger_line_engraver|Laissez_vibrer_engraver|Kievan_ligature_engraver|KievanVoice|KievanStaff|Key_performer|Key_engraver|Keep_alive_together_engraver|Instrument_switch_engraver|Instrument_name_engraver|Hyphen_engraver|Grob_pq_engraver|GregorianTranscriptionVoice|GregorianTranscriptionStaff|GrandStaff|Grace_spacing_engraver|Grace_engraver|Grace_beam_engraver|Grace_auto_beam_engraver|Global|Glissando_engraver|Fretboard_engraver|FretBoards|Forbid_line_break_engraver|Footnote_engraver|Font_size_engraver|Fingering_engraver|Fingering_column_engraver|Figured_bass_position_engraver|Figured_bass_engraver|FiguredBass|Extender_engraver|Episema_engraver|Dynamics|Dynamic_performer|Dynamic_engraver|Dynamic_align_engraver|Drum_notes_engraver|Drum_note_performer|DrumVoice|DrumStaff|Double_percent_repeat_engraver|Dots_engraver|Dot_column_engraver|Devnull|Default_bar_line_engraver|Custos_engraver|Cue_clef_engraver|CueVoice|Control_track_performer|Concurrent_hairpin_engraver|Collision_engraver|Cluster_spanner_engraver|Clef_engraver|Chord_tremolo_engraver|Chord_name_engraver|ChordNames|ChoirStaff|Breathing_sign_engraver|Break_align_engraver|Bend_engraver|Beam_performer|Beam_engraver|Beam_collision_engraver|Bar_number_engraver|Bar_engraver|Axis_group_engraver|Auto_beam_engraver|Arpeggio_engraver|Accidental_engraver|Score)\\b"
|
||||||
- statement: "[\\-_^]?\\\\[\\-A-Za-z_]+"
|
- statement: "[-_^]?\\\\[-A-Za-z_]+"
|
||||||
- preproc: "\\b(((gisis|gis|geses|ges|g|fisis|fis|feses|fes|f|eisis|eis|eeses|ees|e|disis|dis|deses|des|d|cisis|cis|ceses|ces|c|bisis|bis|beses|bes|b|aisis|ais|aeses|aes|a)[,']*[?!]?)|s|r|R|q)(128|64|32|16|8|4|2|1|\\\\breve|\\\\longa|\\\\maxima)?([^\\\\\\w]|_|\\b)"
|
- preproc: "\\b(((gisis|gis|geses|ges|g|fisis|fis|feses|fes|f|eisis|eis|eeses|ees|e|disis|dis|deses|des|d|cisis|cis|ceses|ces|c|bisis|bis|beses|bes|b|aisis|ais|aeses|aes|a)[,']*[?!]?)|s|r|R|q)(128|64|32|16|8|4|2|1|\\\\breve|\\\\longa|\\\\maxima)?([^\\\\\\w]|_|\\b)"
|
||||||
- symbol.brackets: "[(){}<>]|\\[|\\]"
|
- special: "[(){}<>]|\\[|\\]"
|
||||||
- constant.string: "\\\".*\\\""
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
- comment:
|
- comment:
|
||||||
start: "%{"
|
start: "%\\{"
|
||||||
end: "%}"
|
end: "%\\}"
|
||||||
|
rules: []
|
||||||
|
- comment:
|
||||||
|
start: "%"
|
||||||
|
end: "$"
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
- comment: "%.*$"
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
filetype: lua
|
filetype: lua
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: ".*\\.lua$"
|
filename: "\\.lua$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- statement: "\\b(do|end|while|repeat|until|if|elseif|then|else|for|in|function|local|return)\\b"
|
- statement: "\\b(do|end|while|repeat|until|if|elseif|then|else|for|in|function|local|return)\\b"
|
||||||
@@ -19,20 +19,42 @@ rules:
|
|||||||
- identifier: "debug\\.\\b(debug|getfenv|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue|getuservalue|setfenv|sethook|setlocal|setmetatable|setupvalue|setuservalue|traceback|upvalueid|upvaluejoin)\\b"
|
- identifier: "debug\\.\\b(debug|getfenv|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue|getuservalue|setfenv|sethook|setlocal|setmetatable|setupvalue|setuservalue|traceback|upvalueid|upvaluejoin)\\b"
|
||||||
- identifier: "bit32\\.\\b(arshift|band|bnot|bor|btest|bxor|extract|replace|lrotate|lshift|rrotate|rshift)\\b"
|
- identifier: "bit32\\.\\b(arshift|band|bnot|bor|btest|bxor|extract|replace|lrotate|lshift|rrotate|rshift)\\b"
|
||||||
- identifier: "\\:\\b(close|flush|lines|read|seek|setvbuf|write)\\b"
|
- identifier: "\\:\\b(close|flush|lines|read|seek|setvbuf|write)\\b"
|
||||||
- constant.bool: "\\b(false|nil|true)\\b"
|
- constant: "\\b(false|nil|true)\\b"
|
||||||
- preproc: "(\\b(dofile|require|include)|%q|%!|%Q|%r|%x)\\b"
|
- statement: "(\\b(dofile|require|include)|%q|%!|%Q|%r|%x)\\b"
|
||||||
- constant.number: "\\b([0-9]+)\\b"
|
- constant.number: "\\b([0-9]+)\\b"
|
||||||
- symbol: "(\\(|\\)|\\[|\\]|\\{|\\}|\\*\\*|\\*|/|%|\\+|-|\\^|>|>=|<|<=|~=|=|\\.\\.)"
|
- symbol: "(\\(|\\)|\\[|\\]|\\{|\\}|\\*\\*|\\*|/|%|\\+|-|\\^|>|>=|<|<=|~=|=|\\.\\.)"
|
||||||
- constant.string: "\\\"(\\\\.|[^\\\\\\\"])*\\\"|'(\\\\.|[^\\\\'])*'"
|
|
||||||
- constant:
|
- constant.string:
|
||||||
start: "\\s*\\[\\["
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "\\[\\["
|
||||||
end: "\\]\\]"
|
end: "\\]\\]"
|
||||||
rules: []
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
- special: "\\\\[0-7][0-7][0-7]|\\\\x[0-9a-fA-F][0-9a-fA-F]|\\\\[abefnrs]|(\\\\c|\\\\C-|\\\\M-|\\\\M-\\\\C-)."
|
- special: "\\\\[0-7][0-7][0-7]|\\\\x[0-9a-fA-F][0-9a-fA-F]|\\\\[abefnrs]|(\\\\c|\\\\C-|\\\\M-|\\\\M-\\\\C-)."
|
||||||
- comment: "\\-\\-.*$"
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "\\s*\\-\\-\\s*\\[\\["
|
start: "#"
|
||||||
end: "\\]\\]"
|
end: "$"
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "\\-\\-"
|
||||||
|
end: "$"
|
||||||
|
rules: []
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "\\-\\-\\[\\["
|
||||||
|
end: "\\]\\]"
|
||||||
|
rules: []
|
||||||
|
|||||||
@@ -1,19 +1,25 @@
|
|||||||
filetype: mail
|
filetype: mail
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "(.*/mutt-.*|\\.eml)$"
|
filename: "(.*/mutt-.*|\\.eml)$"
|
||||||
header: "^From .* \\d+:\\d+:\\d+ \\d+"
|
header: "^From .* \\d+:\\d+:\\d+ \\d+"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- constant: "^From .*"
|
- type: "^From .*"
|
||||||
- identifier: "^[^[:space:]]+:"
|
- identifier: "^[^[:space:]]+:"
|
||||||
- preproc: "^List-(Id|Archive|Subscribe|Unsubscribe|Post|Help):"
|
- preproc: "^List-(Id|Archive|Subscribe|Unsubscribe|Post|Help):"
|
||||||
- constant: "^(To|From):"
|
- constant: "^(To|From):"
|
||||||
- constant.string: "^Subject:.*"
|
- constant.string:
|
||||||
|
start: "^Subject:.*"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
- statement: "<?[^@[:space:]]+@[^[:space:]]+>?"
|
- statement: "<?[^@[:space:]]+@[^[:space:]]+>?"
|
||||||
- default:
|
- default:
|
||||||
start: "^\\n\\n"
|
start: "^\\n\\n"
|
||||||
end: ".*"
|
end: ".*"
|
||||||
rules: []
|
rules: []
|
||||||
|
- comment:
|
||||||
- comment: "^>.*$"
|
start: "^>.*"
|
||||||
|
end: "$"
|
||||||
|
rules: []
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
filetype: makefile
|
filetype: makefile
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "([Mm]akefile|\\.ma?k)$"
|
filename: "([Mm]akefile|\\.ma?k)$"
|
||||||
header: "^#!.*/(env +)?[bg]?make( |$)"
|
header: "^#!.*/(env +)?[bg]?make( |$)"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- preproc: "\\b(ifeq|ifdef|ifneq|ifndef|else|endif)\\b"
|
- preproc: "\\<(ifeq|ifdef|ifneq|ifndef|else|endif)\\>"
|
||||||
- preproc: "^(export|include|override)\\b"
|
- statement: "^(export|include|override)\\>"
|
||||||
- symbol.operator: "^[^:= ]+:"
|
- operator: "^[^:= ]+:"
|
||||||
- symbol.operator: "[=,%]|\\+=|\\?=|:=|&&|\\|\\|"
|
- operator: "([=,%]|\\+=|\\?=|:=|&&|\\|\\|)"
|
||||||
- statement: "\\$\\((abspath|addprefix|addsuffix|and|basename|call|dir)[[:space:]]"
|
- statement: "\\$\\((abspath|addprefix|addsuffix|and|basename|call|dir)[[:space:]]"
|
||||||
- statement: "\\$\\((error|eval|filter|filter-out|findstring|firstword)[[:space:]]"
|
- statement: "\\$\\((error|eval|filter|filter-out|findstring|firstword)[[:space:]]"
|
||||||
- statement: "\\$\\((flavor|foreach|if|info|join|lastword|notdir|or)[[:space:]]"
|
- statement: "\\$\\((flavor|foreach|if|info|join|lastword|notdir|or)[[:space:]]"
|
||||||
@@ -16,9 +16,20 @@ rules:
|
|||||||
- statement: "\\$\\((value|warning|wildcard|word|wordlist|words)[[:space:]]"
|
- statement: "\\$\\((value|warning|wildcard|word|wordlist|words)[[:space:]]"
|
||||||
- identifier: "^.+:"
|
- identifier: "^.+:"
|
||||||
- identifier: "[()$]"
|
- identifier: "[()$]"
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
- identifier: "\\$+(\\{[^} ]+\\}|\\([^) ]+\\))"
|
- identifier: "\\$+(\\{[^} ]+\\}|\\([^) ]+\\))"
|
||||||
- identifier: "\\$[@^<*?%|+]|\\$\\([@^<*?%+-][DF]\\)"
|
- identifier: "\\$[@^<*?%|+]|\\$\\([@^<*?%+-][DF]\\)"
|
||||||
- identifier: "\\$\\$|\\\\.?"
|
- identifier: "\\$\\$|\\\\.?"
|
||||||
- comment: "(^|[[:space:]])#([^{].*)?$"
|
- comment:
|
||||||
- comment: "^ @#.*"
|
start: "#"
|
||||||
|
end: "$"
|
||||||
|
rules: []
|
||||||
|
|||||||
@@ -1,21 +1,49 @@
|
|||||||
filetype: markdown
|
filetype: markdown
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.(md|mkd|mkdn|markdown)$"
|
filename: "\\.(md|mkd|mkdn|markdown)$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- preproc: ".*[ :]\\|[ :].*"
|
# Tables (Github extension)
|
||||||
- constant.string: "^>.*"
|
- type: ".*[ :]\\|[ :].*"
|
||||||
|
|
||||||
|
# quotes
|
||||||
|
- statement: "^>.*"
|
||||||
|
|
||||||
|
# Emphasis
|
||||||
- type: "(^|[[:space:]])(_[^ ][^_]*_|\\*[^ ][^*]*\\*)"
|
- type: "(^|[[:space:]])(_[^ ][^_]*_|\\*[^ ][^*]*\\*)"
|
||||||
- type.keyword: "(^|[[:space:]])(__[^ ][^_]*__|\\*\\*[^ ][^*]*\\*\\*)"
|
|
||||||
|
# Strong emphasis
|
||||||
|
- type: "(^|[[:space:]])(__[^ ][^_]*__|\\*\\*[^ ][^*]*\\*\\*)"
|
||||||
|
|
||||||
|
# strike-through
|
||||||
- type: "(^|[[:space:]])~~[^ ][^~]*~~"
|
- type: "(^|[[:space:]])~~[^ ][^~]*~~"
|
||||||
- symbol: "^(---+|\\+---+|===+|\\+===+|___+|\\*\\*\\*+|\\+\\*\\*\\*+)\\s*$"
|
|
||||||
- statement: "^#{1,6}.*"
|
# horizontal rules
|
||||||
- identifier: "^[[:space:]]*[\\*+\\-] |^[[:space:]]*[0-9]+\\. "
|
- special: "^(---+|===+|___+|\\*\\*\\*+)\\s*$"
|
||||||
- preproc: "\\b([CcRr]|[Tt][Mm])\\b|\\.{3}|(^|[[:space:]])\\-\\-($|[[:space:]])"
|
|
||||||
|
# headlines
|
||||||
|
- special: "^#{1,6}.*"
|
||||||
|
|
||||||
|
# lists
|
||||||
|
- identifier: "^[[:space:]]*[\\*+-] |^[[:space:]]*[0-9]+\\. "
|
||||||
|
|
||||||
|
# misc
|
||||||
|
- preproc: "(\\(([CcRr]|[Tt][Mm])\\)|\\.{3}|(^|[[:space:]])\\-\\-($|[[:space:]]))"
|
||||||
|
|
||||||
|
# links
|
||||||
- constant: "\\[[^]]+\\]"
|
- constant: "\\[[^]]+\\]"
|
||||||
- constant: "\\[([^][]|\\[[^]]*\\])*\\]\\([^)]+\\)"
|
- constant: "\\[([^][]|\\[[^]]*\\])*\\]\\([^)]+\\)"
|
||||||
|
|
||||||
|
# images
|
||||||
- underlined: "!\\[[^][]*\\](\\([^)]+\\)|\\[[^]]+\\])"
|
- underlined: "!\\[[^][]*\\](\\([^)]+\\)|\\[[^]]+\\])"
|
||||||
- underlined.url: "https?://[^ )>]+"
|
|
||||||
- special: "`.*?`|^ {4}[^\\-+*].*"
|
# urls
|
||||||
- symbol: "^```$"
|
- underlined: "https?://[^ )>]+"
|
||||||
|
|
||||||
|
- special: "^```$"
|
||||||
|
|
||||||
|
- special:
|
||||||
|
start: "`"
|
||||||
|
end: "`"
|
||||||
|
rules: []
|
||||||
|
|||||||
@@ -1,17 +1,22 @@
|
|||||||
filetype: micro
|
filetype: micro
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.(micro)$"
|
filename: "\\.(micro)$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- statement: "\\b(syntax|color(-link)?)\\b"
|
- statement: "\\b(syntax|color(-link)?)\\b"
|
||||||
- type.keyword: "\\b(start=|end=)\\b"
|
- statement: "\\b(start=|end=)\\b"
|
||||||
- identifier: "\\b(default|comment|symbol(.brackets|.tag)?|identifier|constant(.string(.char)?|.bool|.specialChar|.number)?|statement|preproc|type|special|underlined|error|todo|statusline|indent-char|(current-)?line-number|gutter-error|gutter-warning|cursor-line|color-column|tabbar)\\b"
|
- identifier: "\\b(default|comment|symbol|identifier|constant(.string(.char)?|.number)?|statement|preproc|type|special|underlined|error|todo|statusline|indent-char|(current-)?line-number|gutter-error|gutter-warning|cursor-line|color-column)\\b"
|
||||||
- preproc: "\\b(syntax|header)\\b"
|
|
||||||
- constant.number: "\\b(|h|A|0x)+[0-9]+(|h|A)+\\b"
|
- constant.number: "\\b(|h|A|0x)+[0-9]+(|h|A)+\\b"
|
||||||
- constant.number: "\\b0x[0-9 a-f A-F]+\\b"
|
- constant.number: "\\b0x[0-9 a-f A-F]+\\b"
|
||||||
- comment: "#.*$"
|
- comment:
|
||||||
- comment.bright: "##.*$"
|
start: "#"
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\""
|
end: "$"
|
||||||
- constant.number: "#[0-9 A-F a-f]{1,6}"
|
rules: []
|
||||||
- comment: "^#.*$"
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
- constant.number: "#[0-9 A-F a-f]+"
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
filetype: Objective-C
|
filetype: objective-c
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.(m|mm|h)$"
|
filename: "\\.(m|mm|h)$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
@@ -9,26 +9,49 @@ rules:
|
|||||||
- type: "\\b[A-Z][A-Z][[:alnum:]]*\\b"
|
- type: "\\b[A-Z][A-Z][[:alnum:]]*\\b"
|
||||||
- type: "\\b[A-Za-z0-9_]*_t\\b"
|
- type: "\\b[A-Za-z0-9_]*_t\\b"
|
||||||
- type: "\\bdispatch_[a-zA-Z0-9_]*_t\\b"
|
- type: "\\bdispatch_[a-zA-Z0-9_]*_t\\b"
|
||||||
- statement: "__attribute__[[:space:]]*\\(\\([^)]*\\)\\)|__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__|__unused|_Nonnull|_Nullable|__block|__builtin.*"
|
|
||||||
|
- statement: "(__attribute__[[:space:]]*\\(\\([^)]*\\)\\)|__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__|__unused|_Nonnull|_Nullable|__block|__builtin.*)"
|
||||||
- statement: "\\b(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\\b"
|
- statement: "\\b(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\\b"
|
||||||
- statement: "\\b(for|if|while|do|else|case|default|switch)\\b"
|
- statement: "\\b(for|if|while|do|else|case|default|switch)\\b"
|
||||||
- statement: "\\b(try|throw|catch|operator|new|delete)\\b"
|
- statement: "\\b(try|throw|catch|operator|new|delete)\\b"
|
||||||
- special: "\\b(goto|continue|break|return)\\b"
|
- statement: "\\b(goto|continue|break|return)\\b"
|
||||||
- statement: "\\b(nonatomic|atomic|readonly|readwrite|strong|weak|assign)\\b"
|
- statement: "\\b(nonatomic|atomic|readonly|readwrite|strong|weak|assign)\\b"
|
||||||
- statement: "@(encode|end|interface|implementation|class|selector|protocol|synchronized|try|catch|finally|property|optional|required|import|autoreleasepool)"
|
- statement: "@(encode|end|interface|implementation|class|selector|protocol|synchronized|try|catch|finally|property|optional|required|import|autoreleasepool)"
|
||||||
|
|
||||||
- preproc: "^[[:space:]]*#[[:space:]]*(define|include|import|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma).*$"
|
- preproc: "^[[:space:]]*#[[:space:]]*(define|include|import|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma).*$"
|
||||||
- preproc: "__[A-Z0-9_]*__"
|
- preproc: "__[A-Z0-9_]*__"
|
||||||
- special: "^[[:space:]]*[#|@][[:space:]]*(import|include)[[:space:]]*[\\\"|<].*\\/?[>|\\\"][[:space:]]*$"
|
|
||||||
- symbol.operator: "[.:;,+*|=!\\%\\[\\]]|<|>|/|-|&"
|
- special: "^[[:space:]]*[#|@][[:space:]]*(import|include)[[:space:]]*[\"|<].*\\/?[>|\"][[:space:]]*$"
|
||||||
- constant.number: "\\b(-?)?[0-9]+\\b|\\b\\[0-9]+\\.[0-9]+\\b|\\b0x[0-9A-F]+\\b"
|
|
||||||
- constant: "@\\[(\\\\.|[^\\]])*\\]|@\\{(\\\\.|[^\\}])*\\}|@\\((\\\\.|[^\\)])*\\)"
|
- statement: "([.:;,+*|=!\\%\\[\\]]|<|>|/|-|&)"
|
||||||
- constant.bool: "\\b(nil|NULL|YES|NO|TRUE|true|FALSE|false)\\b"
|
|
||||||
- special: "\\b(self)\\b"
|
- constant.number: "(\\b(-?)?[0-9]+\\b|\\b\\[0-9]+\\.[0-9]+\\b|\\b0x[0-9A-F]+\\b)"
|
||||||
|
- constant: "(@\\[(\\\\.|[^\\]])*\\]|@\\{(\\\\.|[^\\}])*\\}|@\\((\\\\.|[^\\)])*\\))"
|
||||||
|
- constant: "\\b<(\\\\.[^\\>])*\\>\\b"
|
||||||
|
- constant: "\\b(nil|NULL|YES|NO|TRUE|true|FALSE|false|self)\\b"
|
||||||
- constant: "\\bk[[:alnum]]*\\b"
|
- constant: "\\bk[[:alnum]]*\\b"
|
||||||
- constant.string: "\\\"(\\\\.|[^\\\"])*\\\"|@\\\"(\\\\.|[^\\\"])*\\\"|'.'"
|
- constant.string: "'.'"
|
||||||
- comment: "//.*"
|
|
||||||
|
- constant.string:
|
||||||
|
start: "@\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "//"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "/\\*"
|
start: "/\\*"
|
||||||
end: "\\*/"
|
end: "\\*/"
|
||||||
rules: []
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|||||||
@@ -1,17 +1,26 @@
|
|||||||
filetype: ocaml
|
filetype: ocaml
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.mli?$"
|
filename: "\\.mli?$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
|
# Numbers
|
||||||
|
## Integers
|
||||||
|
### Binary
|
||||||
- constant.number: "-?0[bB][01][01_]*"
|
- constant.number: "-?0[bB][01][01_]*"
|
||||||
|
### Octal
|
||||||
- constant.number: "-?0[oO][0-7][0-7_]*"
|
- constant.number: "-?0[oO][0-7][0-7_]*"
|
||||||
|
### Decimal
|
||||||
- constant.number: "-?\\d[\\d_]*"
|
- constant.number: "-?\\d[\\d_]*"
|
||||||
|
### Hexadecimal
|
||||||
- constant.number: "-?0[xX][0-9a-fA-F][0-9a-fA-F_]*"
|
- constant.number: "-?0[xX][0-9a-fA-F][0-9a-fA-F_]*"
|
||||||
|
## Real
|
||||||
|
### Decimal
|
||||||
- constant.number: "-?\\d[\\d_]*.\\d[\\d_]*([eE][+-]\\d[\\d_]*.\\d[\\d_]*)?"
|
- constant.number: "-?\\d[\\d_]*.\\d[\\d_]*([eE][+-]\\d[\\d_]*.\\d[\\d_]*)?"
|
||||||
- constant.number: "-?0[xX][0-9a-fA-F][0-9a-fA-F_]*.[0-9a-fA-F][0-9a-fA-F_]*([pP][+\\-][0-9a-fA-F][0-9a-fA-F_]*.[0-9a-fA-F][0-9a-fA-F_]*)?"
|
### Hexadecimal
|
||||||
|
- constant.number: "-?0[xX][0-9a-fA-F][0-9a-fA-F_]*.[0-9a-fA-F][0-9a-fA-F_]*([pP][+-][0-9a-fA-F][0-9a-fA-F_]*.[0-9a-fA-F][0-9a-fA-F_]*)?"
|
||||||
|
# Comments
|
||||||
- comment:
|
- comment:
|
||||||
start: "\\(\\*"
|
start: "\\(\\*"
|
||||||
end: "\\*\\)"
|
end: "\\*\\)"
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
filetype: pascal
|
filetype: pascal
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.pas$"
|
filename: "\\.pas$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
@@ -13,23 +13,31 @@ rules:
|
|||||||
start: "asm"
|
start: "asm"
|
||||||
end: "end"
|
end: "end"
|
||||||
rules: []
|
rules: []
|
||||||
|
- constant.number: "\\$[0-9A-Fa-f]+"
|
||||||
- constant.number: "\\$[0-9A-Fa-f]+|\\b[+\\-]?[0-9]+([.]?[0-9]+)?(?i:e[+\\-]?[0-9]+)?"
|
- constant.number: "\\b[+-]?[0-9]+([.]?[0-9]+)?(?i:e[+-]?[0-9]+)?"
|
||||||
- constant.string: "#[0-9]{1,}"
|
- constant.string:
|
||||||
- constant.string: "'(?:[^']+|'')*'"
|
start: "#[0-9]{1,}"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
- preproc:
|
- preproc:
|
||||||
start: "{\\$"
|
start: "{\\$"
|
||||||
end: "}"
|
end: "}"
|
||||||
rules: []
|
rules: []
|
||||||
|
- comment:
|
||||||
- comment: "//.*"
|
start: "//"
|
||||||
|
end: "$"
|
||||||
|
rules: []
|
||||||
- comment:
|
- comment:
|
||||||
start: "\\(\\*"
|
start: "\\(\\*"
|
||||||
end: "\\*\\)"
|
end: "\\*\\)"
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "({)(?:[^$])"
|
start: "({)(?:[^$])"
|
||||||
end: "}"
|
end: "}"
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
|
|||||||
@@ -1,33 +1,57 @@
|
|||||||
filetype: python
|
filetype: python
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.py$"
|
filename: "\\.py$"
|
||||||
header: "^#!.*/(env +)?python( |$)"
|
header: "^#!.*/(env +)?python( |$)"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
|
|
||||||
|
# built-in objects
|
||||||
- constant: "\\b(None|self|True|False)\\b"
|
- constant: "\\b(None|self|True|False)\\b"
|
||||||
|
# built-in attributes
|
||||||
- constant: "\\b(__bases__|__builtin__|__class__|__debug__|__dict__|__doc__|__file__|__members__|__methods__|__name__|__self__)\\b"
|
- constant: "\\b(__bases__|__builtin__|__class__|__debug__|__dict__|__doc__|__file__|__members__|__methods__|__name__|__self__)\\b"
|
||||||
|
# built-in functions
|
||||||
- identifier: "\\b(abs|apply|callable|chr|cmp|compile|delattr|dir|divmod|eval|exec|execfile|filter|format|getattr|globals|hasattr|hash|help|hex|id|input|intern|isinstance|issubclass|len|locals|max|min|next|oct|open|ord|pow|range|raw_input|reduce|reload|repr|round|setattr|unichr|vars|zip|__import__)\\b"
|
- identifier: "\\b(abs|apply|callable|chr|cmp|compile|delattr|dir|divmod|eval|exec|execfile|filter|format|getattr|globals|hasattr|hash|help|hex|id|input|intern|isinstance|issubclass|len|locals|max|min|next|oct|open|ord|pow|range|raw_input|reduce|reload|repr|round|setattr|unichr|vars|zip|__import__)\\b"
|
||||||
|
# special method names
|
||||||
- identifier: "\\b(__abs__|__add__|__and__|__call__|__cmp__|__coerce__|__complex__|__concat__|__contains__|__del__|__delattr__|__delitem__|__dict__|__delslice__|__div__|__divmod__|__float__|__getattr__|__getitem__|__getslice__|__hash__|__hex__|__init__|__int__|__inv__|__invert__|__len__|__long__|__lshift__|__mod__|__mul__|__neg__|__nonzero__|__oct__|__or__|__pos__|__pow__|__radd__|__rand__|__rcmp__|__rdiv__|__rdivmod__|__repeat__|__repr__|__rlshift__|__rmod__|__rmul__|__ror__|__rpow__|__rrshift__|__rshift__|__rsub__|__rxor__|__setattr__|__setitem__|__setslice__|__str__|__sub__|__xor__)\\b"
|
- identifier: "\\b(__abs__|__add__|__and__|__call__|__cmp__|__coerce__|__complex__|__concat__|__contains__|__del__|__delattr__|__delitem__|__dict__|__delslice__|__div__|__divmod__|__float__|__getattr__|__getitem__|__getslice__|__hash__|__hex__|__init__|__int__|__inv__|__invert__|__len__|__long__|__lshift__|__mod__|__mul__|__neg__|__nonzero__|__oct__|__or__|__pos__|__pow__|__radd__|__rand__|__rcmp__|__rdiv__|__rdivmod__|__repeat__|__repr__|__rlshift__|__rmod__|__rmul__|__ror__|__rpow__|__rrshift__|__rshift__|__rsub__|__rxor__|__setattr__|__setitem__|__setslice__|__str__|__sub__|__xor__)\\b"
|
||||||
|
# types
|
||||||
- type: "\\b(basestring|bool|buffer|bytearray|bytes|classmethod|complex|dict|enumerate|file|float|frozenset|int|list|long|map|memoryview|object|property|reversed|set|slice|staticmethod|str|super|tuple|type|unicode|xrange)\\b"
|
- type: "\\b(basestring|bool|buffer|bytearray|bytes|classmethod|complex|dict|enumerate|file|float|frozenset|int|list|long|map|memoryview|object|property|reversed|set|slice|staticmethod|str|super|tuple|type|unicode|xrange)\\b"
|
||||||
|
# definitions
|
||||||
- identifier: "def [a-zA-Z_0-9]+"
|
- identifier: "def [a-zA-Z_0-9]+"
|
||||||
- preproc: "\\b(import)\\b"
|
# keywords
|
||||||
- statement: "\\b(and|as|assert|class|def|del|elif|else|except|finally|for|from|global|if|in|is|lambda|not|or|pass|print|raise|try|while|with|yield)\\b"
|
- statement: "\\b(and|as|assert|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield)\\b"
|
||||||
- special: "\\b(break|continue|return)\\b"
|
# decorators
|
||||||
- special: "@.*[(]"
|
- brightgreen: "@.*[(]"
|
||||||
- symbol.operator: "[.:;,+*|=!\\%@]|<|>|/|-|&"
|
# operators
|
||||||
- symbol.brackets: "[(){}]|\\[|\\]"
|
- statement: "([.:;,+*|=!\\%@]|<|>|/|-|&)"
|
||||||
|
# parentheses
|
||||||
|
- statement: "([(){}]|\\[|\\])"
|
||||||
|
# numbers
|
||||||
- constant.number: "\\b[0-9]+\\b"
|
- constant.number: "\\b[0-9]+\\b"
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
|
||||||
- comment: "#.*$"
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "\"\"\"([^\"]|$)"
|
start: "#"
|
||||||
|
end: "$"
|
||||||
|
rules: []
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "\"\"\""
|
||||||
end: "\"\"\""
|
end: "\"\"\""
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "'''([^']|$)"
|
start: "'''"
|
||||||
end: "'''"
|
end: "'''"
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
- preproc.shebang: "^#!.+?( |$)"
|
|
||||||
|
|||||||
@@ -1,33 +1,56 @@
|
|||||||
filetype: python3
|
filename: python3
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.py3$"
|
filename: "\\.py3$"
|
||||||
header: "^#!.*/(env +)?python3$"
|
header: "^#!.*/(env +)?python3$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
|
# built-in objects
|
||||||
- constant: "\\b(None|self|True|False)\\b"
|
- constant: "\\b(None|self|True|False)\\b"
|
||||||
|
# built-in attributes
|
||||||
- constant: "\\b(__bases__|__builtin__|__class__|__debug__|__dict__|__doc__|__file__|__members__|__methods__|__name__|__self__)\\b"
|
- constant: "\\b(__bases__|__builtin__|__class__|__debug__|__dict__|__doc__|__file__|__members__|__methods__|__name__|__self__)\\b"
|
||||||
|
# built-in functions
|
||||||
- identifier: "\\b(abs|all|any|ascii|bin|callable|chr|compile|delattr|dir|divmod|eval|exec|format|getattr|globals|hasattr|hash|help|hex|id|input|isinstance|issubclass|iter|len|locals|max|min|next|oct|open|ord|pow|print|repr|round|setattr|sorted|sum|vars|__import__)\\b"
|
- identifier: "\\b(abs|all|any|ascii|bin|callable|chr|compile|delattr|dir|divmod|eval|exec|format|getattr|globals|hasattr|hash|help|hex|id|input|isinstance|issubclass|iter|len|locals|max|min|next|oct|open|ord|pow|print|repr|round|setattr|sorted|sum|vars|__import__)\\b"
|
||||||
|
# special method names
|
||||||
- identifier: "\\b(__abs__|__add__|__and__|__call__|__cmp__|__coerce__|__complex__|__concat__|__contains__|__del__|__delattr__|__delitem__|__delslice__|__div__|__divmod__|__float__|__getattr__|__getitem__|__getslice__|__hash__|__hex__|__init__|__int__|__inv__|__invert__|__len__|__dict__|__long__|__lshift__|__mod__|__mul__|__neg__|__next__|__nonzero__|__oct__|__or__|__pos__|__pow__|__radd__|__rand__|__rcmp__|__rdiv__|__rdivmod__|__repeat__|__repr__|__rlshift__|__rmod__|__rmul__|__ror__|__rpow__|__rrshift__|__rshift__|__rsub__|__rxor__|__setattr__|__setitem__|__setslice__|__str__|__sub__|__xor__)\\b"
|
- identifier: "\\b(__abs__|__add__|__and__|__call__|__cmp__|__coerce__|__complex__|__concat__|__contains__|__del__|__delattr__|__delitem__|__delslice__|__div__|__divmod__|__float__|__getattr__|__getitem__|__getslice__|__hash__|__hex__|__init__|__int__|__inv__|__invert__|__len__|__dict__|__long__|__lshift__|__mod__|__mul__|__neg__|__next__|__nonzero__|__oct__|__or__|__pos__|__pow__|__radd__|__rand__|__rcmp__|__rdiv__|__rdivmod__|__repeat__|__repr__|__rlshift__|__rmod__|__rmul__|__ror__|__rpow__|__rrshift__|__rshift__|__rsub__|__rxor__|__setattr__|__setitem__|__setslice__|__str__|__sub__|__xor__)\\b"
|
||||||
|
# types
|
||||||
- type: "\\b(bool|bytearray|bytes|classmethod|complex|dict|enumerate|filter|float|frozenset|int|list|map|memoryview|object|property|range|reversed|set|slice|staticmethod|str|super|tuple|type|zip)\\b"
|
- type: "\\b(bool|bytearray|bytes|classmethod|complex|dict|enumerate|filter|float|frozenset|int|list|map|memoryview|object|property|range|reversed|set|slice|staticmethod|str|super|tuple|type|zip)\\b"
|
||||||
- identifier: "def [a-zA-Z_0-9]+"
|
# definitions
|
||||||
- preproc: "\\b(import)\\b"
|
- identifier: "def [a-zA-Z_0-9]+"
|
||||||
- statement: "\\b(and|as|assert|class|def|del|elif|else|except|finally|for|from|global|if|in|is|lambda|nonlocal|not|or|pass|raise|try|while|with|yield)\\b"
|
# keywords
|
||||||
- special: "\\b(break|continue|return)\\b"
|
- statement: "\\b(and|as|assert|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|raise|return|try|while|with|yield)\\b"
|
||||||
- special: "@.*[(]"
|
# decorators
|
||||||
- symbol.operator: "[.:;,+*|=!\\%@]|<|>|/|-|&"
|
- brightgreen: "@.*[(]"
|
||||||
- symbol.brackets: "[(){}]|\\[|\\]"
|
# operators
|
||||||
|
- statement: "([.:;,+*|=!\\%@]|<|>|/|-|&)"
|
||||||
|
# parentheses
|
||||||
|
- statement: "([(){}]|\\[|\\])"
|
||||||
|
# numbers
|
||||||
- constant.number: "\\b[0-9]+\\b"
|
- constant.number: "\\b[0-9]+\\b"
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
|
||||||
- comment: "#.*$"
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "\"\"\"([^\"]|$)"
|
start: "#"
|
||||||
|
end: "$"
|
||||||
|
rules: []
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "\"\"\""
|
||||||
end: "\"\"\""
|
end: "\"\"\""
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "'''([^']|$)"
|
start: "'''"
|
||||||
end: "'''"
|
end: "'''"
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
- preproc.shebang: "^#!.+?( |$)"
|
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
filetype: r
|
filetype: r
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.(r|R)$"
|
filename: "\\.(r|R)$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- statement: "\\b(break|else|for|function|if|in|next|repeat|return|while)\\b"
|
- statement: "\\b(break|else|for|function|if|in|next|repeat|return|while)\\b"
|
||||||
- constant: "\\b(TRUE|FALSE|NULL|Inf|NaN|NA|NA_integer_|NA_real_|NA_complex_|NA_character_)\\b"
|
- constant: "\\b(TRUE|FALSE|NULL|Inf|NaN|NA|NA_integer_|NA_real_|NA_complex_|NA_character_)\\b"
|
||||||
- comment: "#.*$"
|
- comment:
|
||||||
|
start: "#"
|
||||||
|
end: "$"
|
||||||
|
rules: []
|
||||||
|
|||||||
@@ -1,24 +1,18 @@
|
|||||||
filetype: rst
|
filetype: rst
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.rest$|\\.rst$"
|
filename: "\\.rest$|\\.rst$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- identifier: "^[\\*+\\-] "
|
- statement: "\\*\\*[^*]+\\*\\*"
|
||||||
- identifier: "^[0-9]+?\\. "
|
- preproc: "::"
|
||||||
- type: "\\*[^*]+?\\*"
|
- constant.string: "`[^`]+`_{1,2}"
|
||||||
- type.keyword: "\\*\\*[^\\*]+\\*\\*"
|
- constant.string: "``[^`]+``"
|
||||||
- symbol: "::"
|
- identifier: "^\\.\\. .*$"
|
||||||
- underlined.url: "`[^`]+`_{1,2}"
|
- identifier: "^__ .*$"
|
||||||
- special: "``[^`]+``"
|
- type: "^###+$"
|
||||||
- comment: "^\\.\\. .*$"
|
- type: "^\\*\\*\\*+$"
|
||||||
- underlined: "^__ .*$"
|
- special: "^===+$"
|
||||||
- statement: "^###+$"
|
- special: "^---+$"
|
||||||
- statement: "^\\*\\*\\*+$"
|
- special: "^\\^\\^\\^+$"
|
||||||
- preproc: "^===+$"
|
- special: "^\"\"\"+$"
|
||||||
- identifier: "^---+$"
|
|
||||||
- type.keyword: "^\\^\\^\\^+$"
|
|
||||||
- constant: "^\"\"\"+$"
|
|
||||||
- underlined.url: "http(s)?://[^ )>]+"
|
|
||||||
- preproc: "\\+[\\-=+]+\\+"
|
|
||||||
- preproc: "\\|"
|
|
||||||
|
|||||||
@@ -1,35 +1,46 @@
|
|||||||
filetype: rust
|
filetype: rust
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.rs"
|
filename: "\\.rs$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- identifier.class: "fn [a-z0-9_]+"
|
# function definition
|
||||||
|
- identifier: "fn [a-z0-9_]+"
|
||||||
|
# Reserved words
|
||||||
- statement: "\\b(abstract|alignof|as|become|box|break|const|continue|crate|do|else|enum|extern|false|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|offsetof|override|priv|pub|pure|ref|return|sizeof|static|self|struct|super|true|trait|type|typeof|unsafe|unsized|use|virtual|where|while|yield)\\b"
|
- statement: "\\b(abstract|alignof|as|become|box|break|const|continue|crate|do|else|enum|extern|false|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|offsetof|override|priv|pub|pure|ref|return|sizeof|static|self|struct|super|true|trait|type|typeof|unsafe|unsized|use|virtual|where|while|yield)\\b"
|
||||||
- identifier.macro: "[a-z_]+!"
|
# macros
|
||||||
|
- special: "[a-z_]+!"
|
||||||
|
# Constants
|
||||||
- constant: "[A-Z][A-Z_]+"
|
- constant: "[A-Z][A-Z_]+"
|
||||||
|
# Numbers
|
||||||
- constant.number: "\\b[0-9]+\\b"
|
- constant.number: "\\b[0-9]+\\b"
|
||||||
|
# Traits/Enums/Structs/Types/etc.
|
||||||
- type: "[A-Z][a-z]+"
|
- type: "[A-Z][a-z]+"
|
||||||
- constant.string: "\\\".*\\\""
|
|
||||||
- constant.string:
|
- constant.string:
|
||||||
start: "\\\".*\\\\$"
|
start: "\""
|
||||||
end: ".*\\\""
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "r#+\""
|
||||||
|
end: "\"#+"
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
- special:
|
- comment:
|
||||||
start: "r#+\\\""
|
start: "//"
|
||||||
end: "\\\"#+"
|
end: "$"
|
||||||
rules: []
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|
||||||
- comment: "//.*"
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "/\\*"
|
start: "/\\*"
|
||||||
end: "\\*/"
|
end: "\\*/"
|
||||||
rules: []
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|
||||||
- special:
|
- special:
|
||||||
start: "#!\\["
|
start: "#!\\["
|
||||||
end: "\\]"
|
end: "\\]"
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
- todo: "(XXX|TODO|FIXME|\\?\\?\\?)"
|
|
||||||
|
|||||||
@@ -1,23 +1,27 @@
|
|||||||
filetype: scala
|
filetype: scala
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.scala$"
|
filename: "\\.scala$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- type: "\\b(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\\b"
|
- type: "\\b(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\\b"
|
||||||
- statement: "\\b(match|val|var|break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\\b"
|
- statement: "\\b(match|val|var|break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\\b"
|
||||||
- statement: "\\b(def|object|case|trait|lazy|implicit|abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile|sealed)\\b"
|
- statement: "\\b(def|object|case|trait|lazy|implicit|abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile|sealed)\\b"
|
||||||
- constant.string: "\"[^\"]*\""
|
- constant.string:
|
||||||
- constant.bool: "\\b(true|false|null)\\b"
|
start: "\""
|
||||||
- comment: "//.*"
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
- constant: "\\b(true|false|null)\\b"
|
||||||
|
- comment:
|
||||||
|
start: "//"
|
||||||
|
end: "$"
|
||||||
|
rules: []
|
||||||
- comment:
|
- comment:
|
||||||
start: "/\\*"
|
start: "/\\*"
|
||||||
end: "\\*/"
|
end: "\\*/"
|
||||||
rules: []
|
rules: []
|
||||||
|
- comment:
|
||||||
- comment.bright:
|
|
||||||
start: "/\\*\\*"
|
start: "/\\*\\*"
|
||||||
end: "\\*/"
|
end: "\\*/"
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
- indent-char.whitespace: "[[:space:]]+$"
|
|
||||||
|
|||||||
@@ -1,24 +1,41 @@
|
|||||||
filetype: shell
|
filetype: shell
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.sh$|\\.bash|\\.bashrc|bashrc|\\.bash_aliases|bash_aliases|\\.bash_functions|bash_functions|\\.bash_profile|bash_profile|Pkgfile|pkgmk.conf|profile|rc.conf|PKGBUILD|.ebuild\\$|APKBUILD"
|
filename: "(\\.sh$|\\.bash|\\.bashrc|bashrc|\\.bash_aliases|bash_aliases|\\.bash_functions|bash_functions|\\.bash_profile|bash_profile|Pkgfile|pkgmk.conf|profile|rc.conf|PKGBUILD|.ebuild\\$|APKBUILD)"
|
||||||
header: "^#!.*/(env +)?(ba)?sh( |$)"
|
header: "^#!.*/(env +)?(ba)?sh( |$)"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
|
# Numbers
|
||||||
- constant.number: "\\b[0-9]+\\b"
|
- constant.number: "\\b[0-9]+\\b"
|
||||||
|
# Conditionals and control flow
|
||||||
- statement: "\\b(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\\b"
|
- statement: "\\b(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\\b"
|
||||||
- symbol.operator: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|!|=|&|\\|)"
|
- special: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|!|=|&|\\|)"
|
||||||
|
# Shell commands
|
||||||
- type: "\\b(cd|echo|export|let|set|umask|unset)\\b"
|
- type: "\\b(cd|echo|export|let|set|umask|unset)\\b"
|
||||||
|
# Common linux commands
|
||||||
- type: "\\b((g|ig)?awk|bash|dash|find|\\w{0,4}grep|kill|killall|\\w{0,4}less|make|pkill|sed|sh|tar)\\b"
|
- type: "\\b((g|ig)?awk|bash|dash|find|\\w{0,4}grep|kill|killall|\\w{0,4}less|make|pkill|sed|sh|tar)\\b"
|
||||||
|
# Coreutils commands
|
||||||
- type: "\\b(base64|basename|cat|chcon|chgrp|chmod|chown|chroot|cksum|comm|cp|csplit|cut|date|dd|df|dir|dircolors|dirname|du|env|expand|expr|factor|false|fmt|fold|head|hostid|id|install|join|link|ln|logname|ls|md5sum|mkdir|mkfifo|mknod|mktemp|mv|nice|nl|nohup|nproc|numfmt|od|paste|pathchk|pinky|pr|printenv|printf|ptx|pwd|readlink|realpath|rm|rmdir|runcon|seq|(sha1|sha224|sha256|sha384|sha512)sum|shred|shuf|sleep|sort|split|stat|stdbuf|stty|sum|sync|tac|tail|tee|test|time|timeout|touch|tr|true|truncate|tsort|tty|uname|unexpand|uniq|unlink|users|vdir|wc|who|whoami|yes)\\b"
|
- type: "\\b(base64|basename|cat|chcon|chgrp|chmod|chown|chroot|cksum|comm|cp|csplit|cut|date|dd|df|dir|dircolors|dirname|du|env|expand|expr|factor|false|fmt|fold|head|hostid|id|install|join|link|ln|logname|ls|md5sum|mkdir|mkfifo|mknod|mktemp|mv|nice|nl|nohup|nproc|numfmt|od|paste|pathchk|pinky|pr|printenv|printf|ptx|pwd|readlink|realpath|rm|rmdir|runcon|seq|(sha1|sha224|sha256|sha384|sha512)sum|shred|shuf|sleep|sort|split|stat|stdbuf|stty|sum|sync|tac|tail|tee|test|time|timeout|touch|tr|true|truncate|tsort|tty|uname|unexpand|uniq|unlink|users|vdir|wc|who|whoami|yes)\\b"
|
||||||
|
# Conditional flags
|
||||||
- statement: "--[a-z-]+"
|
- statement: "--[a-z-]+"
|
||||||
- statement: "\\ -[a-z]+"
|
- statement: "\\ -[a-z]+"
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\""
|
|
||||||
- constant.string: "'(\\\\.|[^'])*'"
|
- identifier: "\\$\\{?[0-9A-Z_!@#$*?-]+\\}?"
|
||||||
- constant.specialChar: "\""
|
- identifier: "\\$\\{?[0-9A-Z_!@#$*?-]+\\}?"
|
||||||
- constant.specialChar: "'"
|
|
||||||
- identifier.var: "\\$\\{?[0-9A-Za-z_!@#$*?-]+\\}?"
|
- constant.string:
|
||||||
- identifier.var: "\\$\\{?[0-9A-Za-z_!@#$*?-]+\\}?"
|
start: "\""
|
||||||
- comment: "(^|[[:space:]])#.*$"
|
end: "\""
|
||||||
- todo: "(TODO|XXX|FIXME):?"
|
rules:
|
||||||
- preproc.shebang: "^#!.+?( |$)"
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules: []
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "#"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
filetype: solidity
|
filetype: solidity
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.sol$"
|
filename: "\\.sol$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
@@ -8,16 +8,31 @@ rules:
|
|||||||
- constant.number: "\\b[-]?([0-9]+|0x[0-9a-fA-F]+)\\b"
|
- constant.number: "\\b[-]?([0-9]+|0x[0-9a-fA-F]+)\\b"
|
||||||
- identifier: "[a-zA-Z][_a-zA-Z0-9]*[[:space:]]*"
|
- identifier: "[a-zA-Z][_a-zA-Z0-9]*[[:space:]]*"
|
||||||
- statement: "\\b(assembly|break|continue|do|for|function|if|else|new|return|returns|while)\\b"
|
- statement: "\\b(assembly|break|continue|do|for|function|if|else|new|return|returns|while)\\b"
|
||||||
- special: "\\b(\\.send|throw)\\b"
|
- special: "\\b(\\.send|throw)\\b" # make sure they are very visible
|
||||||
- type.keyword: "\\b(anonymous|constant|indexed|payable|public|private|external|internal)\\b"
|
- keyword: "\\b(anonymous|constant|indexed|payable|public|private|external|internal)\\b"
|
||||||
- constant: "\\b(block(\\.(blockhash|coinbase|difficulty|gaslimit|number|timestamp))?|msg(\\.(data|gas|sender|value))?|now|tx(\\.(gasprice|origin))?)\\b"
|
- constant: "\\b(block(\\.(blockhash|coinbase|difficulty|gaslimit|number|timestamp))?|msg(\\.(data|gas|sender|value))?|now|tx(\\.(gasprice|origin))?)\\b"
|
||||||
- constant: "\\b(keccak256|sha3|sha256|ripemd160|ecrecover|addmod|mulmod|this|super|selfdestruct|\\.balance)\\b"
|
- constant: "\\b(keccak256|sha3|sha256|ripemd160|ecrecover|addmod|mulmod|this|super|selfdestruct|\\.balance)\\b"
|
||||||
- constant.bool: "\\b(true|false)\\b"
|
- constant: "\\b(true|false)\\b"
|
||||||
- constant: "\\b(wei|szabo|finney|ether|seconds|minutes|hours|days|weeks|years)\\b"
|
- constant: "\\b(wei|szabo|finney|ether|seconds|minutes|hours|days|weeks|years)\\b"
|
||||||
- type: "\\b(address|bool|mapping|string|var|int(\\d*)|uint(\\d*)|byte(\\d*)|fixed(\\d*)|ufixed(\\d*))\\b"
|
- type: "\\b(address|bool|mapping|string|var|int(\\d*)|uint(\\d*)|byte(\\d*)|fixed(\\d*)|ufixed(\\d*))\\b"
|
||||||
- error: "\\b(abstract|after|case|catch|default|final|in|inline|interface|let|match|null|of|pure|relocatable|static|switch|try|type|typeof|view)\\b"
|
- error: "\\b(abstract|after|case|catch|default|final|in|inline|interface|let|match|null|of|pure|relocatable|static|switch|try|type|typeof|view)\\b"
|
||||||
- symbol.operator: "[-+/*=<>!~%?:&|]"
|
- operator: "[-+/*=<>!~%?:&|]"
|
||||||
- comment: "(^|[[:space:]])//.*"
|
- comment:
|
||||||
- comment: "/\\*.+\\*/"
|
start: "//"
|
||||||
|
end: "$"
|
||||||
|
rules: []
|
||||||
|
- comment:
|
||||||
|
start: "/\\*"
|
||||||
|
end: "\\*/"
|
||||||
|
rules: []
|
||||||
- todo: "TODO:?"
|
- todo: "TODO:?"
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|||||||
@@ -1,25 +1,49 @@
|
|||||||
filetype: swift
|
filetype: swift
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.swift$"
|
filename: "\\.swift$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- symbol.operator: "[.:;,+*|=!?\\%]|<|>|/|-|&"
|
# Operators
|
||||||
- statement: "(class|import|let|var|struct|enum|func|if|else|switch|case|default|for|in|internal|external|unowned|private|public|throws)\\ "
|
- statement: "([.:;,+*|=!?\\%]|<|>|/|-|&)"
|
||||||
- statement: "(prefix|postfix|operator|extension|lazy|get|set|self|willSet|didSet|override|super|convenience|weak|strong|mutating|return|guard)\\ "
|
|
||||||
- preproc: "(print)"
|
# Statements
|
||||||
- preproc: "(init)"
|
- statement: "(class|import|let|var|struct|enum|func|if|else|switch|case|default|for|in|internal|external|unowned|private|public|throws)\\ "
|
||||||
|
- statement: "(prefix|postfix|operator|extension|lazy|get|set|self|willSet|didSet|override|super|convenience|weak|strong|mutating|return|guard)\\ "
|
||||||
|
|
||||||
|
# Keywords
|
||||||
|
- statement: "(print)"
|
||||||
|
- statement: "(init)"
|
||||||
|
|
||||||
|
# Numbers
|
||||||
- constant.number: "([0-9]+)"
|
- constant.number: "([0-9]+)"
|
||||||
|
|
||||||
|
# Standard Types
|
||||||
- type: "\\ ((U)?Int(8|16|32|64))"
|
- type: "\\ ((U)?Int(8|16|32|64))"
|
||||||
- constant.bool: "(true|false|nil)"
|
- constant: "(true|false|nil)"
|
||||||
- type: "\\ (Double|String|Float|Boolean|Dictionary|Array|Int)"
|
- type: "\\ (Double|String|Float|Boolean|Dictionary|Array|Int)"
|
||||||
- type: "\\ (AnyObject)"
|
- type: "\\ (AnyObject)"
|
||||||
- constant.string: "\"[^\"]*\""
|
|
||||||
- comment: "//.*"
|
- constant.string:
|
||||||
- comment: "///.*"
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "//"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "///"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "/\\*\\*"
|
start: "/\\*\\*"
|
||||||
end: "\\*/"
|
end: "\\*/"
|
||||||
rules: []
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
- comment: "[/**]"
|
|
||||||
|
|||||||
@@ -135,10 +135,10 @@ func generateFile(filetype, syntax, header string, rules []interface{}) string {
|
|||||||
output := ""
|
output := ""
|
||||||
|
|
||||||
output += fmt.Sprintf("filetype: %s\n\n", filetype)
|
output += fmt.Sprintf("filetype: %s\n\n", filetype)
|
||||||
output += fmt.Sprintf("detect: \n filename: \"%s\"\n", strings.Replace(syntax, "\\", "\\\\", -1))
|
output += fmt.Sprintf("detect: \n filename: \"%s\"\n", strings.Replace(strings.Replace(syntax, "\\", "\\\\", -1), "\"", "\\\"", -1))
|
||||||
|
|
||||||
if header != "" {
|
if header != "" {
|
||||||
output += fmt.Sprintf(" header: \"%s\"\n", strings.Replace(header, "\\", "\\\\", -1))
|
output += fmt.Sprintf(" header: \"%s\"\n", strings.Replace(strings.Replace(header, "\\", "\\\\", -1), "\"", "\\\"", -1))
|
||||||
}
|
}
|
||||||
|
|
||||||
output += "\nrules:\n"
|
output += "\nrules:\n"
|
||||||
|
|||||||
@@ -4,23 +4,28 @@ detect:
|
|||||||
filename: "\\.tex$|bib|\\.bib$|cls|\\.cls$"
|
filename: "\\.tex$|bib|\\.bib$|cls|\\.cls$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
|
# colorize the identifiers of {<identifier>} and [<identifier>]
|
||||||
- identifier:
|
- identifier:
|
||||||
start: "\\{"
|
start: "\\{"
|
||||||
end: "\\}"
|
end: "\\}"
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
- identifier:
|
- identifier:
|
||||||
start: "\\["
|
start: "\\["
|
||||||
end: "\\]"
|
end: "\\]"
|
||||||
rules: []
|
rules: []
|
||||||
|
# numbers
|
||||||
- constant.number: "\\b[0-9]+(\\.[0-9]+)?([[:space:]](pt|mm|cm|in|ex|em|bp|pc|dd|cc|nd|nc|sp))?\\b"
|
- constant.number: "\\b[0-9]+(\\.[0-9]+)?([[:space:]](pt|mm|cm|in|ex|em|bp|pc|dd|cc|nd|nc|sp))?\\b"
|
||||||
- symbol.brackets: "[{}\\[\\]]"
|
# let brackets have the default color again
|
||||||
|
- default: "[{}\\[\\]]"
|
||||||
- special: "[&\\\\]"
|
- special: "[&\\\\]"
|
||||||
- identifier.macro: "\\\\@?[a-zA-Z_]+"
|
# macros
|
||||||
- comment: "%.*"
|
- statement: "\\\\@?[a-zA-Z_]+"
|
||||||
|
# comments
|
||||||
|
- comment:
|
||||||
|
start: "%"
|
||||||
|
end: "$"
|
||||||
|
rules: []
|
||||||
- comment:
|
- comment:
|
||||||
start: "\\\\begin\\{comment\\}"
|
start: "\\\\begin\\{comment\\}"
|
||||||
end: "\\\\end\\{comment\\}"
|
end: "\\\\end\\{comment\\}"
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,39 @@
|
|||||||
filetype: toml
|
filetype: toml
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.toml$"
|
filename: "\\.toml"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- statement: "(.*)[[:space:]]="
|
- statement: "(.*)[[:space:]]="
|
||||||
- special: "="
|
- special: "="
|
||||||
- symbol.brackets: "(\\[|\\])"
|
|
||||||
|
# Bracket thingies
|
||||||
|
- special: "(\\[|\\])"
|
||||||
|
|
||||||
|
# Numbers and strings
|
||||||
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b|'.'"
|
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b|'.'"
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
- constant.number: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
||||||
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
|
|
||||||
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
- constant.string:
|
||||||
- constant.string: "`[^`]*`"
|
start: "\""
|
||||||
- constant.specialChar: "\""
|
end: "\""
|
||||||
- constant.specialChar: "'"
|
rules:
|
||||||
- comment: "(^|[[:space:]])#.*"
|
- constant.specialChar: "\\\\."
|
||||||
- todo: "(TODO|XXX|FIXME):?"
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "`"
|
||||||
|
end: "`"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "#"
|
||||||
|
end: "$"
|
||||||
|
rules:
|
||||||
|
- todo: "(TODO|XXX|FIXME):?"
|
||||||
|
|||||||
@@ -1,26 +1,42 @@
|
|||||||
filetype: typescript
|
filetype: typescript
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.ts$"
|
filename: "\\.ts$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- constant.number: "\\b[\\-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
|
- constant.number: "\\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
|
||||||
- constant.number: "\\b[\\-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+\\-]?[0-9]+)?[fFlL]?"
|
- constant.number: "\\b[-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
|
||||||
- constant.number: "\\b[\\-+]?([0-9]+[EePp][+\\-]?[0-9]+)[fFlL]?"
|
- constant.number: "\\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
|
||||||
- identifier.class: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
|
- identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
|
||||||
- statement: "\\b(abstract|as|async|await|break|case|catch|class|const|constructor|continue)\\b"
|
- statement: "\\b(abstract|as|async|await|break|case|catch|class|const|constructor|continue)\\b"
|
||||||
- statement: "\\b(debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from)\\b"
|
- statement: "\\b(debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from)\\b"
|
||||||
- statement: "\\b(function|get|if|implements|import|in|instanceof|interface|is|let|module|namespace)\\b"
|
- statement: "\\b(function|get|if|implements|import|in|instanceof|interface|is|let|module|namespace)\\b"
|
||||||
- statement: "\\b(new|of|package|private|protected|public|require|return|set|static|super|switch)\\b"
|
- statement: "\\b(new|of|package|private|protected|public|require|return|set|static|super|switch)\\b"
|
||||||
- statement: "\\b(this|throw|try|type|typeof|var|void|while|with|yield)\\b"
|
- statement: "\\b(this|throw|try|type|typeof|var|void|while|with|yield)\\b"
|
||||||
- constant.bool: "\\b(false|true|null|undefined|NaN)\\b"
|
- constant: "\\b(false|true|null|undefined|NaN)\\b"
|
||||||
- type: "\\b(Array|Boolean|Date|Enumerator|Error|Function|Math)\\b"
|
- type: "\\b(Array|Boolean|Date|Enumerator|Error|Function|Math)\\b"
|
||||||
- type: "\\b(Number|Object|RegExp|String|Symbol)\\b"
|
- type: "\\b(Number|Object|RegExp|String|Symbol)\\b"
|
||||||
- type: "\\b(any|boolean|never|number|string|symbol)\\b"
|
- type: "\\b(any|boolean|never|number|string|symbol)\\b"
|
||||||
- symbol.operator: "[\\-+/*=<>!~%?:&|]"
|
- statement: "[-+/*=<>!~%?:&|]"
|
||||||
- constant: "/[^*]([^/]|(\\\\/))*[^\\\\]/[gim]*"
|
- constant: "/[^*]([^/]|(\\\\/))*[^\\\\]/[gim]*"
|
||||||
- constant: "\\\\[0-7][0-7]?[0-7]?|\\\\x[0-9a-fA-F]+|\\\\[bfnrt'\"\\?\\\\]"
|
- constant: "\\\\[0-7][0-7]?[0-7]?|\\\\x[0-9a-fA-F]+|\\\\[bfnrt'\"\\?\\\\]"
|
||||||
- comment: "(^|[[:space:]])//.*"
|
- comment:
|
||||||
- comment: "/\\*.+\\*/"
|
start: "//"
|
||||||
- todo: "TODO:?"
|
end: "$"
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
rules: []
|
||||||
|
- comment:
|
||||||
|
start: "/\\*"
|
||||||
|
end: "\\*/"
|
||||||
|
rules:
|
||||||
|
- todo: "TODO:?"
|
||||||
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
@@ -1,13 +1,29 @@
|
|||||||
filetype: vi
|
filetype: vi
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "(^|/|\\.)(ex|vim)rc$|\\.vim"
|
filename: "(^|/|\\.)(ex|vim)rc$|\\.vim"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
|
- identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
|
||||||
- statement: "\\b([nvxsoilc]?(nore|un)?map|[nvlx]n|[ico]?no|[cilovx][um]|s?unm)\\b"
|
- statement: "\\b([nvxsoilc]?(nore|un)?map|[nvlx]n|[ico]?no|[cilovx][um]|s?unm)\\b"
|
||||||
- statement: "\\b(snor|nun|nm|set|if|endif|let|unlet)\\b"
|
- statement: "\\b(snor|nun|nm|set|if|endif|let|unlet)\\b"
|
||||||
- symbol.operator: "[!&=]"
|
- statement: "[!&=]"
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
|
||||||
- constant.number: "\\b[0-9]+\\b"
|
- constant.number: "\\b[0-9]+\\b"
|
||||||
- comment: "(^|[[:space:]])\\\"[^\"]*$"
|
|
||||||
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.comment:
|
||||||
|
start: "\""
|
||||||
|
end: "$"
|
||||||
|
rules: []
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
filetype: xml
|
filetype: xml
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.(xml|sgml?|rng|plist)$"
|
filename: "\\.(xml|sgml?|rng|plist)$"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- symbol.tag: "<.*?>"
|
- identifier: "<.*?>"
|
||||||
- preproc:
|
- comment:
|
||||||
start: "<!DOCTYPE"
|
start: "<!DOCTYPE"
|
||||||
end: "[/]?>"
|
end: "[/]?>"
|
||||||
rules: []
|
rules: []
|
||||||
|
- comment:
|
||||||
- comment: "<!--.+?-->"
|
start: "<!--"
|
||||||
|
end: "-->"
|
||||||
|
rules: []
|
||||||
- special: "&[^;]*;"
|
- special: "&[^;]*;"
|
||||||
|
|||||||
@@ -1,19 +1,32 @@
|
|||||||
filetype: yaml
|
filetype: yaml
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.ya?ml$"
|
filename: "\\.ya?ml$"
|
||||||
header: "%YAML"
|
header: "%YAML"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- type: "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) "
|
- type: "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) "
|
||||||
- constant.bool.true: "\\b(YES|yes|Y|y|ON|on)\\b"
|
- constant: "\\b(YES|yes|Y|y|ON|on|NO|no|N|n|OFF|off)\\b"
|
||||||
- constant.bool.false: "\\b(NO|no|N|n|OFF|off)\\b"
|
- constant: "\\b(true|false)\\b"
|
||||||
- constant.bool.true: "\\b(true)\\b"
|
- statement: "(:[[:space:]]|\\[|\\]|:[[:space:]]+[|>]|^[[:space:]]*- )"
|
||||||
- constant.bool.false: "\\b(false)\\b"
|
|
||||||
- statement: ":[[:space:]]|\\[|\\]|:[[:space:]]+[|>]|^[[:space:]]*- "
|
|
||||||
- identifier: "[[:space:]][\\*&][A-Za-z0-9]+"
|
- identifier: "[[:space:]][\\*&][A-Za-z0-9]+"
|
||||||
- type: "([-\\w\\.\\/]+[[:space:]]*:\\s+)|([-\\w\\.\\/]+[[:space:]]*:$)"
|
- type: "([-\\w]+:\\s+)|([-\\w]+:$)"
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
- special: "(^---|^\\.\\.\\.|^%YAML|^%TAG)"
|
||||||
- comment: "(^|[[:space:]])#([^{].*)?$"
|
|
||||||
- special: "^---|^\\.\\.\\.|^%YAML|^%TAG"
|
- constant.string:
|
||||||
- indent-char.whitespace: " $"
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "#"
|
||||||
|
end: "$"
|
||||||
|
rules: []
|
||||||
|
|
||||||
|
|||||||
@@ -1,24 +1,50 @@
|
|||||||
filetype: zsh
|
filetype: zsh
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
filename: "\\.zsh$|\\.?(zshenv|zprofile|zshrc|zlogin|zlogout|zsh-theme)$"
|
filename: "(\\.zsh$|\\.?(zshenv|zprofile|zshrc|zlogin|zlogout)$)"
|
||||||
header: "^#!.*/(env +)?zsh( |$)"
|
header: "^#!.*/(env +)?zsh( |$)"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
|
## Numbers
|
||||||
- constant.number: "\\b[0-9]+\\b"
|
- constant.number: "\\b[0-9]+\\b"
|
||||||
|
|
||||||
|
## Conditionals and control flow
|
||||||
- statement: "\\b(always|break|bye|case|continue|disown|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\\b"
|
- statement: "\\b(always|break|bye|case|continue|disown|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\\b"
|
||||||
- symbol.operator: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|!|=|&|\\|)"
|
|
||||||
- statement: "-[Ldefgruwx]\\b"
|
- statement: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|!|=|&|\\|)"
|
||||||
- statement: "-(eq|ne|gt|lt|ge|le|s|n|z)\\b"
|
## Conditional flags
|
||||||
- preproc: "\\b((un)?alias|bindkey|builtin|cd|declare|eval|exec|export|jobs|let|popd|pushd|set|source|typeset|umask|unset)\\b"
|
- special: "-[Ldefgruwx]\\b"
|
||||||
- preproc: "\\b(add-zsh-hook|autoload|chdir|compinit|dirs|(dis|en)able|echotc|emulate|print|prompt(init)?|(un)?setopt|zle|zmodload|zstyle|whence)\\b"
|
- special: "-(eq|ne|gt|lt|ge|le|s|n|z)\\b"
|
||||||
- special: "\\b((g|ig)?awk|find|\\w{0,4}grep|kill|killall|\\w{0,4}less|make|pkill|sed|tar)\\b"
|
|
||||||
- type: "\\b(base64|basename|cat|chcon|chgrp|chmod|chown|chroot|cksum|comm|cp|csplit|cut|date|dd|df|dir|dircolors|dirname|du|echo|env|expand|expr|factor|false|fmt|fold|head|hostid|id|install|join|link|ln|logname|ls|md5sum|mkdir|mkfifo|mknod|mktemp|mv|nice|nl|nohup|nproc|numfmt|od|paste|pathchk|pinky|pr|printenv|printf|ptx|pwd|readlink|realpath|rm|rmdir|runcon|seq|(sha1|sha224|sha256|sha384|sha512)sum|shred|shuf|sleep|sort|split|stat|stdbuf|stty|sum|sync|tac|tail|tee|test|timeout|touch|tr|true|truncate|tsort|tty|uname|unexpand|uniq|unlink|users|vdir|wc|who|whoami|yes)\\b"
|
## Bash-inherited
|
||||||
- identifier.class: "^\\s+(function\\s+)[0-9A-Z_]+\\s+\\(\\)"
|
- statement: "\\b((un)?alias|bindkey|builtin|cd|declare|eval|exec|export|jobs|let|popd|pushd|set|source|typeset|umask|unset)\\b"
|
||||||
- identifier.var: "\\$\\{?[0-9A-Z_!@#$*?-]+\\}?"
|
## ZSH-specific
|
||||||
- constant.string: "\"(\\\\.|[^\"])*\""
|
- type: "\\b(add-zsh-hook|autoload|chdir|compinit|dirs|(dis|en)able|echotc|emulate|print|prompt(init)?|(un)?setopt|zle|zmodload|zstyle|whence)\\b"
|
||||||
- constant.string: "'(\\\\.|[^'])*'"
|
|
||||||
- comment: "(^|[[:space:]])#.*$"
|
## Common linux commands
|
||||||
- comment.bright: "(^|[[:space:]])##.*$"
|
- statement: "\\b((g|ig)?awk|find|\\w{0,4}grep|kill|killall|\\w{0,4}less|make|pkill|sed|tar)\\b"
|
||||||
- indent-char.whitespace: "[[:space:]]+$"
|
|
||||||
- preproc.shebang: "^#!.+?( |$)"
|
## Coreutils commands
|
||||||
|
- statement: "\\b(base64|basename|cat|chcon|chgrp|chmod|chown|chroot|cksum|comm|cp|csplit|cut|date|dd|df|dir|dircolors|dirname|du|echo|env|expand|expr|factor|false|fmt|fold|head|hostid|id|install|join|link|ln|logname|ls|md5sum|mkdir|mkfifo|mknod|mktemp|mv|nice|nl|nohup|nproc|numfmt|od|paste|pathchk|pinky|pr|printenv|printf|ptx|pwd|readlink|realpath|rm|rmdir|runcon|seq|(sha1|sha224|sha256|sha384|sha512)sum|shred|shuf|sleep|sort|split|stat|stdbuf|stty|sum|sync|tac|tail|tee|test|timeout|touch|tr|true|truncate|tsort|tty|uname|unexpand|uniq|unlink|users|vdir|wc|who|whoami|yes)\\b"
|
||||||
|
|
||||||
|
## Function definition
|
||||||
|
- identifier: "^\\s+(function\\s+)[0-9A-Z_]+\\s+\\(\\)" # (i)
|
||||||
|
|
||||||
|
## Variables
|
||||||
|
- identifier: "\\$\\{?[0-9A-Z_!@#$*?-]+\\}?" #(i)
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules: []
|
||||||
|
|
||||||
|
- comment:
|
||||||
|
start: "#"
|
||||||
|
end: "$"
|
||||||
|
rules: []
|
||||||
|
|||||||
Reference in New Issue
Block a user