Merge pull request #27293 from fadeevab/master

Makefile colorizing improvement: colorize at the beginning of line, handling the '\' symbol and other.
This commit is contained in:
Martin Aeschlimann
2017-08-21 16:51:51 +02:00
committed by GitHub
3 changed files with 927 additions and 84 deletions

View File

@@ -16,6 +16,9 @@
{
"include": "#comment"
},
{
"include": "#variables"
},
{
"include": "#variable-assignment"
},
@@ -43,7 +46,7 @@
"name": "punctuation.definition.comment.makefile"
}
},
"end": "\\n",
"end": "(?=[^\\\\])$",
"name": "comment.line.number-sign.makefile",
"patterns": [
{
@@ -323,12 +326,12 @@
"name": "punctuation.separator.key-value.makefile"
}
},
"end": "^(?!\\t)",
"end": "[^\\\\]$",
"name": "meta.scope.target.makefile",
"patterns": [
{
"begin": "\\G",
"end": "^",
"end": "(?=[^\\\\])$",
"name": "meta.scope.prerequisites.makefile",
"patterns": [
{
@@ -427,11 +430,11 @@
"include": "#variables"
},
{
"match": "\\G(MAKEFILES|VPATH|SHELL|MAKESHELL|MAKE|MAKELEVEL|MAKEFLAGS|MAKECMDGOALS|CURDIR|SUFFIXES|\\.LIBPATTERNS)(?=\\s*\\))",
"match": "(?<=\\()(MAKEFILES|VPATH|SHELL|MAKESHELL|MAKE|MAKELEVEL|MAKEFLAGS|MAKECMDGOALS|CURDIR|SUFFIXES|\\.LIBPATTERNS)(?=\\s*\\))",
"name": "variable.language.makefile"
},
{
"begin": "\\G(subst|patsubst|strip|findstring|filter(-out)?|sort|word(list)?|firstword|lastword|dir|notdir|suffix|basename|addsuffix|addprefix|join|wildcard|realpath|abspath|info|error|warning|shell|foreach|if|or|and|call|eval|value|file|guile)\\s",
"begin": "(?<=\\()(subst|patsubst|strip|findstring|filter(-out)?|sort|word(list)?|firstword|lastword|dir|notdir|suffix|basename|addsuffix|addprefix|join|wildcard|realpath|abspath|info|error|warning|shell|foreach|if|or|and|call|eval|value|file|guile)\\s",
"beginCaptures": {
"1": {
"name": "support.function.$1.makefile"
@@ -450,8 +453,13 @@
]
},
{
"begin": "\\G(origin|flavor)\\s(?=[^\\s)]+\\s*\\))",
"begin": "(?<=\\()(origin|flavor)\\s(?=[^\\s)]+\\s*\\))",
"contentName": "variable.other.makefile",
"beginCaptures": {
"1": {
"name": "support.function.$1.makefile"
}
},
"end": "(?=\\))",
"name": "meta.scope.function-call.makefile",
"patterns": [
@@ -461,7 +469,7 @@
]
},
{
"begin": "\\G(?!\\))",
"begin": "(?<=\\()(?!\\))",
"end": "(?=\\))",
"name": "variable.other.makefile",
"patterns": [