]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/languages/protobuf.js
1 /*! `protobuf` grammar compiled for Highlight.js 11.11.1 */
3 var hljsGrammar
= (function () {
7 Language: Protocol Buffers
8 Author: Dan Tao <daniel.tao@gmail.com>
9 Description: Protocol buffer message definition format
10 Website: https://developers.google.com/protocol-buffers/docs/proto3
14 function protobuf(hljs
) {
42 const CLASS_DEFINITION
= {
44 /(message|enum|service)\s+/,
54 name: 'Protocol Buffers',
65 hljs
.QUOTE_STRING_MODE
,
67 hljs
.C_LINE_COMMENT_MODE
,
68 hljs
.C_BLOCK_COMMENT_MODE
,
71 className: 'function',
75 keywords: 'rpc returns'
77 { // match enum items (relevance)
79 begin: /^\s*[A-Z_]+(?=\s*=[^\n]+;$)/ }
88 hljs
.registerLanguage('protobuf', hljsGrammar
);