blob: dc21314e353c9390dabe42b8555dccb5d45fcec6 [file] [log] [blame]
Bram Moolenaar8c8de832008-06-24 22:58:06 +00001" Vim syntax file
2" Language: Coco/R
3" Maintainer: Ashish Shukla <wahjava@gmail.com>
Bram Moolenaard592deb2022-06-17 15:42:40 +01004" Last Change: 2022 Jun 14
Bram Moolenaar8c8de832008-06-24 22:58:06 +00005" Remark: Coco/R syntax partially implemented.
6" License: Vim license
7
Bram Moolenaar89bcfda2016-08-30 23:26:57 +02008" quit when a syntax file was already loaded
9if exists("b:current_syntax")
Bram Moolenaar8c8de832008-06-24 22:58:06 +000010 finish
11endif
12
13syn keyword cocoKeywords ANY CHARACTERS COMMENTS COMPILER CONTEXT END FROM IF IGNORE IGNORECASE NESTED PRAGMAS PRODUCTIONS SYNC TO TOKENS WEAK
14syn match cocoUnilineComment #//.*$#
15syn match cocoIdentifier /[[:alpha:]][[:alnum:]]*/
16syn region cocoMultilineComment start=#/[*]# end=#[*]/#
17syn region cocoString start=/"/ skip=/\\"\|\\\\/ end=/"/
18syn region cocoCharacter start=/'/ skip=/\\'\|\\\\/ end=/'/
19syn match cocoOperator /+\||\|\.\.\|-\|(\|)\|{\|}\|\[\|\]\|=\|<\|>/
20syn region cocoProductionCode start=/([.]/ end=/[.])/
21syn match cocoPragma /[$][[:alnum:]]*/
22
23hi def link cocoKeywords Keyword
24hi def link cocoUnilineComment Comment
25hi def link cocoMultilineComment Comment
26hi def link cocoIdentifier Identifier
27hi def link cocoString String
28hi def link cocoCharacter Character
29hi def link cocoOperator Operator
30hi def link cocoProductionCode Statement
31hi def link cocoPragma Special
32
Bram Moolenaard592deb2022-06-17 15:42:40 +010033let b:current_syntax = 'coco'