Update reserved words for syntax highlighters (vim is still behind, though)

This commit is contained in:
Paul Stansifer 2012-05-22 11:44:00 -07:00
parent 5f154770e2
commit a16cb376ac
2 changed files with 16 additions and 4 deletions

View File

@ -54,9 +54,21 @@
(let ((table (make-hash-table :test 'equal)))
(dolist (word '("mod" "type" "resource" "fn" "enum" "iface" "impl"))
(puthash word 'def table))
(dolist (word '("if" "else" "while" "do" "for" "break" "cont" "ret" "be" "fail" "const"
"check" "assert" "claim" "prove" "native" "import" "export" "let" "mut" "log"
"use" "pure" "unsafe"))
(dolist (word '("assert"
"be" "break"
"check" "claim" "class" "const" "cont" "copy" "crust"
"drop"
"else" "export"
"fail" "for"
"if" "import"
"let" "log" "loop"
"mut"
"native" "new"
"pure"
"ret"
"trait"
"unchecked" "unsafe"
"while"))
(puthash word t table))
(puthash "alt" 'alt table)
(dolist (word '("true" "false")) (puthash word 'atom table))

View File

@ -15,7 +15,7 @@ if !exists("main_syntax")
endif
syn keyword rustKeyword alt as assert be bind break
syn keyword rustKeyword check claim cont const copy do else export fail
syn keyword rustKeyword check claim cont const copy else export fail
syn keyword rustKeyword for if impl import in inline lambda let log
syn keyword rustKeyword loop mod mut mutable native note of prove pure
syn keyword rustKeyword ret self syntax to unchecked