summaryrefslogtreecommitdiff
path: root/colm.vim
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2020-04-12 11:48:15 +0000
committerAdrian Thurston <thurston@colm.net>2020-04-12 11:48:15 +0000
commit8b1810c9fd897d8d2840a0713ced1dfcfb71d109 (patch)
tree1af9de3a0d05e2a6ea507401840e75e27bfc37f6 /colm.vim
parent9760b2b3d8477ffb4228ac3db976e2ed3abb8905 (diff)
downloadcolm-8b1810c9fd897d8d2840a0713ced1dfcfb71d109.tar.gz
first cut of a redefine statement
Redefine happens during declaration. The existing langEl is removed from the map and a newly-declared lel replaces it. If the new list of productions references [...] the productions from the previous lel are moved into the new one, in its place. A copy would be preferrable, as move may require some fixup, but move gives an initial functional implementation. refs #112
Diffstat (limited to 'colm.vim')
-rw-r--r--colm.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/colm.vim b/colm.vim
index 94bbe321..dcb523b7 100644
--- a/colm.vim
+++ b/colm.vim
@@ -73,7 +73,7 @@ syntax match varCapture "[a-zA-Z_][a-zA-Z_0-9]*:"
syntax match qual "[a-zA-Z_][a-zA-Z_0-9]*::"
syntax region defTypes matchgroup=defKeywords
- \ start="\<rl\>" start="\<def\>" start="\<token\>" start="\<ignore\>"
+ \ start="\<rl\>" start="\<def\>" start="\<redef\>" start="\<token\>" start="\<ignore\>"
\ matchgroup=Function end="[a-zA-Z_][a-zA-Z0-9_]*" end="/"me=e-1 end="`"me=e-1
syntax region redTypes matchgroup=redBlock
@@ -121,7 +121,7 @@ syntax keyword redKeyword throw try catch operator typeid contained
syntax keyword redKeyword and bitor xor compl bitand and_eq or_eq xor_eq not not_eq contained
syntax keyword redKeyword static_cast dynamic_cast contained
-syntax sync match colmSyncPat grouphere NONE "([{}]|\<reduction\>|\<token\>|\<ignore\>|\<def\>)"
+syntax sync match colmSyncPat grouphere NONE "([{}]|\<reduction\>|\<token\>|\<ignore\>|\<def\>|\<redef\>|{|})"
"