@@ -19,7 +19,7 @@ file_extensions:
1919variables :
2020 valid_name : " [a-zA-Z_][a-zA-Z0-9_-]*"
2121 built_in_functions : |
22- (?x) # ignore whitespace in this regex
22+ (?x)(?: # ignore whitespace in this regex
2323
2424 absolute_path | arch | capitalize | clean | env_var_or_default | env_var |
2525 error | extension | file_name | file_stem | invocation_directory_native |
@@ -31,17 +31,20 @@ variables:
3131 trim_end_matches | trim_end_match | trim_end | trim_start_matches |
3232 trim_start_match | trim_start | trim | uppercase | uppercamelcase |
3333 uuid | without_extension
34-
34+ )
3535 boolean_settings : |
36- (?x)
36+ (?x)(?:
3737 allow-duplicate-recipes | dotenv-load | export | fallback | ignore-comments |
3838 positional-arguments | windows-powershell
39+ )
3940 string_settings : |
40- (?x)
41+ (?x)(?:
4142 tempdir
43+ )
4244 shell_settings : |
43- (?x)
45+ (?x)(?:
4446 shell | windows-shell
47+ )
4548 recipe_attributes : |
4649 (?x)
4750 linux | macos | no-cd | no-exit-message | private | unix | windows
@@ -274,6 +277,11 @@ contexts:
274277 # ##[ VARIABLES ]###############################################################
275278
276279 operands-variables :
280+ # First check for an invalid function
281+ - match : ' \b({{valid_name}})\b\s*(\()'
282+ captures :
283+ 1 : source.just
284+ 2 : invalid.illegal.just
277285 - match : \b(?:{{valid_name}})\b
278286 scope : variable.other.just
279287
@@ -503,10 +511,17 @@ contexts:
503511 - match : ' ^set(?=\s+)'
504512 scope : storage.modifier.definition.just
505513 push :
514+ - settings-invalid
506515 - settings-boolean
507516 - settings-shell
508517 - settings-string
509518
519+ settings-invalid :
520+ - match : ' \b({{valid_name}})\b\s*:='
521+ captures :
522+ 1 : invalid.illegal.just
523+ - include : else-pop
524+
510525 settings-boolean :
511526 - match : ' \b{{boolean_settings}}\b'
512527 scope : entity.name.definition.just
@@ -532,8 +547,9 @@ contexts:
532547 - include : else-pop
533548
534549 constant-boolean :
535- - match : " (true|false)"
536- scope : constant.language.boolean.just
550+ - match : ' \b(true|false)\b'
551+ captures :
552+ 1 : constant.language.boolean.just
537553 pop : 1
538554 - include : else-pop
539555
0 commit comments