物管理前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
864 B

  1. function n(t){return new RegExp("^(("+t.join(")|(")+"))\\b","i")}var e=["package","message","import","syntax","required","optional","repeated","reserved","default","extensions","packed","bool","bytes","double","enum","float","string","int32","int64","uint32","uint64","sint32","sint64","fixed32","fixed64","sfixed32","sfixed64","option","service","rpc","returns"],a=n(e),i=new RegExp("^[_A-Za-z¡-￿][_A-Za-z0-9¡-￿]*");function o(t){return t.eatSpace()?null:t.match("//")?(t.skipToEnd(),"comment"):t.match(/^[0-9\.+-]/,!1)&&(t.match(/^[+-]?0x[0-9a-fA-F]+/)||t.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/)||t.match(/^[+-]?\d+([EeDd][+-]?\d+)?/))?"number":t.match(/^"([^"]|(""))*"/)||t.match(/^'([^']|(''))*'/)?"string":t.match(a)?"keyword":t.match(i)?"variable":(t.next(),null)}const r={name:"protobuf",token:o,languageData:{autocomplete:e}};export{r as protobuf};