Friday, February 3, 2012

Perl6 syntax highlighting not handling multi line comments correctly

Forgive me if this has already been fixed, I'm just using the vim in ubuntu 11.10 so this maybe fixed in trunk but the definition in the syntax file perl6.vim says #(... ) etc but the official page and the compilers say it's #`(... ) now rakudo recognises the #` syntax, also the syntax file says that the comment should not start at the beginning of the line but rakudo is fine with that, not sure who's right there, nothing about this restriction is said at:

http://www.perlfoundation.org/perl6/index.cgi?perl_6_basics_tablet#multi_line


any how, I have sort of fixed the file on my box but for some reason win the multiple delimiter cases i.e. #`((... )) and #`«««... »»» the syntax highlighting only extends to the first char of the closing delimiter  i.e #`<<< ... >>> which is wrong :'(       ah well, does any one know how to make it extend to multi char delimiters the entries look like so:

    syn region p6Comment
        \ matchgroup=p6Comment
        \ start="#`<<"
        \ skip="<<\%([^>]\|>>\@!\)*>>"
        \ end=">>"
        \ contains=p6Attention,p6Comment
    syn region p6Comment
        \ matchgroup=p6Comment
        \ start="#`<<<"
        \ skip="<<<\%([^>]\|>\%(>>\)\@!\)*>>>"
        \ end=">>>"
        \ contains=p6Attention,p6Comment


--
   .~.     In my life God comes first....    /V\         but Linux is pretty high after that :-D  /( )\    Francis (Grizzly) Smit  ^^-^^    http://www.smit.id.au/ 
 

No comments:

Post a Comment