Ticket #3868: 0001-syntax-add-Protocol-Buffers-and-gRPC-support.patch

File 0001-syntax-add-Protocol-Buffers-and-gRPC-support.patch, 2.8 KB (added by sknaumov, 2 years ago)
  • misc/syntax/Makefile.am

    From 5a8ba1fa88ca835b0f130dc3a4139d16ea9f6803 Mon Sep 17 00:00:00 2001
    From: Sergey Naumov <snaumov@quantenna.com>
    Date: Tue, 10 Oct 2017 12:45:14 +0300
    Subject: [PATCH] syntax: add Protocol Buffers and gRPC support
    
    ---
     misc/syntax/Makefile.am     |  1 +
     misc/syntax/Syntax.in       |  3 +++
     misc/syntax/protobuf.syntax | 57 +++++++++++++++++++++++++++++++++++++++++++++
     3 files changed, 61 insertions(+)
     create mode 100644 misc/syntax/protobuf.syntax
    
    diff --git a/misc/syntax/Makefile.am b/misc/syntax/Makefile.am
    index 61b3de5..6dac5a1 100644
    a b SYNTAXFILES = \ 
    6464        povray.syntax           \ 
    6565        procmail.syntax         \ 
    6666        properties.syntax       \ 
     67        protobuf.syntax         \ 
    6768        puppet.syntax           \ 
    6869        python.syntax           \ 
    6970        r.syntax                \ 
  • misc/syntax/Syntax.in

    diff --git a/misc/syntax/Syntax.in b/misc/syntax/Syntax.in
    index 06392e6..86404a0 100644
    a b include osl.syntax 
    280280file .\*\\.([rR]|Rd|Rscript)$ R\sProgram 
    281281include r.syntax 
    282282 
     283file ..\*\\.proto$ Protobuf\sFile 
     284include protobuf.syntax 
     285 
    283286file .\* unknown 
    284287include unknown.syntax 
  • new file misc/syntax/protobuf.syntax

    diff --git a/misc/syntax/protobuf.syntax b/misc/syntax/protobuf.syntax
    new file mode 100644
    index 0000000..2490889
    - +  
     1# Syntax rules for Protobuf files and gRPC extensions 
     2 
     3context default 
     4    keyword whole enum yellow 
     5    keyword whole extend yellow 
     6    keyword whole extensions yellow 
     7    keyword whole import yellow 
     8    keyword whole map yellow 
     9    keyword whole message yellow 
     10    keyword whole oneof yellow 
     11    keyword whole option yellow 
     12    keyword whole optional yellow 
     13    keyword whole package yellow 
     14    keyword whole public yellow 
     15    keyword whole repeated yellow 
     16    keyword whole required yellow 
     17    keyword whole reserved yellow 
     18    keyword whole returns yellow 
     19    keyword whole rpc yellow 
     20    keyword whole service yellow 
     21    keyword whole stream yellow 
     22 
     23    keyword whole double yellow 
     24    keyword whole float yellow 
     25    keyword whole int32 yellow 
     26    keyword whole int64 yellow 
     27    keyword whole uint32 yellow 
     28    keyword whole uint64 yellow 
     29    keyword whole sint32 yellow 
     30    keyword whole sint64 yellow 
     31    keyword whole fixed32 yellow 
     32    keyword whole fixed64 yellow 
     33    keyword whole sfixed32 yellow 
     34    keyword whole sfixed64 yellow 
     35    keyword whole bool yellow 
     36    keyword whole string yellow 
     37    keyword whole bytes yellow 
     38 
     39    keyword // brown 
     40 
     41# punctuation characters, sorted by ASCII code 
     42    keyword ( brightcyan 
     43    keyword ) brightcyan 
     44    keyword , brightcyan 
     45    keyword : brightcyan 
     46    keyword ; brightmagenta 
     47    keyword = yellow 
     48    keyword [ brightcyan 
     49    keyword ] brightcyan 
     50    keyword { brightcyan 
     51    keyword } brightcyan 
     52 
     53context exclusive // \n brown 
     54    spellcheck 
     55 
     56context " " green 
     57    spellcheck