Improve new syntax files and fix a region glitch

This commit is contained in:
Zachary Yedidia
2017-03-21 15:07:39 -04:00
parent b977bf5cca
commit 54bb99d758
67 changed files with 2941 additions and 642 deletions

View File

@@ -1,18 +1,39 @@
filetype: toml
detect:
filename: "\\.toml$"
detect:
filename: "\\.toml"
rules:
- statement: "(.*)[[:space:]]="
- special: "="
- symbol.brackets: "(\\[|\\])"
# Bracket thingies
- special: "(\\[|\\])"
# Numbers and strings
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b|'.'"
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
- 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.specialChar: "\""
- constant.specialChar: "'"
- comment: "(^|[[:space:]])#.*"
- todo: "(TODO|XXX|FIXME):?"
- constant.number: "\\\\([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: "\\\\."
- constant.string:
start: "'"
end: "'"
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "`"
end: "`"
rules:
- constant.specialChar: "\\\\."
- comment:
start: "#"
end: "$"
rules:
- todo: "(TODO|XXX|FIXME):?"