diff --git a/justfile b/justfile index c603d31..993ca94 100644 --- a/justfile +++ b/justfile @@ -88,6 +88,7 @@ functionsWithArgs := ''' path_exists quote replace + semver_matches sha256 sha256_file shoutykebabcase diff --git a/syntax/just.vim b/syntax/just.vim index 8c37979..c2ed7ad 100644 --- a/syntax/just.vim +++ b/syntax/just.vim @@ -184,14 +184,14 @@ syn cluster justOtherCurlyBraces contains=justCurlyBraces,justBadCurlyBraces syn region justBuiltInFunction \ transparent end=')' - \ matchgroup=justFunction start="\v%(a%(bsolute_pat|rc)h|c%(apitalize|lean)|e%(nv%(_var%(_or_default)?)?|xtension)|file_%(name|stem)|j%(oin|ust%(_executable|file%(_directory)?))|kebabcase|lowerca%(melca)?se|pa%(rent_directory|th_exists)|quote|replace|s%(h%(a256%(_file)?|outy%(kebab|snake)case)|nakecase)|t%(itlecase|rim%(_%(end|start)%(_match%(es)?)?)?)|u%(pperca%(melca)?se|uid)|without_extension|invocation_directory%(_native)?|num_cpus|os%(_family)?)%(%(\s|\\\n)*\()@=" + \ matchgroup=justFunction start="\v%(a%(bsolute_pat|rc)h|c%(apitalize|lean)|e%(nv%(_var%(_or_default)?)?|xtension)|file_%(name|stem)|j%(oin|ust%(_executable|file%(_directory)?))|kebabcase|lowerca%(melca)?se|pa%(rent_directory|th_exists)|quote|replace|s%(emver_matches|h%(a256%(_file)?|outy%(kebab|snake)case)|nakecase)|t%(itlecase|rim%(_%(end|start)%(_match%(es)?)?)?)|u%(pperca%(melca)?se|uid)|without_extension|invocation_directory%(_native)?|num_cpus|os%(_family)?)%(%(\s|\\\n)*\()@=" \ matchgroup=justUserDefinedError start="\verror%(%(\s|\\\n)*\()@=" \ matchgroup=justBuiltInFunctionsError start="\v\h[a-zA-Z0-9_-]*%(\s|\\\n)*\(" \ contains=justNoise,@justExpr syn region justBuiltInFuncParamValue \ transparent end=')' - \ matchgroup=justFunction start="\v%(a%(bsolute_pat|rc)h|c%(apitalize|lean)|e%(nv%(_var%(_or_default)?)?|xtension)|file_%(name|stem)|j%(oin|ust%(_executable|file%(_directory)?))|kebabcase|lowerca%(melca)?se|pa%(rent_directory|th_exists)|quote|replace|s%(h%(a256%(_file)?|outy%(kebab|snake)case)|nakecase)|t%(itlecase|rim%(_%(end|start)%(_match%(es)?)?)?)|u%(pperca%(melca)?se|uid)|without_extension|invocation_directory%(_native)?|num_cpus|os%(_family)?)%(%(\s|\\\n)*\()@=" + \ matchgroup=justFunction start="\v%(a%(bsolute_pat|rc)h|c%(apitalize|lean)|e%(nv%(_var%(_or_default)?)?|xtension)|file_%(name|stem)|j%(oin|ust%(_executable|file%(_directory)?))|kebabcase|lowerca%(melca)?se|pa%(rent_directory|th_exists)|quote|replace|s%(emver_matches|h%(a256%(_file)?|outy%(kebab|snake)case)|nakecase)|t%(itlecase|rim%(_%(end|start)%(_match%(es)?)?)?)|u%(pperca%(melca)?se|uid)|without_extension|invocation_directory%(_native)?|num_cpus|os%(_family)?)%(%(\s|\\\n)*\()@=" \ matchgroup=justUserDefinedError start="\verror%(%(\s|\\\n)*\()@=" \ matchgroup=justBuiltInFunctionsError start="\v\h[a-zA-Z0-9_-]*%(\s|\\\n)*\(" \ contained @@ -200,7 +200,7 @@ syn region justBuiltInFuncParamValue syn region justBuiltInFuncInInterp \ transparent end=')' - \ matchgroup=justFunction start="\v%(a%(bsolute_pat|rc)h|c%(apitalize|lean)|e%(nv%(_var%(_or_default)?)?|xtension)|file_%(name|stem)|j%(oin|ust%(_executable|file%(_directory)?))|kebabcase|lowerca%(melca)?se|pa%(rent_directory|th_exists)|quote|replace|s%(h%(a256%(_file)?|outy%(kebab|snake)case)|nakecase)|t%(itlecase|rim%(_%(end|start)%(_match%(es)?)?)?)|u%(pperca%(melca)?se|uid)|without_extension|invocation_directory%(_native)?|num_cpus|os%(_family)?)%(%(\s|\\\n)*\()@=" + \ matchgroup=justFunction start="\v%(a%(bsolute_pat|rc)h|c%(apitalize|lean)|e%(nv%(_var%(_or_default)?)?|xtension)|file_%(name|stem)|j%(oin|ust%(_executable|file%(_directory)?))|kebabcase|lowerca%(melca)?se|pa%(rent_directory|th_exists)|quote|replace|s%(emver_matches|h%(a256%(_file)?|outy%(kebab|snake)case)|nakecase)|t%(itlecase|rim%(_%(end|start)%(_match%(es)?)?)?)|u%(pperca%(melca)?se|uid)|without_extension|invocation_directory%(_native)?|num_cpus|os%(_family)?)%(%(\s|\\\n)*\()@=" \ matchgroup=justUserDefinedError start="\verror%(%(\s|\\\n)*\()@=" \ matchgroup=justBuiltInFunctionsError start="\v\h[a-zA-Z0-9_-]*%(\s|\\\n)*\(" \ contained diff --git a/tests/cases/recipes-with-extras.html b/tests/cases/recipes-with-extras.html index d9acb10..c0836f2 100644 --- a/tests/cases/recipes-with-extras.html +++ b/tests/cases/recipes-with-extras.html @@ -3,7 +3,7 @@ p1 := 'test' p2 := 'OtherTest' -param := 'ThirdTest' +param := semver_matches('0.1.1', '>=0.1.0') @foo1 param1 param2="default test" +varparam='default': dependency1 (dependency2 p1 p2) (dependency3 param) echo many lines diff --git a/tests/cases/recipes-with-extras.just b/tests/cases/recipes-with-extras.just index 9a47a70..72f44ff 100644 --- a/tests/cases/recipes-with-extras.just +++ b/tests/cases/recipes-with-extras.just @@ -3,7 +3,7 @@ foo: # comment p1 := 'test' p2 := 'OtherTest' -param := 'ThirdTest' +param := semver_matches('0.1.1', '>=0.1.0') @foo1 param1 param2="default test" +varparam='default': dependency1 (dependency2 p1 p2) (dependency3 param) echo many lines