Skip to content

Commit

Permalink
Add support for unexport statements
Browse files Browse the repository at this point in the history
  • Loading branch information
laniakea64 committed Jun 14, 2024
1 parent d2d55f2 commit 1c189b5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions syntax/just.vim
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ syn match justExportedAssignment "\v^export%(\s|\\\n)+\h\k*\s*:\=" transparent

syn match justExport '\v^export' contained

syn match justUnexportStatement '\v^unexport%(\s|\\\n)+\w+\s*$' contains=justUnexport
syn match justUnexport '\v^unexport' contained

syn keyword justConditional if else
syn region justConditionalBraces start="\v\{\{@!" end="\v\}@=" transparent contains=@justExpr
syn region justConditionalBracesInInterp start="\v\{\{@!" end="\v\}@=" transparent contained contains=@justExprInInterp
Expand Down Expand Up @@ -372,6 +375,7 @@ hi def link justStringEscapeSequence Special
hi def link justStringInShebangBody String
hi def link justStringInsideBody String
hi def link justStringRegexRepl String
hi def link justUnexport Statement
hi def link justUserDefinedError Exception
hi def link justVariadicPrefix Statement
hi def link justVariadicPrefixError Error
2 changes: 2 additions & 0 deletions tests/cases/expressions.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@

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>()

<span class="Statement">unexport</span> QT_QPA_PLATFORMTHEME
2 changes: 2 additions & 0 deletions tests/cases/expressions.just
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ shell_command := shell('echo "$@"', _true, random1)

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

unexport QT_QPA_PLATFORMTHEME

0 comments on commit 1c189b5

Please sign in to comment.