From ae8f1d3f2341660a84a9b64e05c1ee4bec6df581 Mon Sep 17 00:00:00 2001 From: David Reiss Date: Wed, 12 Sep 2007 01:45:12 +0000 Subject: [PATCH] Thrift: Update syntax files for Vim and Emacs. Summary: Add recognition of the new Thrift keyword cocoa_prefix to thrift.vim and thrift.el. Reviewed By: mcslee Test Plan: We don't need no stinkin' test plans! Revert Plan: ok Other Notes: AWESOMESAUCE! Thrift now supports namespaces, packages, prefixes, and modules. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665258 13f79535-47bb-0310-9956-ffa450edef68 --- thrift.el | 2 +- thrift.vim | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/thrift.el b/thrift.el index 5c9e75e9..2e790516 100644 --- a/thrift.el +++ b/thrift.el @@ -10,7 +10,7 @@ (defconst thrift-font-lock-keywords (list '("#.*$" . font-lock-comment-face) ;; perl style comments - '("\\<\\(include\\|struct\\|exception\\|typedef\\|cpp_namespace\\|java_package\\|php_namespace\\|ruby_namespace\\|py_module\\|perl_package\\|const\\|enum\\|service\\|extends\\|void\\|async\\|throws\\|optional\\|required\\)\\>" . font-lock-keyword-face) ;; keywords + '("\\<\\(include\\|struct\\|exception\\|typedef\\|cpp_namespace\\|java_package\\|cocoa_prefix\\|php_namespace\\|ruby_namespace\\|py_module\\|perl_package\\|const\\|enum\\|service\\|extends\\|void\\|async\\|throws\\|optional\\|required\\)\\>" . font-lock-keyword-face) ;; keywords '("\\<\\(bool\\|byte\\|i16\\|i32\\|i64\\|double\\|string\\|binary\\|map\\|list\\|set\\)\\>" . font-lock-type-face) ;; built-in types '("\\<\\([0-9]+\\)\\>" . font-lock-variable-name-face) ;; ordinals '("\\<\\(\\w+\\)\\s-*(" (1 font-lock-function-name-face)) ;; functions diff --git a/thrift.vim b/thrift.vim index 1e2dad1e..d6727fb0 100644 --- a/thrift.vim +++ b/thrift.vim @@ -30,7 +30,8 @@ syn region thriftStringDouble matchgroup=None start=+"+ end=+"+ syn match thriftNumber "-\=\<\d\+\>" contained " Keywords -syn keyword thriftKeyword namespace cpp_namespace java_package php_namespace ruby_namespace py_module perl_package +syn keyword thriftKeyword namespace cpp_namespace java_package cocoa_prefix +syn keyword php_namespace ruby_namespace py_module perl_package syn keyword thriftKeyword xsd_all xsd_optional xsd_nillable xsd_namespace xsd_attrs syn keyword thriftKeyword include cpp_include cpp_type const optional required syn keyword thriftBasicTypes void bool byte i16 i32 i64 double string binary -- 2.17.1