Semi working syntax file

master
sloum 3 years ago
parent 857e32c2d9
commit a58949364b

1
.gitignore vendored

@ -0,0 +1 @@
test*

@ -20,36 +20,42 @@ else
endif
" Handle comment blocks
syn region nimfComment start=/(/ end=/)/
" syn match nimfStringLiteral '\v"\[ \t\]\+\.\*\[ \t\]\+"'
" syn region nimfStringLiteral start=/\v" / skip=/\v\\./ end=/\v "/
syn region nimfComment start=/( / end=/ )/
" Strings, needs work to require (^|\s) before, couldnt get it to work
syn match nimfStringLiteral /"\s\+.*\s\+"/
" Adds highlighting for integers
syn match nimfInt '\<-\=[0-9]*[0-9]\+\>'
" keywords for language keywords
syn keyword nimfConditional if then else
syn keyword nimfLoop do loop
syn keyword nimfStatement var svar
syn keyword nimfOperators + - / * % /% 0= ++ -- ! @ > < = >= <=
syn keyword nimfOperators + - / * % /% ++ -- +=
syn keyword nimfMemory @ ! +! ?
syn keyword nimComparrison > < = >= <= 0= != 0< !0
syn match nimfWordDef '\<:m\?\s*[^ \t]\+\>'
syn keyword nimfWordDef ;
syn keyword nimfInclude inline
syn match nimfInclude /module-end/
syn keyword nimfSub dup drop . .s print prints swap over roll pick bye !bye words depth clearstack page cr space input emit sleep allot see 2dup abs neg
" let b:current_syntax = "nimf"
highlight link nimfInclude Include
highlight link nimfWordDef Identifier
highlight link nimfStatement Identifier
highlight link nimfInt Number
highlight link nimfSub Function
highlight link nimfInt Constant
highlight link nimfComment Comment
highlight link nimfStringLiteral String
highlight link nimfOperators Special
highlight link nimfOperators Operator
highlight link nimfConditional Conditional
highlight link nimfLoop Repeat
highlight link nimfMemory SpecialChar
highlight link nimfMemory TypeDef

Loading…
Cancel
Save