diff --git a/extensions/make/syntaxes/make.tmLanguage.json b/extensions/make/syntaxes/make.tmLanguage.json index 505336ac862..acfd8adea23 100644 --- a/extensions/make/syntaxes/make.tmLanguage.json +++ b/extensions/make/syntaxes/make.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/fadeevab/make.tmbundle/commit/43e1a67476dea3ddefbb4f0ee7901834b31b8bee", + "version": "https://github.com/fadeevab/make.tmbundle/commit/d94d403d6d31623763a4ff86b656886fa699ef60", "name": "Makefile", "scopeName": "source.makefile", "patterns": [ @@ -257,7 +257,7 @@ } ] }, - "interpolation": { + "shell-interpolation": { "begin": "(?=`)", "end": "(?!\\G)", "name": "meta.embedded.line.shell", @@ -288,18 +288,6 @@ } ] }, - "braces-interpolation": { - "begin": "\\(", - "end": "\\)", - "patterns": [ - { - "include": "#variables" - }, - { - "include": "#braces-interpolation" - } - ] - }, "recipe": { "begin": "^(?!\\t)([^:]*)(:)(?!\\=)", "beginCaptures": { @@ -404,6 +392,40 @@ { "include": "#comment" }, + { + "include": "#variables" + }, + { + "include": "#shell-interpolation" + } + ] + }, + "interpolation": { + "patterns": [ + { + "include": "#parentheses-interpolation" + }, + { + "include": "#braces-interpolation" + } + ] + }, + "parentheses-interpolation": { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#variables" + }, + { + "include": "#interpolation" + } + ] + }, + "braces-interpolation": { + "begin": "{", + "end": "}", + "patterns": [ { "include": "#variables" }, @@ -415,11 +437,28 @@ "variables": { "patterns": [ { - "match": "\\$[^\\(\\)]", - "name": "variable.language.makefile" + "include": "#simple-variable" }, { - "begin": "(\\$|(?<=\\$))\\(", + "include": "#variable-parentheses" + }, + { + "include": "#variable-braces" + } + ] + }, + "simple-variable": { + "patterns": [ + { + "match": "\\$[^(){}]", + "name": "variable.language.makefile" + } + ] + }, + "variable-parentheses": { + "patterns": [ + { + "begin": "\\$\\(", "captures": { "0": { "name": "punctuation.definition.variable.makefile" @@ -432,64 +471,199 @@ "include": "#variables" }, { - "match": "(?<=\\()(MAKEFILES|VPATH|SHELL|MAKESHELL|MAKE|MAKELEVEL|MAKEFLAGS|MAKECMDGOALS|CURDIR|SUFFIXES|\\.LIBPATTERNS)(?=\\s*\\))", - "name": "variable.language.makefile" + "include": "#builtin-variable-parentheses" }, { - "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" - } - }, - "end": "(?=\\)|((?