From ebf57bf1f5d194795af7f9aec8571ef1fc05323f Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Wed, 9 Feb 2011 13:23:11 -0500 Subject: [PATCH] misc: update syntax file with module and enum Signed-off-by: Jean Privat --- misc/gtksourceview/nit.lang | 2 ++ misc/source-highlight/nit.lang | 2 +- misc/vim/syntax/nit.vim | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/misc/gtksourceview/nit.lang b/misc/gtksourceview/nit.lang index b3d09cd..eac19d0 100644 --- a/misc/gtksourceview/nit.lang +++ b/misc/gtksourceview/nit.lang @@ -72,8 +72,10 @@ redef var package + module type universal + enum diff --git a/misc/source-highlight/nit.lang b/misc/source-highlight/nit.lang index 9a9d386..aef7375 100644 --- a/misc/source-highlight/nit.lang +++ b/misc/source-highlight/nit.lang @@ -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" diff --git a/misc/vim/syntax/nit.vim b/misc/vim/syntax/nit.vim index 8ad3f26..899dc7d 100644 --- a/misc/vim/syntax/nit.vim +++ b/misc/vim/syntax/nit.vim @@ -52,8 +52,8 @@ syn match NITKeyword "\<\(super\)\>" syn match Error "\" " 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="\" 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="\" contains=ALL fold syn region NITFunctionDecl matchgroup=NITDefine start="\\s*" matchgroup=NONE end="\ze\(\\|\s\|:\|(\|$\)" oneline syn region NITTypeDecl matchgroup=NITDefine start="\\s*" matchgroup=NONE end="\ze\(\\|\s\|:\|(\|$\)" oneline contained containedin=NITClassBlock syn region NITAttrDecl matchgroup=NITDefine start="\\s*\ze_" matchgroup=NONE end="\ze\(\\|\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 -- 1.7.9.5