Skip to content

Commit

Permalink
Add module_file() and module_directory()
Browse files Browse the repository at this point in the history
  • Loading branch information
laniakea64 committed Jun 5, 2024
1 parent e217cb8 commit 4ffcf9e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion syntax/just.vim
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ syn match justFunctionCall "\v\w+%(\s|\\\n)*\(@=" transparent contains=justBuilt

" error() is intentionally not included in this list
syn keyword justBuiltInFunction
\ absolute_path append arch blake3 blake3_file cache_directory canonicalize capitalize choose clean config_directory config_local_directory data_directory data_local_directory encode_uri_component env env_var env_var_or_default executable_directory extension file_name file_stem home_directory invocation_directory invocation_directory_native join just_executable justfile justfile_directory just_pid kebabcase lowercamelcase lowercase num_cpus os os_family parent_directory path_exists prepend quote replace replace_regex semver_matches sha256 sha256_file shell shoutykebabcase shoutysnakecase snakecase source_directory source_file titlecase trim trim_end trim_end_match trim_end_matches trim_start trim_start_match trim_start_matches uppercamelcase uppercase uuid without_extension
\ absolute_path append arch blake3 blake3_file cache_directory canonicalize capitalize choose clean config_directory config_local_directory data_directory data_local_directory encode_uri_component env env_var env_var_or_default executable_directory extension file_name file_stem home_directory invocation_directory invocation_directory_native join just_executable justfile justfile_directory just_pid kebabcase lowercamelcase lowercase module_directory module_file num_cpus os os_family parent_directory path_exists prepend quote replace replace_regex semver_matches sha256 sha256_file shell shoutykebabcase shoutysnakecase snakecase source_directory source_file titlecase trim trim_end trim_end_match trim_end_matches trim_start trim_start_match trim_start_matches uppercamelcase uppercase uuid without_extension
\ contained

syn match justUserDefinedError "\v%(assert|error)%(%(\s|\\\n)*\()@="
Expand Down
1 change: 1 addition & 0 deletions tests/cases/expressions.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@
shell_command <span class="Operator">:=</span> <span class="Function">shell</span>(<span class="String">'echo "$@"'</span>, _true, random1)

this_source <span class="Operator">:=</span> <span class="Function">source_directory</span>() <span class="Operator">+</span> <span class="String">"</span><span class="Special">\n</span><span class="String"> -&gt; "</span> <span class="Operator">+</span> <span class="Function">source_file</span>()
current_module <span class="Operator">:=</span> <span class="Function">module_directory</span>() <span class="Operator">+</span> <span class="String">"</span><span class="Special">\n</span><span class="String"> -&gt; "</span> <span class="Operator">+</span> <span class="Function">module_file</span>()
1 change: 1 addition & 0 deletions tests/cases/expressions.just
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ _true := assert('1' != '0', '1 is not 0')
shell_command := shell('echo "$@"', _true, random1)

this_source := source_directory() + "\n -> " + source_file()
current_module := module_directory() + "\n -> " + module_file()

0 comments on commit 4ffcf9e

Please sign in to comment.