Changeset 24148

Show
Ignore:
Timestamp:
12/04/08 06:37:43 (5 weeks ago)
Author:
hinrik
Message:

[util/perl6.vim] fix interpolated contextualizers, add more keywords, more todo items

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • util/perl6.vim

    r24139 r24148  
    2222"   * Overhaul Q// and its derivatives 
    2323"   * Overhaul regexes 
     24"   * Highlight enum declarations correctly 
     25"   * :key should always be highlighted as a string, 
     26"     even if it's a known keyword 
     27"   * Highlight special numbers correctly (1_000, 0b0101, etc) 
    2428 
    2529" For version 5.x: Clear all syntax items 
     
    4751syn keyword p6FlowControl     take do when next last redo given return 
    4852syn keyword p6FlowControl     default exit make 
    49 syn keyword p6TypeConstraint  is but does trusts of returns 
     53syn keyword p6TypeConstraint  is as but does trusts of returns also 
    5054syn keyword p6ClosureTrait    BEGIN CHECK INIT START FIRST ENTER LEAVE KEEP 
    5155syn keyword p6ClosureTrait    UNDO NEXT LAST PRE POST END 
    5256syn keyword p6Exception       die fail try CATCH CONTROL warn 
    53 syn keyword p6Property        prec key value irs ofs ors pos export deep also 
    54 syn keyword p6Property        rw signature returns of parsed cached readonly 
     57syn keyword p6Property        prec irs ofs ors pos export deep 
     58syn keyword p6Property        rw signature parsed cached readonly 
    5559syn keyword p6Property        ref copy inline tighter looser equiv assoc 
    5660syn keyword p6Type            Object Any Junction Whatever Capture Match 
     
    7377syn keyword p6Routine         WHAT WHICH VAR eager hyper substr index rindex 
    7478syn keyword p6Routine         grep map sort join split reduce min max reverse 
    75 syn keyword p6Routine         truncate zip cat roundrobin classify first  
     79syn keyword p6Routine         truncate zip cat roundrobin classify first sum 
    7680syn keyword p6Routine         keys values pairs defined delete exists elems 
    77 syn keyword p6Routine         end kv arity assuming pick slice 
    78 syn keyword p6Routine         any all none one wrap shape classify 
    79 syn keyword p6Routine         callsame callwith nextsame nextwith 
     81syn keyword p6Routine         end kv arity assuming pick slice clone key 
     82syn keyword p6Routine         any all none one wrap shape classify value 
     83syn keyword p6Routine         callsame callwith nextsame nextwith ACCEPTS 
    8084syn keyword p6Routine         pop push shift splice unshift floor ceiling 
    8185syn keyword p6Routine         abs exp log log10 rand sign sqrt sin cos tan 
     
    98102syn keyword p6Routine         nonce skip_rest eval_dies_ok eval_lives_ok 
    99103syn keyword p6Routine         approx is_approx throws_ok version_lt 
    100 syn keyword p6Routine         eval operator undef undefine sleep 
     104syn keyword p6Routine         eval operator undef undefine sleep from to 
    101105syn keyword p6Routine         infix postfix prefix circumfix postcircumfix 
    102106syn keyword p6Operator        x xx div mod also leg cmp 
     
    108112syn match p6Operator display "\%(&\|<\|>\|,\|\.\|;\)" 
    109113" these require whitespace on the left side 
    110 syn match p6Operator display "\%(^\|\s\)\@<=\%(xx=\|p5=>\|\[\S\+\]\)" 
     114syn match p6Operator display "\%(^\|\s\)\@<=\%(xx=\|p5=>\)" 
    111115" these require whitespace on both sides 
    112116syn match p6Operator display "\%(^\|\s\)\@=\%(!eqv\|X\~X\|X\*X\)\@=\%(\s\|$\)" 
     
    122126syn match p6Shebang    display "\%^#!.*" 
    123127syn match p6BlockLabel display "\%(^\s*\)\@<=\h\w*\s*:\s\@=" 
    124 syn match p6Variable   display "[$@%][!.*^?]\?[[:graph:]_¢]\w*" 
     128syn match p6Variable   display "[$@%][!.*^?]\?[[:alnum:]_¢]*" 
    125129 
    126130" FIXME: This ugly hack will show up later on. Once again, don't try to fix it. 
     131" E.g. this makes "@()" highlight properly in "@( bla() )" 
    127132syn region p6ParenExpression 
    128133    \ start="\(<\s*\)\@<!(" 
     
    136141 
    137142" contextualizers 
     143syn match p6Contextualizer display "hash" 
    138144syn region p6ExplicitContext 
    139145    \ matchgroup=p6Contextualizer 
     
    144150    \ start="@@(" 
    145151    \ end=")" 
    146     \ transparent 
    147152    \ contains=TOP 
    148153 
     
    160165    \ add=p6Variable 
    161166    \ add=p6InterpClosure 
     167    \ add=p6ExplicitContext 
    162168 
    163169" "string" 
     
    288294    \ contains=p6Variable 
    289295 
    290 " :key<val> 
     296" :string 
    291297syn match p6LiteralString display ":\@<=\w\+" 
    292298