From 33cb75a7c94e236b461143fc556a011181792966 Mon Sep 17 00:00:00 2001 From: Dusk Date: Wed, 30 Sep 2020 21:04:28 -0700 Subject: [PATCH] misc/vim: fix slot names & tuples. --- misc/vim/syntax/factor.vim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/misc/vim/syntax/factor.vim b/misc/vim/syntax/factor.vim index 1546794227..40abc6e859 100644 --- a/misc/vim/syntax/factor.vim +++ b/misc/vim/syntax/factor.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Factor " Maintainer: Alex Chapman -" Last Change: 2020 Jun 05 +" Last Change: 2020 Sep 30 " Minimum Version: 600 " Factor |syntax| file guide & conventions: @@ -243,13 +243,15 @@ syn region factorConstructor2 start=/\v/ end= syn region factorIntersection start=/\v/ end=/\v<;>/ contains=@factorComment syn cluster factorSlotAttr contains=factorSlotAttrInitial,factorSlotAttrReadOnly syn cluster factorTupleSlotAttr contains=@factorSlotAttr -syn match factorTupleSlotName /\v<\S+>/ nextgroup=factorTupleSlotClassSkip skipempty contained +syn match factorTupleSlotName /\v<\S+;@1/ nextgroup=factorTupleSlotClassSkip skipempty contained syn match factorTupleSlotNameSkip /\v%(\_\s+%(!>.*)?)*/ contains=@factorComment nextgroup=factorTupleSlotName transparent contained syn match factorTupleSlotClass /\v<\S+>/ nextgroup=factorTupleSlotAttrSkip skipempty contained " a class is optional, so let an attribute take priority if present syn match factorTupleSlotClassSkip /\v%(\_\s+%(!>.*)?)*/ contains=@factorComment nextgroup=factorTupleSlotClass,@factorTupleSlotAttr transparent contained syn region factorTupleSlot matchgroup=factorTupleSlotDelims start=/\v<\{>/ end=/\v<\}>/ contains=@factorComment,factorTupleSlotName,@factorTupleSlotAttr contained -syn region factorTuple matchgroup=factorTupleDelims start=/\v<%(TUPLE|BUILTIN):>/ end=/\v<;>/ contains=@factorComment,factorTupleSlotName,factorTupleSlot +syn match factorTupleHeader /\v%(\_\s+%(!>.*)?)*\S+%(%(\_\s+%(!>.*)?)+\<%(\_\s+%(!>.*)?)+\S+)?>/ contains=@factorComment,@factorWord contained transparent +syn match factorTupleDelims /\v<%(TUPLE|BUILTIN):>/ nextgroup=factorTupleHeader skipempty contained +syn region factorTuple start=/\v<%(TUPLE|BUILTIN):>/ end=/\v<;>/ contains=@factorComment,factorTupleSlotName,factorTupleSlot,factorTupleDelims syn region factorPredicate matchgroup=factorPredicateDelims start=/\v<%(PREDICATE):>/ end=/\v<;>/ contains=@factorComment,factorTupleSlotName " Abnormally named because factor*Error is reserved for syntax errors. syn region factorErrorSyn start=/\v/ end=/\v<;>/ contains=@factorComment -- 2.34.1