Changeset 24156 for util

Show
Ignore:
Timestamp:
12/05/08 07:53:29 (5 weeks ago)
Author:
hinrik
Message:

[util/perl6.vim] treat sigils, twigils, and package scope separately from variable names, improve numbers, autoquoting, strings, and a bunch of other fixes

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • util/perl6.vim

    r24150 r24156  
    11" Vim syntax file 
    22" Language:     Perl 6 
    3 " Last Change:  Nov 27th 2008 
     3" Last Change:  Dec 5th 2008 
    44" Contributors: Luke Palmer <fibonaci@babylonia.flatirons.org> 
    55"               Moritz Lenz <moritz@faui2k3.org> 
     
    2222"   * Overhaul Q// and its derivatives 
    2323"   * Overhaul regexes 
    24 "   * Enum declarations 
    25 "   * :key should always be highlighted as a string, 
    26 "     even if it's a known keyword 
     24"   * Highlight « :key<val> » correctly 
    2725"   * Multiline #[] comments 
     26" 
     27" Impossible TODO?: 
     28"   * Unspace 
     29"   * Unicode 
    2830 
    2931" For version 5.x: Clear all syntax items 
     
    4042 
    4143" Billions of keywords 
    42 syn keyword p6Attention       ACHTUNG ATTN ATTENTION FIXME NB contained  
    43 syn keyword p6Attention       TODO TBD WTF XXX NOTE contained 
    44 " XXX subset declares a type, but not a module, how should it be classified? 
    45 syn keyword p6Module          module class role use require package enum 
    46 syn keyword p6Module          grammar subset self 
    47 syn keyword p6DeclareRoutine  macro sub submethod method multi only rule 
    48 syn keyword p6DeclareRoutine  token regex category 
    49 syn keyword p6VarStorage      let my our state temp has proto constant 
    50 syn keyword p6Repeat          for loop repeat while until gather 
    51 syn keyword p6FlowControl     take do when next last redo given return 
    52 syn keyword p6FlowControl     default exit make 
    53 syn keyword p6TypeConstraint  is as but does trusts of returns also 
    54 syn keyword p6ClosureTrait    BEGIN CHECK INIT START FIRST ENTER LEAVE KEEP 
    55 syn keyword p6ClosureTrait    UNDO NEXT LAST PRE POST END 
    56 syn keyword p6Exception       die fail try CATCH CONTROL warn 
    57 syn keyword p6Property        prec irs ofs ors pos export deep 
    58 syn keyword p6Property        rw parsed cached readonly 
    59 syn keyword p6Property        ref copy inline tighter looser equiv assoc 
    60 syn keyword p6Type            Object Any Junction Whatever Capture Match 
    61 syn keyword p6Type            Signature Proxy Matcher Package Module Class 
    62 syn keyword p6Type            Grammar Scalar Array Hash KeyHash KeySet KeyBag 
    63 syn keyword p6Type            Pair List Seq Range Set Bag Mapping Void Undef 
    64 syn keyword p6Type            Failure Exception Code Block Routine Sub Macro 
    65 syn keyword p6Type            Method Submethod Regex Str Blob Char Byte 
    66 syn keyword p6Type            Codepoint Grapheme StrPos StrLen Version Num 
    67 syn keyword p6Type            Complex num complex Bit Bool bit bool Order 
    68 syn keyword p6Type            Increasing Decreasing Ordered Callable AnyChar 
    69 syn keyword p6Type            Positional Associative Ordering KeyExtractor 
    70 syn keyword p6Type            Comparator OrderingPair IO KitchenSink 
    71 syn keyword p6Type            Int int int1 int2 int4 int8 int16 int32 int64 
    72 syn keyword p6Type            Rat rat rat1 rat2 rat4 rat8 rat16 rat32 rat64 
    73 syn keyword p6Type            UInt uint uint1 uint2 uint4 uint8 uint16 
    74 syn keyword p6Type            uint32 uint64 Buf buf buf1 buf2 buf4 buf8 
    75 syn keyword p6Type            buf16 buf32 buf64 True False 
    76 syn keyword p6Number          NaN Inf 
    77 syn keyword p6Routine         WHAT WHICH VAR eager hyper substr index rindex 
    78 syn keyword p6Routine         grep map sort join split reduce min max reverse 
    79 syn keyword p6Routine         truncate zip cat roundrobin classify first sum 
    80 syn keyword p6Routine         keys values pairs defined delete exists elems 
    81 syn keyword p6Routine         end kv arity assuming pick slice clone key new 
    82 syn keyword p6Routine         any all none one wrap shape classify value 
    83 syn keyword p6Routine         callsame callwith nextsame nextwith ACCEPTS 
    84 syn keyword p6Routine         pop push shift splice unshift floor ceiling 
    85 syn keyword p6Routine         abs exp log log10 rand sign sqrt sin cos tan 
    86 syn keyword p6Routine         round srand roots cis unpolar polar atan2 
    87 syn keyword p6Routine         p5chop chop p5chomp chomp lc lcfirst uc ucfirst 
    88 syn keyword p6Routine         capitalize normalize pack unpack quotemeta comb 
    89 syn keyword p6Routine         samecase sameaccent chars nfd nfc nfkd nfkc 
    90 syn keyword p6Routine         printf sprintf caller evalfile run runinstead  
    91 syn keyword p6Routine         nothing want bless chr ord list item gmtime  
    92 syn keyword p6Routine         localtime time gethost getpw chroot getlogin 
    93 syn keyword p6Routine         kill fork wait perl context graphs codes bytes 
    94 syn keyword p6Routine         print open read write readline say seek close 
    95 syn keyword p6Routine         opendir readdir slurp pos fmt vec link unlink 
    96 syn keyword p6Routine         symlink uniq pair asin acos atan sec cosec 
    97 syn keyword p6Routine         cotan asec acosec acotan sinh cosh tanh asinh 
    98 syn keyword p6Routine         acosh atanh sech cosech cotanh sech acosech 
    99 syn keyword p6Routine         acotanh plan ok dies_ok lives_ok skip todo 
    100 syn keyword p6Routine         pass flunk force_todo use_ok isa_ok cmp_ok 
    101 syn keyword p6Routine         diag is_deeply isnt like skip_rest unlike 
    102 syn keyword p6Routine         nonce skip_rest eval_dies_ok eval_lives_ok 
    103 syn keyword p6Routine         approx is_approx throws_ok version_lt signature 
    104 syn keyword p6Routine         eval operator undef undefine sleep from to 
    105 syn keyword p6Routine         infix postfix prefix circumfix postcircumfix 
    106 syn keyword p6Routine         minmax 
    107 syn keyword p6Operator        x xx div mod also leg cmp 
    108 syn keyword p6Operator        eq ne lt le gt ge eqv ff fff true not Z 
    109 syn keyword p6Operator        X XeqvX and andthen or xor orelse extra 
     44" Don't use the "syn keyword" construct because that always has a higher 
     45" priority than matches/regions, so the words can't be autoquoted with 
     46" the "=>" and "p5=>" operators 
     47syn match p6Attention      display "\k\@<!\%(ACHTUNG\|ATTN\|ATTENTION\|FIXME\)\k\@!" contained 
     48syn match p6Attention      display "\k\@<!\%(NB\|TODO\|TBD\|WTF\|XXX\|NOTE\)\k\@!" contained 
     49syn match p6DeclareRoutine display "\k\@<!\%(macro\|sub\|submethod\|method\|multi\|only\|rule\)\k\@!" 
     50syn match p6DeclareRoutine display "\k\@<!\%(token\|regex\|category\)\k\@!" 
     51syn match p6Module         display "\k\@<!\%(module\|class\|role\|use\|require\|package\|enum\)\k\@!" 
     52syn match p6Module         display "\k\@<!\%(grammar\|subset\|self\)\k\@!" 
     53syn match p6VarStorage     display "\k\@<!\%(let\|my\|our\|state\|temp\|has\|proto\|constant\)\k\@!" 
     54syn match p6Repeat         display "\k\@<!\%(for\|loop\|repeat\|while\|until\|gather\)\k\@!" 
     55syn match p6FlowControl    display "\k\@<!\%(take\|do\|when\|next\|last\|redo\|given\|return\)\k\@!" 
     56syn match p6FlowControl    display "\k\@<!\%(default\|exit\|make\|continue\|break\|goto\|leave\)\k\@!" 
     57syn match p6TypeConstraint display "\k\@<!\%(is\|as\|but\|does\|trusts\|of\|returns\|also\)\k\@!" 
     58syn match p6ClosureTrait   display "\k\@<!\%(BEGIN\|CHECK\|INIT\|START\|FIRST\|ENTER\|LEAVE\|KEEP\)\k\@!" 
     59syn match p6ClosureTrait   display "\k\@<!\%(UNDO\|NEXT\|LAST\|PRE\|POST\|END\|CATCH\|CONTROL\)\k\@!" 
     60syn match p6Exception      display "\k\@<!\%(die\|fail\|try\|warn\)\k\@!" 
     61syn match p6Property       display "\k\@<!\%(prec\|irs\|ofs\|ors\|export\|deep\)\k\@!" 
     62syn match p6Property       display "\k\@<!\%(rw\|parsed\|cached\|readonly\)\k\@!" 
     63syn match p6Property       display "\k\@<!\%(ref\|copy\|inline\|tighter\|looser\|equiv\|assoc\)\k\@!" 
     64syn match p6Type           display "\k\@<!\%(Object\|Any\|Junction\|Whatever\|Capture\|Match\)\k\@!" 
     65syn match p6Type           display "\k\@<!\%(Signature\|Proxy\|Matcher\|Package\|Module\|Class\)\k\@!" 
     66syn match p6Type           display "\k\@<!\%(Grammar\|Scalar\|Array\|Hash\|KeyHash\|KeySet\|KeyBag\)\k\@!" 
     67syn match p6Type           display "\k\@<!\%(Pair\|List\|Seq\|Range\|Set\|Bag\|Mapping\|Void\|Undef\)\k\@!" 
     68syn match p6Type           display "\k\@<!\%(Failure\|Exception\|Code\|Block\|Routine\|Sub\|Macro\)\k\@!" 
     69syn match p6Type           display "\k\@<!\%(Method\|Submethod\|Regex\|Str\|Blob\|Char\|Byte\)\k\@!" 
     70syn match p6Type           display "\k\@<!\%(Codepoint\|Grapheme\|StrPos\|StrLen\|Version\|Num\)\k\@!" 
     71syn match p6Type           display "\k\@<!\%(Complex\|num\|complex\|Bit\|Bool\|bit\|bool\|Order\)\k\@!" 
     72syn match p6Type           display "\k\@<!\%(Increasing\|Decreasing\|Ordered\|Callable\|AnyChar\)\k\@!" 
     73syn match p6Type           display "\k\@<!\%(Positional\|Associative\|Ordering\|KeyExtractor\|Bool::False\)\k\@!" 
     74syn match p6Type           display "\k\@<!\%(Comparator\|OrderingPair\|IO\|KitchenSink\|Bool::True\)\k\@!" 
     75syn match p6Type           display "\k\@<!\%(Int\|int\|int1\|int2\|int4\|int8\|int16\|int32\|int64\)\k\@!" 
     76syn match p6Type           display "\k\@<!\%(Rat\|rat\|rat1\|rat2\|rat4\|rat8\|rat16\|rat32\|rat64\)\k\@!" 
     77syn match p6Type           display "\k\@<!\%(UInt\|uint\|uint1\|uint2\|uint4\|uint8\|uint16\)\k\@!" 
     78syn match p6Type           display "\k\@<!\%(uint32\|uint64\|Buf\|buf\|buf1\|buf2\|buf4\|buf8\)\k\@!" 
     79syn match p6Type           display "\k\@<!\%(buf16\|buf32\|buf64\|True\|false\)\k\@!" 
     80syn match p6Number         display "\k\@<!\%(NaN\|Inf\)\k\@!" 
     81syn match p6Routine        display "\k\@<!\%(WHAT\|WHICH\|VAR\|eager\|hyper\|substr\|index\|rindex\)\k\@!" 
     82syn match p6Routine        display "\k\@<!\%(grep\|map\|sort\|join\|split\|reduce\|min\|max\|reverse\)\k\@!" 
     83syn match p6Routine        display "\k\@<!\%(truncate\|zip\|cat\|roundrobin\|classify\|first\|sum\)\k\@!" 
     84syn match p6Routine        display "\k\@<!\%(keys\|values\|pairs\|defined\|delete\|exists\|elems\)\k\@!" 
     85syn match p6Routine        display "\k\@<!\%(end\|kv\|arity\|assuming\|pick\|slice\|clone\|key\|new\)\k\@!" 
     86syn match p6Routine        display "\k\@<!\%(any\|all\|none\|one\|wrap\|shape\|value\)\k\@!" 
     87syn match p6Routine        display "\k\@<!\%(callsame\|callwith\|nextsame\|nextwith\|ACCEPTS\)\k\@!" 
     88syn match p6Routine        display "\k\@<!\%(pop\|push\|shift\|splice\|unshift\|floor\|ceiling\)\k\@!" 
     89syn match p6Routine        display "\k\@<!\%(abs\|exp\|log\|log10\|rand\|sign\|sqrt\|sin\|cos\|tan\)\k\@!" 
     90syn match p6Routine        display "\k\@<!\%(round\|srand\|roots\|cis\|unpolar\|polar\|atan2\)\k\@!" 
     91syn match p6Routine        display "\k\@<!\%(p5chop\|chop\|p5chomp\|chomp\|lc\|lcfirst\|uc\|ucfirst\)\k\@!" 
     92syn match p6Routine        display "\k\@<!\%(capitalize\|normalize\|pack\|unpack\|quotemeta\|comb\)\k\@!" 
     93syn match p6Routine        display "\k\@<!\%(samecase\|sameaccent\|chars\|nfd\|nfc\|nfkd\|nfkc\)\k\@!" 
     94syn match p6Routine        display "\k\@<!\%(printf\|sprintf\|caller\|evalfile\|run\|runinstead\)\k\@!" 
     95syn match p6Routine        display "\k\@<!\%(nothing\|want\|bless\|chr\|ord\|list\|item\|gmtime\)\k\@!" 
     96syn match p6Routine        display "\k\@<!\%(localtime\|time\|gethost\|getpw\|chroot\|getlogin\)\k\@!" 
     97syn match p6Routine        display "\k\@<!\%(kill\|fork\|wait\|perl\|context\|graphs\|codes\|bytes\)\k\@!" 
     98syn match p6Routine        display "\k\@<!\%(print\|open\|read\|write\|readline\|say\|seek\|close\)\k\@!" 
     99syn match p6Routine        display "\k\@<!\%(opendir\|readdir\|slurp\|pos\|fmt\|vec\|link\|unlink\)\k\@!" 
     100syn match p6Routine        display "\k\@<!\%(symlink\|uniq\|pair\|asin\|atan\|sec\|cosec\)\k\@!" 
     101syn match p6Routine        display "\k\@<!\%(cotan\|asec\|acosec\|acotan\|sinh\|cosh\|tanh\|asinh\)\k\@!" 
     102syn match p6Routine        display "\k\@<!\%(achosh\|atanh\|sech\|cosech\|cotanh\|sech\|acosech\)\k\@!" 
     103syn match p6Routine        display "\k\@<!\%(acotanh\|plan\|ok\|dies_ok\|lives_ok\|skip\|todo\)\k\@!" 
     104syn match p6Routine        display "\k\@<!\%(pass\|flunk\|force_todo\|use_ok\|isa_ok\|cmp_ok\)\k\@!" 
     105syn match p6Routine        display "\k\@<!\%(diag\|is_deeply\|isnt\|like\|skip_rest\|unlike\)\k\@!" 
     106syn match p6Routine        display "\k\@<!\%(nonce\|eval_dies_ok\|eval_lives_ok\)\k\@!" 
     107syn match p6Routine        display "\k\@<!\%(approx\|is_approx\|throws_ok\|version_lt\|signature\)\k\@!" 
     108syn match p6Routine        display "\k\@<!\%(eval\|operator\|undef\|undefine\|sleep\|from\|to\)\k\@!" 
     109syn match p6Routine        display "\k\@<!\%(infix\|postfix\|prefix\|circumfix\|postcircumfix\)\k\@!" 
     110syn match p6Routine        display "\k\@<!\%(minmax\|lazy\|count\|nok_error\|unwrap\|can\|isa\)\k\@!" 
     111syn match p6Operator       display "\k\@<!\%(x\|xx\|div\|mod\|also\|leg\|cmp\)\k\@!" 
     112syn match p6Operator       display "\k\@<!\%(eq\|ne\|lt\|le\|gt\|ge\|eqv\|ff\|fff\|true\|not\)\k\@!" 
     113syn match p6Operator       display "\k\@<!\%(X\|XeqvX\|and\|andthen\|or\|xor\|orelse\|extra\)\k\@!" 
    110114 
    111115" more operators (not very smart, allows any combination) 
    112116syn match p6Operator display "\%(+\|-\|/\|\*\|\~\|?\||\|\\\|=\|\^\|!\|%\)" 
    113 syn match p6Operator display "\%(&\|,\|<\|>\|\.\|;\)" 
     117syn match p6Operator display "\%(&\|,\|<\|>\|\.\|:\|;\)" 
    114118" these require whitespace on the left side 
    115119syn match p6Operator display "\%(^\|\s\)\@<=\%(xx=\|p5=>\)" 
    116120" these require whitespace on both sides 
    117 syn match p6Operator display "\%(^\|\s\)\@=\%(!eqv\|X\~X\|X\*X\)\@=\%(\s\|$\)" 
    118 " only a single colon is an operator 
    119 syn match p6Operator display ":\@<!::\@!" 
     121syn match p6Operator display "\%(^\|\s\)\@<=\%(!eqv\|X\~X\|X\*X\)\@=\%(\s\|$\)" 
    120122" reduce 
    121123syn match p6Operator display "\[[^[:digit:];]]" 
    122  
    123 " conditionals need whitespace to the right 
    124 syn match p6Conditional       "\%(if\|else\|elsif\|unless\)\s\@=" 
    125  
    126 " misc 
    127 syn match p6Normal     display "\w*::\w\+" 
    128 syn match p6Comment    display "#.*" contains=p6Attention 
    129 syn match p6Shebang    display "\%^#!.*" 
    130 syn match p6BlockLabel display "\%(^\s*\)\@<=\h\w*\s*:\s\@=" 
    131 syn match p6Variable   display "[$@%&][!.*^?]" 
    132 syn match p6Variable   display "[$@%&][!.*^?]\?[[:alnum:]¢]\%([[:alnum:]_¢]\|::\)*" 
     124" hyperoperators 
     125syn match p6Operator display "\%(>>\|»\)[^[:alnum:][:blank:]]" 
     126syn match p6Operator display "[^[:alnum:][:blank:]]\%(«\|<<\)" 
     127syn match p6Operator display "»[^[:alnum:][:blank:]]«" 
     128syn match p6Operator display ">>[^[:alnum:][:blank:]]<<" 
     129 
     130syn match p6Normal      display "::=\@!" 
     131syn match p6Comment     display "#.*" contains=p6Attention 
     132syn match p6Shebang     display "\%^#!.*" 
     133syn match p6BlockLabel  display "\%(^\|\s\)\@<=\h\w*\s*::\@!\%(\s\|$\)\@=" 
     134syn match p6Context     display "\<hash\>" 
     135syn match p6Conditional display "\%(if\|else\|elsif\|unless\)\%($\|\s\)\@=" 
     136syn match p6Number      display "\<\d\%(\d\|__\@!\)*\%(_\@<![eE]_\@!+\?\%(\d\|_\)\+\)\?_\@<!" 
     137syn match p6Float       display "\<\d\%(\d\|_\)*_\@<![eE]_\@!-\%(\d\|_\)\+" 
     138syn match p6Float       display "\<\d\%(\d\|_\)*_\@<!\._\@!\%(\.\|\a\)\@!\%(\%(\d\|_\)*\%(_\@<![eE]_\@!\%(\d\|_\)\+\)\?\)\?" 
     139syn match p6Number      display "\<0o[0-7][0-7_]*" 
     140syn match p6Number      display "\<0b[01][01_]*" 
     141syn match p6Number      display "\<0x\x[[:xdigit:]_]*" 
     142syn match p6Number      display "\<0d\d[[:digit:]_]*" 
     143 
     144" sigils, twigils, variables and package scope; a little tricky 
     145 
     146syn match p6Twigil       display contained  "\%([.^*+?=!]\|:\@<!::\@!\)" 
     147syn match p6Variable     display contained "[[:alnum:]_¢]\+" 
     148syn match p6PackageScope display contained "[-[:alnum:]_:]\+::" 
     149 
     150syn region p6VariableRegion 
     151    \ matchgroup=p6Sigil 
     152    \ start="[$@%&]\+" 
     153    \ start="[^-_:¢[:alnum:]]\@<=\%(::\)\@=" 
     154    \ start="[$@%&]\+\%([.^*+?=!]\|:\@<!::\@!\)\%([^-_:¢[:alnum:]]\)\@=" 
     155    \ end="\%([-_:¢[:alnum:].^*+?=!]\)\@!" 
     156    \ oneline 
     157    \ display 
     158    \ contains=p6Twigil,p6PackageScope,p6Variable 
     159 
     160" the "!" in "$!" is the variable name, not a twigil 
     161syn match p6Variable display "\%([$@%&]\+\)\@<=\%([.^*+?=!]\|:\@<!::\@!\)\%([-_:¢[:alnum:].^*+?=!]\)\@!" 
    133162 
    134163" FIXME: This ugly hack will show up later on. Once again, don't try to fix it. 
     
    144173    \ transparent 
    145174 
    146 " contextualizers 
    147 syn match p6Contextualizer display "hash" 
    148 syn region p6ExplicitContext 
    149     \ matchgroup=p6Contextualizer 
     175syn region p6ParenContext 
     176    \ matchgroup=p6Context 
    150177    \ start="\$(" 
    151178    \ start="@(" 
     
    154181    \ start="@@(" 
    155182    \ end=")" 
     183    \ keepend 
    156184    \ contains=TOP 
    157185 
     
    167195 
    168196syn cluster p6Interp 
    169     \ add=p6Variable 
     197    \ add=p6VariableRegion 
    170198    \ add=p6InterpClosure 
    171     \ add=p6ExplicitContext 
     199    \ add=p6ParenContext 
    172200 
    173201" "string" 
     
    182210    \ matchgroup=p6Quote 
    183211    \ start="«" 
     212    \ skip="\\\@<!\\»" 
    184213    \ end="»" 
    185214    \ contains=@p6Interp 
     
    188217    \ matchgroup=p6Quote 
    189218    \ start="<<" 
     219    \ skip="\\\@<!\\>" 
    190220    \ end=">>" 
    191     \ contains=@p6Interp 
    192221 
    193222" Punctuation-delimited interpolated strings 
     
    225254" Literal strings 
    226255 
     256syn match p6EscapedSlash display "\\\@<!\\\\" contained 
    227257syn match p6EscapedQuote display "\\\@<!\\'" contained 
    228 syn match p6EscapedArrow display "\\\@<!\\>" contained 
     258syn match p6EscapedAngle display "\\\@<!\\>" contained 
    229259 
    230260" 'string' 
     
    234264    \ skip="\\\@<!\\'" 
    235265    \ end="'" 
    236     \ contains=p6EscapedQuote 
    237 " <string> FIXME: not sure how to distinguish this from "less than" in 
    238 " all cases. The following only matches if whitespace is missing on 
     266    \ contains=p6EscapedSlash,p6EscapedQuote 
     267" <string> 
     268" FIXME: not sure how to distinguish this from "less than" in all 
     269" cases. The following only matches if whitespace is missing on 
    239270" either side, since people tend to put spaces around "less than". 
    240271syn region p6LiteralString 
    241272    \ matchgroup=p6Quote 
    242     \ start="\%([-+~]\|\s\)\@<!<" 
    243     \ start="[-+~]\@<!<\s\@!" 
     273    \ start="\%([-+~!]\|\s\|<\)\@<!<\%(<\|=\)\@!" 
     274    \ start="\%([-+~!]\|<\)\@<!<\%(<\|\s\|=\)\@!" 
    244275    \ skip="\\\@<!\\>" 
    245276    \ end=">\@<!>" 
    246     \ contains=p6EscapedRightArrow 
     277    \ contains=p6EscapedSlash,p6EscapedAngle 
    247278" $<rule> 
    248279syn region p6LiteralString 
     
    278309    \ end=">" 
    279310 
    280 " Numbers 
    281 syn match p6Number display "\<0\>" 
    282 syn match p6Number display "\<[1-9]\%(\d\|_\)*\%([eE]+\?\%(\d\|_\)\+\)\?" 
    283 syn match p6Float  display "\<[1-9]\%(\d\|_\)*[eE]-\%(\d\|_\)\+" 
    284 syn match p6Float  display "\<\d\%(\d\|_\)*\.\%(\%(\d\|_\)*\%([eE]\%(\d\|_\)\+\)\?\)\?" 
    285 syn match p6Number display "\<0o[0-7][0-7_]*" 
    286 syn match p6Number display "\<0b[01][01_]*" 
    287 syn match p6Number display "\<0x\x[[:xdigit:]_]*" 
    288  
    289311" :string 
    290 syn match p6LiteralString display ":\@<=\w\+" 
     312syn match p6LiteralString display "\%(:\@<!:!\?\)\@<=\w\+" 
    291313 
    292314" => and p5=> autoquoting. Edit with care. 
     
    296318syn match p6LiteralString display "\w\+p5\ze=>" 
    297319 
    298 " these are operators, quotes 
    299 syn match p6Operator display "<=>" 
    300 " hyperoperators 
    301 syn match p6Operator display "\%(>>\|»\)[^[:alnum:][:blank:]]" 
    302 syn match p6Operator display "[^[:alnum:][:blank:]]\%(«\|<<\)" 
     320" these are operators, not quotes 
     321syn match p6Operator display "\%(<=>\|<->\)" 
    303322 
    304323" =<> is an operator, not a quote 
     
    309328    \ oneline 
    310329    \ display 
    311     \ contains=p6Variable 
     330    \ contains=p6VariableRegion 
    312331 
    313332" Regexes 
     
    668687    HiLink p6SubBracket      p6String 
    669688    HiLink p6TransNonBracket p6String 
     689    HiLink p6EscapedSlash    p6StringSpecial 
    670690    HiLink p6EscapedQuote    p6StringSpecial 
    671     HiLink p6EscapedArrow    p6StringSpecial 
     691    HiLink p6EscapedAngle    p6StringSpecial 
    672692    HiLink p6CharClass       p6StringSpecial 
    673693    HiLink p6RegexSpecial    p6StringSpecial 
     
    680700    HiLink p6Float           Float 
    681701    HiLink p6Normal          Normal 
     702    HiLink p6PackageScope    Normal 
    682703    HiLink p6Number          Number 
    683704    HiLink p6String          String 
     
    693714    HiLink p6ClosureTrait    PreProc 
    694715    HiLink p6Operator        Operator 
    695     HiLink p6Contextualizer  Operator 
     716    HiLink p6Twigil          Operator 
     717    HiLink p6Context         Operator 
    696718    HiLink p6Routine         Function 
    697719    HiLink p6Quote           Delimiter 
    698720    HiLink p6TypeConstraint  PreCondit 
    699721    HiLink p6Exception       Exception 
     722    HiLink p6Sigil           Identifier 
    700723    HiLink p6Variable        Identifier 
    701724    HiLink p6RuleCall        Identifier