Initial commit.

Signed-off-by: Andreas Widen <aw@luflow.net>
This commit is contained in:
Andreas Widen 2026-07-27 17:57:03 +02:00
commit a4a5c7daa5
Signed by: hfsoulz
GPG key ID: 5B85F9B5F576A667
1389 changed files with 241399 additions and 0 deletions

View file

@ -0,0 +1,89 @@
/*! `protobuf` grammar compiled for Highlight.js 11.11.1 */
(function(){
var hljsGrammar = (function () {
'use strict';
/*
Language: Protocol Buffers
Author: Dan Tao <daniel.tao@gmail.com>
Description: Protocol buffer message definition format
Website: https://developers.google.com/protocol-buffers/docs/proto3
Category: protocols
*/
function protobuf(hljs) {
const KEYWORDS = [
"package",
"import",
"option",
"optional",
"required",
"repeated",
"group",
"oneof"
];
const TYPES = [
"double",
"float",
"int32",
"int64",
"uint32",
"uint64",
"sint32",
"sint64",
"fixed32",
"fixed64",
"sfixed32",
"sfixed64",
"bool",
"string",
"bytes"
];
const CLASS_DEFINITION = {
match: [
/(message|enum|service)\s+/,
hljs.IDENT_RE
],
scope: {
1: "keyword",
2: "title.class"
}
};
return {
name: 'Protocol Buffers',
aliases: ['proto'],
keywords: {
keyword: KEYWORDS,
type: TYPES,
literal: [
'true',
'false'
]
},
contains: [
hljs.QUOTE_STRING_MODE,
hljs.NUMBER_MODE,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
CLASS_DEFINITION,
{
className: 'function',
beginKeywords: 'rpc',
end: /[{;]/,
excludeEnd: true,
keywords: 'rpc returns'
},
{ // match enum items (relevance)
// BLAH = ...;
begin: /^\s*[A-Z_]+(?=\s*=[^\n]+;$)/ }
]
};
}
return protobuf;
})();
hljs.registerLanguage('protobuf', hljsGrammar);
})();