From 40c54bc12b5700f6bffed12209489e1f669f6423 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Fri, 17 Jun 2016 20:47:16 +0200 Subject: Update --- syntax/perl6.vim | 51 ++++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 25 deletions(-) (limited to 'syntax/perl6.vim') diff --git a/syntax/perl6.vim b/syntax/perl6.vim index b77ca3da..35fddcd8 100644 --- a/syntax/perl6.vim +++ b/syntax/perl6.vim @@ -68,17 +68,11 @@ set cpo&vim syn match p6Identifier display "\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\@=\)*\)" let s:keywords = { - \ "p6DeclareRoutine": [ - \ "macro sub submethod method multi proto only category unit", - \ ], - \ "p6Module": [ - \ "module class role package enum grammar slang subset", - \ ], \ "p6Include": [ - \ "use require", + \ "use require unit", \ ], \ "p6Conditional": [ - \ "if else elsif unless", + \ "if else elsif unless with orwith without", \ ], \ "p6VarStorage": [ \ "let my our state temp has constant", @@ -144,7 +138,7 @@ let s:alpha_metaops_or = join(s:temp, "\\|") " than matches/regions, which would prevent these words from matching as " autoquoted strings before "=>" or "p5=>". syn match p6KeywordStart display "\%(\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\@=\)*\)\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\)\@!\)\@=[A-Za-z_\xC0-\xFF0-9]\@1" nextgroup=p6Declare,p6Identifier skipwhite skipempty +syn match p6Declare display "[.^]\@1" nextgroup=p6Identifier skipwhite skipempty +syn match p6DeclareRegex display "[.^]\@1" nextgroup=p6RegexName skipwhite skipempty + syn match p6TypeConstraint display "\%([.^]\|^\s*\)\@" syn match p6TypeConstraint display "\%([.^]\|^\s*\)\@][=+]\?\|cont\|elem\))" " Reverse, cross, and zip metaoperators -exec "syn match p6RSXZOp display \"[RSXZ]:\\@!\\%(\\a\\@=\\%(". s:alpha_metaops_or . "\\)\\>\\|[[:alnum:]]\\@!\\%([.,]\\|[^[,.[:space:]]\\)\\+\\|\\s\\@=\\|$\\)\"" +exec "syn match p6RSXZOp display \"[RSXZ]:\\@!\\%(\\a\\@=\\%(". s:alpha_metaops_or . "\\)\\>\\|[[:alnum:]]\\@!\\%([.,]\\|[^[,.[:alnum:][:space:]]\\)\\+\\|\\s\\@=\\|$\\)\"" syn match p6BlockLabel display "^\s*\zs\h\w*\s*::\@!\_s\@=" @@ -362,12 +360,12 @@ syn region p6Adverb " * Followed by [-=] (e.g. <--, <=, <==, <->) syn region p6StringAngle \ matchgroup=p6Quote - \ start="\%(\<\%(enum\|for\|any\|all\|none\)\>\s*(\?\s*\)\@<=<\%(<\|=>\|[-=]\{1,2}>\@!\)\@!" - \ start="\%(\s\|[<+~=!]\)\@\|[-=]\{1,2}>\@!\)\@!" - \ start="[<+~=!]\@1\|[-=]\{1,2}\)\@!" - \ start="\%(^\s*\)\@<=<\%(<\|=>\|[-=]\{1,2}>\@!\)\@!" + \ start="\%(\<\%(enum\|for\|any\|all\|none\)\>\s*(\?\s*\)\@<=<\%(<\|=>\|\%([=-]\{1,2}>\|[=-]\{2}\)\)\@!" + \ start="\%(\s\|[<+~=!]\)\@\|\%([=-]\{1,2}>\|[=-]\{2}\)\)\@!" + \ start="[<+~=!]\@1\|\%([=-]\{1,2}>\|[=-]\{2}\)\)\@!" + \ start="\%(^\s*\)\@<=<\%(<\|=>\|\%([=-]\{1,2}>\|[=-]\{2}\)\)\@!" \ start="[<+~=!]\@1\|[-=]\{1,2}>\@!\)\@!" + \ start="\%((\s*\|=\s\+\)\@<=<\%(<\|=>\|\%([=-]\{1,2}>\|[=-]\{2}\)\)\@!" \ start="<\%(\s*>\)\@=" \ skip="\\\@1" \ end=">" @@ -450,11 +448,12 @@ syn region p6StringDQ " Q// and friends -syn match p6QuoteQStart display "\%(:\|\%(sub\|role\)\s\)\@5 and p5=> autoquoting -syn match p6StringP5Auto display "\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\@=\)*\)\ze\s\+p5=>" -syn match p6StringAuto display "\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\@=\)*\)\ze\%(p5\)\@2" -syn match p6StringAuto display "\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\@=\)*\)\ze\s\+=>" -syn match p6StringAuto display "\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\@=\)*\)p5\ze=>" +syn match p6StringP5Auto display "\.\@1" +syn match p6StringAuto display "\.\@1" +syn match p6StringAuto display "\.\@1" +syn match p6StringAuto display "\.\@1" " Pod @@ -1759,6 +1758,7 @@ if version >= 508 || !exists("did_perl6_syntax_inits") HiLink p6StringQ_q p6String HiLink p6StringQ_qww p6String HiLink p6StringQ_qq p6String + HiLink p6StringQ_to p6String HiLink p6StringQ_qto p6String HiLink p6StringQ_qqto p6String HiLink p6RxStringSQ p6String @@ -1796,6 +1796,7 @@ if version >= 508 || !exists("did_perl6_syntax_inits") HiLink p6QuoteQ_q p6Quote HiLink p6QuoteQ_qww p6Quote HiLink p6QuoteQ_qq p6Quote + HiLink p6QuoteQ_to p6Quote HiLink p6QuoteQ_qto p6Quote HiLink p6QuoteQ_qqto p6Quote HiLink p6QuoteQ_PIR p6Quote @@ -1875,8 +1876,8 @@ if version >= 508 || !exists("did_perl6_syntax_inits") HiLink p6String String HiLink p6Repeat Repeat HiLink p6Pragma Keyword - HiLink p6Module Keyword - HiLink p6DeclareRoutine Keyword + HiLink p6PreDeclare Keyword + HiLink p6Declare Keyword HiLink p6DeclareRegex Keyword HiLink p6VarStorage Special HiLink p6FlowControl Special -- cgit v1.2.3