]> git.draconx.ca Git - vimconf.git/blobdiff - syntax/gob.vim
Add gob2 syntax highlighting rules.
[vimconf.git] / syntax / gob.vim
diff --git a/syntax/gob.vim b/syntax/gob.vim
new file mode 100644 (file)
index 0000000..f3da401
--- /dev/null
@@ -0,0 +1,91 @@
+" Vim syntax file
+" Language:     GObject Builder (gob)
+" Maintainer:  Ding-Yi Chen <dchen@redhat.com>
+" Modified from cpp.vim
+" Last Change:  2008 Feb 08
+
+if version < 600
+  syntax clear
+elseif exists("b:current_syntax")
+  finish
+endif
+
+" Read the C syntax to start with
+if version < 600
+  so <sfile>:p:h/c.vim
+else
+  runtime! syntax/c.vim
+  unlet b:current_syntax
+endif
+
+
+" GOBject Builder extentions
+syn keyword gobClass           class
+syn keyword gobSelf            self
+syn keyword gobAccess          public protected private
+syn keyword gobClassDeclare    abstract from interface
+syn keyword gobCBlockKeyword   alltop headertop privateheader h a
+syn match gobCBlockStart /%\(alltop{\|headertop{\|privateheader{\|h{\|a{\|{\)/
+syn match gobCBlockEnd        /%}/
+syn keyword gobArguCondition   check type
+syn keyword gobDataDeclare     classwide
+syn keyword gobDataOperation   destroy destroywith unref unrefwith
+syn keyword gobDataOperationMacro VAR VAL
+syn keyword gobDataProperty    nick blurb default_value minimum maximum enum_type flag_type object_type boxed_type param_type link export
+syn keyword gobDataPropertyFunc        property get set
+syn keyword gobDataPropertyType        INT LONG FLOAT DOUBLE CHAR GUNICHAR BOOLEAN ENUM FLAGS STRING OBJECT BOXED POINTER PARAM
+syn keyword gobDataType                flags error
+
+syn keyword gobReturn          onerror defreturn
+syn keyword gobInitMethod      init class_init GET_NEW
+syn keyword gobParentMethod    PARENT_HANDLER
+syn keyword gobMethodModifier  signal virtual override
+
+syn keyword gobSelfReference   SELF IS_SELF SELF_CLASS
+
+syn keyword gobVersion         requires GOB_VERSION_MAJOR GOB_VERSION_MINOR and GOB_VERSION_PATCHLEVEL
+syn keyword gobSupported       BonoboObject GladeXML
+syn keyword gobBoolean         TRUE FALSE
+syn keyword gobConstant                null
+
+" Default highlighting
+if version >= 508 || !exists("did_gob_syntax_inits")
+  if version < 508
+    let did_gob_syntax_inits = 1
+    command -nargs=+ HiLink hi link <args>
+  else
+    command -nargs=+ HiLink hi def link <args>
+  endif
+  HiLink gobClass              Structure
+  HiLink gobSelf               Typedef
+  HiLink gobAccess             Statement
+  HiLink gobClassDeclare       Statement
+  HiLink gobCBlockStart                Include
+  HiLink gobCBlockEnd          Include
+  HiLink gobArguContition      Statement
+  HiLink gobDataDeclare                Statement
+  HiLink gobDataOperation      Statement
+  HiLink gobDataOperationMacro Macro
+  HiLink gobDataProperty       Macro
+  HiLink gobDataPropertyFunc   Function
+  HiLink gobDataPropertyType   Type
+  HiLink gobDataType           Type
+
+  HiLink gobReturn             Statement
+  HiLink gobInitMethod         Function
+  HiLink gobParentMethod       Function
+  HiLink gobMethodModifier     Statement
+
+  HiLink gobSelfReference      Macro
+
+  HiLink gobVersion            Include
+  HiLink gobSupported          Typedef
+  HiLink gobBoolean            Boolean
+  HiLink gobConstant           Constant
+
+  delcommand HiLink
+endif
+
+let b:current_syntax = "gob"
+
+" vim: ts=8