misc: update syntax file with module and enum
authorJean Privat <jean@pryen.org>
Wed, 9 Feb 2011 18:23:11 +0000 (13:23 -0500)
committerJean Privat <jean@pryen.org>
Mon, 14 Feb 2011 20:15:50 +0000 (15:15 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

misc/gtksourceview/nit.lang
misc/source-highlight/nit.lang
misc/vim/syntax/nit.vim

index b3d09cd..eac19d0 100644 (file)
       <keyword>redef</keyword>
       <keyword>var</keyword>
       <keyword>package</keyword>
+      <keyword>module</keyword>
       <keyword>type</keyword>
       <keyword>universal</keyword>
+      <keyword>enum</keyword>
     </context>
 
     <context id="module-handlers" style-ref="module-handler">
index 9a9d386..aef7375 100644 (file)
@@ -20,6 +20,6 @@ comment start "#"
 include "number.lang"
 string delim "\"" "\"" escape "\\"
 string delim "'" "'"  escape "\\"
-keyword = "abort|abstract|as|assert|break|continue|do|else|end|extern|for|if|import|in|interface|intern|intrude|is|isa|isset|new|label|loop|private|protected|readable|return|super|then|while|false|null|nullable|redef|self|true|and|not|or|fun|var|type|init|class|package|special|universal|writable"
+keyword = "abort|abstract|as|assert|break|continue|do|else|end|enum|extern|for|if|import|in|interface|intern|intrude|is|isa|isset|new|label|loop|private|protected|readable|return|super|then|while|false|null|nullable|redef|self|true|and|not|or|fun|var|type|init|class|package|module|special|universal|writable"
 type = '[[:upper:]]([[:word:]]*)'
 include "symbols.lang"
index 8ad3f26..899dc7d 100644 (file)
@@ -52,8 +52,8 @@ syn match NITKeyword "\<\(super\)\>"
 syn match Error "\<end\>"
 
 " Declarations, definitions and blocks
-syn region NITPackageDecl matchgroup=NITDefine start="\<\(import\|package\)\>\s*" matchgroup=NONE end="\ze\(\s\|:\|(\|$\)"  oneline
-syn region NITClassBlock matchgroup=NITDefine start="\<\(class\|universal\|interface\)\>" matchgroup=NITDefine end="\<end\>" contains=ALL fold
+syn region NITModuleDecl matchgroup=NITDefine start="\<\(import\|module\|package\)\>\s*" matchgroup=NONE end="\ze\(\s\|:\|(\|$\)"  oneline
+syn region NITClassBlock matchgroup=NITDefine start="\<\(class\|enum\|universal\|interface\)\>" matchgroup=NITDefine end="\<end\>" contains=ALL fold
 syn region NITFunctionDecl matchgroup=NITDefine start="\<fun\>\s*" matchgroup=NONE end="\ze\(\<do\>\|\s\|:\|(\|$\)"  oneline
 syn region NITTypeDecl matchgroup=NITDefine start="\<type\>\s*" matchgroup=NONE end="\ze\(\<do\>\|\s\|:\|(\|$\)"  oneline contained containedin=NITClassBlock
 syn region NITAttrDecl matchgroup=NITDefine start="\<var\>\s*\ze_" matchgroup=NONE end="\ze\(\<do\>\|\s\|:\|(\|$\)"  oneline contained containedin=NITClassBlock
@@ -84,7 +84,7 @@ syn keyword NITSelf      self
 
 " Define the default highlighting.
 hi def link NITDefine                  Define
-hi def link NITPackageDecl             Identifier
+hi def link NITModuleDecl              Identifier
 hi def link NITFunctionDecl            Function
 hi def link NITTypeDecl                        Function
 hi def link NITAttrDecl                        Function