summary refs log tree commit diff
path: root/vim/syntax
diff options
context:
space:
mode:
authorIrene Knapp <ireneista@irenes.space>2026-05-15 20:51:13 -0700
committerIrene Knapp <ireneista@irenes.space>2026-05-15 21:58:20 -0700
commit447921598269bae3e1406470015c37f23943cc74 (patch)
tree464583448ae74f83af637cefded39d8b3d431aff /vim/syntax
parent1af849abc637c4890285c4d3cc08d99faae2ea41 (diff)
make the label transformation work all the way, no crashing
the code doesn't quite run yet, that'll be a future CL

Force-Push: yes
Change-Id: I71e6a45127c1fc37906d902e36142c17afef2a21
Diffstat (limited to 'vim/syntax')
-rw-r--r--vim/syntax/evocation.vim12
1 files changed, 7 insertions, 5 deletions
diff --git a/vim/syntax/evocation.vim b/vim/syntax/evocation.vim
index 2aeefb3..de3bd66 100644
--- a/vim/syntax/evocation.vim
+++ b/vim/syntax/evocation.vim
@@ -1,3 +1,5 @@
+" Don't use keywords, they don't have the correct delimiters.
+
 syn region evocationComment start="\(^\|\s\)\zs\~\($\|\s\)" end="$"
 
 syn region evocationString start=_\(^\|\s\)\zss"\ze\($\|\s\)_ end=_"_
@@ -9,9 +11,9 @@ syn match evocationTickWord "\(^\|\s\)\zsL'\s\+\S\+\ze\($\|\s\)"
 syn match evocationTickWord "\(^\|\s\)\zsL@'\s\+\S\+\ze\($\|\s\)"
 syn match evocationTickWord "\(^\|\s\)\zsL!'\s\+\S\+\ze\($\|\s\)"
 
-syn keyword evocationStackManipulation swap drop 2drop 3drop ndrop
-syn keyword evocationStackManipulation roll unroll 3roll 3unroll
-syn keyword evocationStackManipulation dup 2dup 3dup ndup over pick
+syn match evocationStackManipulation "\(^\|\s\)\zs\(swap\|drop\|2drop\|3drop\|ndrop\)\ze\($\|\s\)"
+syn match evocationStackManipulation "\(^\|\s\)\zs\(roll\|unroll\|\|3roll\|3unroll\)\ze\($\|\s\)"
+syn match evocationStackManipulation "\(^\|\s\)\zs\(dup\|2dup\|\|3dup\|ndup\|over\|pick\)\ze\($\|\s\)"
 
 syn match evocationNumber "\(^\|\s\)\zs-\?\d\+\ze\($\|\s\)"
 syn match evocationNumber "\(^\|\s\)\zs-\?0b[01]\+\ze\($\|\s\)"
@@ -22,7 +24,7 @@ syn match evocationOperator "\(^\|\s\)\zs[.,&|@!]\ze\($\|\s\)"
 
 syn match evocationLogic "\(^\|\s\)\zs&&\ze\($\|\s\)"
 syn match evocationLogic "\(^\|\s\)\zs||\ze\($\|\s\)"
-syn keyword evocationLogic not
+syn match evocationLogic "\(^\|\s\)\zs\(not\)\ze\($\|\s\)"
 
 syn match evocationComparison "\(^\|\s\)\zs!=\ze\($\|\s\)"
 syn match evocationComparison "\(^\|\s\)\zs=\ze\($\|\s\)"
@@ -37,7 +39,7 @@ syn match evocationArithmetic "\(^\|\s\)\zs\*\ze\($\|\s\)"
 syn match evocationArithmetic "\(^\|\s\)\zs/%\ze\($\|\s\)"
 syn match evocationArithmetic "\(^\|\s\)\zs1+\ze\($\|\s\)"
 syn match evocationArithmetic "\(^\|\s\)\zs1-\ze\($\|\s\)"
-syn keyword evocationArithmetic negate max min
+syn match evocationArithmetic "\(^\|\s\)\zs\(negate\|max\|min\)\ze\($\|\s\)"
 
 syn match evocationBlock "\(^\|\s\)\zs[\[\]{};]\ze\($\|\s\)"
 syn match evocationBlock "\(^\|\s\)\zs;asm\ze\($\|\s\)"