1 |
- {"ast":null,"code":"/*\nLanguage: Protocol Buffers\nAuthor: Dan Tao <daniel.tao@gmail.com>\nDescription: Protocol buffer message definition format\nWebsite: https://developers.google.com/protocol-buffers/docs/proto3\nCategory: protocols\n*/\n\nfunction protobuf(hljs) {\n const KEYWORDS = [\"package\", \"import\", \"option\", \"optional\", \"required\", \"repeated\", \"group\", \"oneof\"];\n const TYPES = [\"double\", \"float\", \"int32\", \"int64\", \"uint32\", \"uint64\", \"sint32\", \"sint64\", \"fixed32\", \"fixed64\", \"sfixed32\", \"sfixed64\", \"bool\", \"string\", \"bytes\"];\n const CLASS_DEFINITION = {\n match: [/(message|enum|service)\\s+/, hljs.IDENT_RE],\n scope: {\n 1: \"keyword\",\n 2: \"title.class\"\n }\n };\n return {\n name: 'Protocol Buffers',\n aliases: ['proto'],\n keywords: {\n keyword: KEYWORDS,\n type: TYPES,\n literal: ['true', 'false']\n },\n contains: [hljs.QUOTE_STRING_MODE, hljs.NUMBER_MODE, hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, CLASS_DEFINITION, {\n className: 'function',\n beginKeywords: 'rpc',\n end: /[{;]/,\n excludeEnd: true,\n keywords: 'rpc returns'\n }, {\n // match enum items (relevance)\n // BLAH = ...;\n begin: /^\\s*[A-Z_]+(?=\\s*=[^\\n]+;$)/\n }]\n };\n}\nmodule.exports = protobuf;","map":{"version":3,"names":["protobuf","hljs","KEYWORDS","TYPES","CLASS_DEFINITION","match","IDENT_RE","scope","name","aliases","keywords","keyword","type","literal","contains","QUOTE_STRING_MODE","NUMBER_MODE","C_LINE_COMMENT_MODE","C_BLOCK_COMMENT_MODE","className","beginKeywords","end","excludeEnd","begin","module","exports"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/highlight.js/lib/languages/protobuf.js"],"sourcesContent":["/*\nLanguage: Protocol Buffers\nAuthor: Dan Tao <daniel.tao@gmail.com>\nDescription: Protocol buffer message definition format\nWebsite: https://developers.google.com/protocol-buffers/docs/proto3\nCategory: protocols\n*/\n\nfunction protobuf(hljs) {\n const KEYWORDS = [\n \"package\",\n \"import\",\n \"option\",\n \"optional\",\n \"required\",\n \"repeated\",\n \"group\",\n \"oneof\"\n ];\n const TYPES = [\n \"double\",\n \"float\",\n \"int32\",\n \"int64\",\n \"uint32\",\n \"uint64\",\n \"sint32\",\n \"sint64\",\n \"fixed32\",\n \"fixed64\",\n \"sfixed32\",\n \"sfixed64\",\n \"bool\",\n \"string\",\n \"bytes\"\n ];\n const CLASS_DEFINITION = {\n match: [\n /(message|enum|service)\\s+/,\n hljs.IDENT_RE\n ],\n scope: {\n 1: \"keyword\",\n 2: \"title.class\"\n }\n };\n\n return {\n name: 'Protocol Buffers',\n aliases: ['proto'],\n keywords: {\n keyword: KEYWORDS,\n type: TYPES,\n literal: [\n 'true',\n 'false'\n ]\n },\n contains: [\n hljs.QUOTE_STRING_MODE,\n hljs.NUMBER_MODE,\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n CLASS_DEFINITION,\n {\n className: 'function',\n beginKeywords: 'rpc',\n end: /[{;]/,\n excludeEnd: true,\n keywords: 'rpc returns'\n },\n { // match enum items (relevance)\n // BLAH = ...;\n begin: /^\\s*[A-Z_]+(?=\\s*=[^\\n]+;$)/ }\n ]\n };\n}\n\nmodule.exports = protobuf;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQA,CAACC,IAAI,EAAE;EACtB,MAAMC,QAAQ,GAAG,CACf,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,OAAO,EACP,OAAO,CACR;EACD,MAAMC,KAAK,GAAG,CACZ,QAAQ,EACR,OAAO,EACP,OAAO,EACP,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,UAAU,EACV,UAAU,EACV,MAAM,EACN,QAAQ,EACR,OAAO,CACR;EACD,MAAMC,gBAAgB,GAAG;IACvBC,KAAK,EAAE,CACL,2BAA2B,EAC3BJ,IAAI,CAACK,QAAQ,CACd;IACDC,KAAK,EAAE;MACL,CAAC,EAAE,SAAS;MACZ,CAAC,EAAE;IACL;EACF,CAAC;EAED,OAAO;IACLC,IAAI,EAAE,kBAAkB;IACxBC,OAAO,EAAE,CAAC,OAAO,CAAC;IAClBC,QAAQ,EAAE;MACRC,OAAO,EAAET,QAAQ;MACjBU,IAAI,EAAET,KAAK;MACXU,OAAO,EAAE,CACP,MAAM,EACN,OAAO;IAEX,CAAC;IACDC,QAAQ,EAAE,CACRb,IAAI,CAACc,iBAAiB,EACtBd,IAAI,CAACe,WAAW,EAChBf,IAAI,CAACgB,mBAAmB,EACxBhB,IAAI,CAACiB,oBAAoB,EACzBd,gBAAgB,EAChB;MACEe,SAAS,EAAE,UAAU;MACrBC,aAAa,EAAE,KAAK;MACpBC,GAAG,EAAE,MAAM;MACXC,UAAU,EAAE,IAAI;MAChBZ,QAAQ,EAAE;IACZ,CAAC,EACD;MAAE;MACA;MACAa,KAAK,EAAE;IAA8B,CAAC;EAE5C,CAAC;AACH;AAEAC,MAAM,CAACC,OAAO,GAAGzB,QAAQ","ignoreList":[]},"metadata":{},"sourceType":"script","externalDependencies":[]}
|