Skip to content

Commit

Permalink
Add && and || operators
Browse files Browse the repository at this point in the history
  • Loading branch information
laniakea64 committed Dec 16, 2024
1 parent 383384b commit ed67f19
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions syntax/just.vim
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ syn match justConditionalOperator "\V=~"

syn match justOperator "\V+"
syn match justOperator "\V/"
syn match justOperator "\V&&"
syn match justOperator "\V||"

syn keyword justConstant
\ HEX HEXLOWER HEXUPPER
Expand Down
4 changes: 4 additions & 0 deletions tests/cases/script.html → tests/cases/unstable.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<span class="Statement">set</span> <span class="Keyword">unstable</span>

<span class="Type">[script</span><span class="Operator">:</span> <span class="String">'python3'</span><span class="Type">]</span>
<span class="Function">python_info</span><span class="Operator">:</span>
<span class="Number">&Tab;import platform</span>
Expand All @@ -7,3 +9,5 @@
<span class="Function">nested_justfile</span><span class="Operator">:</span>
<span class="Number">&Tab;foo:</span>
<span class="Number">&Tab;&Tab;pwd</span>

foo <span class="Operator">:=</span> <span class="String">'foo'</span> <span class="Operator">&amp;&amp;</span> <span class="String">''</span> <span class="Operator">||</span> <span class="String">'foo'</span>
4 changes: 4 additions & 0 deletions tests/cases/script.just → tests/cases/unstable.just
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
set unstable

[script: 'python3']
python_info:
import platform
Expand All @@ -7,3 +9,5 @@ python_info:
nested_justfile:
foo:
pwd

foo := 'foo' && '' || 'foo'

0 comments on commit ed67f19

Please sign in to comment.