add vim syntax highlighting for ALIAS:, QUALIFIED:, QUALIFIED-WITH:, and FROM:. fix highlighting for empty comment at end of line

db4
Joe Groff 2009-09-27 14:04:39 -05:00
parent c2145c933b
commit 02b4503205
1 changed files with 10 additions and 14 deletions

View File

@ -26,8 +26,8 @@ endif
syn cluster factorCluster contains=factorComment,factorKeyword,factorRepeat,factorConditional,factorBoolean,factorCompileDirective,factorString,factorSbuf,@factorNumber,@factorNumErr,factorDelimiter,factorChar,factorCharErr,factorBackslash,@factorWordOps,factorAlien,factorTuple,factorStruct syn cluster factorCluster contains=factorComment,factorKeyword,factorRepeat,factorConditional,factorBoolean,factorCompileDirective,factorString,factorSbuf,@factorNumber,@factorNumErr,factorDelimiter,factorChar,factorCharErr,factorBackslash,@factorWordOps,factorAlien,factorTuple,factorStruct
syn match factorTodo /\(TODO\|FIXME\|XXX\):\=/ contained syn match factorTodo /\(TODO\|FIXME\|XXX\):\=/ contained
syn match factorComment /\<#! .*/ contains=factorTodo syn match factorComment /\<#!\>.*/ contains=factorTodo
syn match factorComment /\<! .*/ contains=factorTodo syn match factorComment /\<!\>.*/ contains=factorTodo
syn cluster factorDefnContents contains=@factorCluster,factorStackEffect,factorLiteralStackEffect,factorArray0,factorQuotation0 syn cluster factorDefnContents contains=@factorCluster,factorStackEffect,factorLiteralStackEffect,factorArray0,factorQuotation0
@ -84,6 +84,9 @@ syn match factorChar /\<CHAR:\s\+\\\=\S\>/
syn match factorBackslash /\<\\\>\s\+\S\+\>/ syn match factorBackslash /\<\\\>\s\+\S\+\>/
syn region factorUsing start=/\<USING:\>/ end=/;/ syn region factorUsing start=/\<USING:\>/ end=/;/
syn match factorQualified /\<QUALIFIED:\s\+\S\+\>/
syn match factorQualifiedWith /\<QUALIFIED-WITH:\s\+\S\+\s\+\S\+\>/
syn region factorFrom start=/\<FROM:\>/ end=/;/
syn region factorSingletons start=/\<SINGLETONS:\>/ end=/;/ syn region factorSingletons start=/\<SINGLETONS:\>/ end=/;/
syn match factorSymbol /\<SYMBOL:\s\+\S\+\>/ syn match factorSymbol /\<SYMBOL:\s\+\S\+\>/
syn region factorSymbols start=/\<SYMBOLS:\>/ end=/;/ syn region factorSymbols start=/\<SYMBOLS:\>/ end=/;/
@ -92,6 +95,7 @@ syn region factorTuple start=/\<TUPLE:\>/ end=/\<;\>/
syn region factorStruct start=/\<\(UNION-STRUCT:\|STRUCT:\)\>/ end=/\<;\>/ syn region factorStruct start=/\<\(UNION-STRUCT:\|STRUCT:\)\>/ end=/\<;\>/
syn match factorConstant /\<CONSTANT:\s\+\S\+\>/ syn match factorConstant /\<CONSTANT:\s\+\S\+\>/
syn match factorAlias /\<ALIAS:\s\+\S\+\>/
syn match factorSingleton /\<SINGLETON:\s\+\S\+\>/ syn match factorSingleton /\<SINGLETON:\s\+\S\+\>/
syn match factorPostpone /\<POSTPONE:\s\+\S\+\>/ syn match factorPostpone /\<POSTPONE:\s\+\S\+\>/
syn match factorDefer /\<DEFER:\s\+\S\+\>/ syn match factorDefer /\<DEFER:\s\+\S\+\>/
@ -103,8 +107,7 @@ syn match factorMain /\<MAIN:\s\+\S\+\>/
syn match factorConstructor /\<C:\s\+\S\+\s\+\S\+\>/ syn match factorConstructor /\<C:\s\+\S\+\s\+\S\+\>/
syn match factorAlien /\<ALIEN:\s\+\d\+\>/ syn match factorAlien /\<ALIEN:\s\+\d\+\>/
syn cluster factorWordOps contains=factorSymbol,factorPostpone,factorDefer,factorForget,factorMixin,factorInstance,factorHook,factorMain,factorConstructor syn cluster factorWordOps contains=factorConstant,factorAlias,factorSingleton,factorSingletons,factorSymbol,factorSymbols,factorPostpone,factorDefer,factorForget,factorMixin,factorInstance,factorHook,factorMain,factorConstructor
"TODO: "TODO:
"misc: "misc:
@ -114,20 +117,10 @@ syn cluster factorWordOps contains=factorSymbol,factorPostpone,factorDefer
" PRIMITIVE: " PRIMITIVE:
"C interface: "C interface:
" FIELD:
" BEGIN-STRUCT:
" C-ENUM: " C-ENUM:
" FUNCTION: " FUNCTION:
" END-STRUCT
" DLL"
" TYPEDEF: " TYPEDEF:
" LIBRARY: " LIBRARY:
" C-UNION:
"QUALIFIED:
"QUALIFIED-WITH:
"FROM:
"ALIAS:
"! POSTPONE: "
"#\ " "#\ "
syn region factorString start=/"/ skip=/\\"/ end=/"/ oneline syn region factorString start=/"/ skip=/\\"/ end=/"/ oneline
@ -223,6 +216,9 @@ if version >= 508 || !exists("did_factor_syn_inits")
HiLink factorFloat Float HiLink factorFloat Float
HiLink factorInt Number HiLink factorInt Number
HiLink factorUsing Include HiLink factorUsing Include
HiLink factorQualified Include
HiLink factorQualifiedWith Include
HiLink factorFrom Include
HiLink factorUse Include HiLink factorUse Include
HiLink factorUnuse Include HiLink factorUnuse Include
HiLink factorIn Define HiLink factorIn Define