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,14 +1,14 @@
filetype: makefile
detect:
detect:
filename: "([Mm]akefile|\\.ma?k)$"
header: "^#!.*/(env +)?[bg]?make( |$)"
rules:
- preproc: "\\b(ifeq|ifdef|ifneq|ifndef|else|endif)\\b"
- preproc: "^(export|include|override)\\b"
- symbol.operator: "^[^:= ]+:"
- symbol.operator: "[=,%]|\\+=|\\?=|:=|&&|\\|\\|"
- preproc: "\\<(ifeq|ifdef|ifneq|ifndef|else|endif)\\>"
- statement: "^(export|include|override)\\>"
- operator: "^[^:= ]+:"
- operator: "([=,%]|\\+=|\\?=|:=|&&|\\|\\|)"
- statement: "\\$\\((abspath|addprefix|addsuffix|and|basename|call|dir)[[:space:]]"
- statement: "\\$\\((error|eval|filter|filter-out|findstring|firstword)[[:space:]]"
- statement: "\\$\\((flavor|foreach|if|info|join|lastword|notdir|or)[[:space:]]"
@@ -16,9 +16,20 @@ rules:
- statement: "\\$\\((value|warning|wildcard|word|wordlist|words)[[:space:]]"
- identifier: "^.+:"
- identifier: "[()$]"
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
- constant.string:
start: "\""
end: "\""
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "'"
end: "'"
rules:
- constant.specialChar: "\\\\."
- identifier: "\\$+(\\{[^} ]+\\}|\\([^) ]+\\))"
- identifier: "\\$[@^<*?%|+]|\\$\\([@^<*?%+-][DF]\\)"
- identifier: "\\$\\$|\\\\.?"
- comment: "(^|[[:space:]])#([^{].*)?$"
- comment: "^ @#.*"
- comment:
start: "#"
end: "$"
rules: []