function wordRegexp(e) {
  return RegExp("^((" + e.join(")|(") + "))\\b", "i");
}
var keywordArray = /* @__PURE__ */ "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".split("."), keywords = wordRegexp(keywordArray), identifiers = /* @__PURE__ */ RegExp("^[_A-Za-z\xA1-\uFFFF][_A-Za-z0-9\xA1-\uFFFF]*");
function tokenBase(e) {
  return e.eatSpace() ? null : e.match("//") ? (e.skipToEnd(), "comment") : e.match(/^[0-9\.+-]/, false) && (e.match(/^[+-]?0x[0-9a-fA-F]+/) || e.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/) || e.match(/^[+-]?\d+([EeDd][+-]?\d+)?/)) ? "number" : e.match(/^"([^"]|(""))*"/) || e.match(/^'([^']|(''))*'/) ? "string" : e.match(keywords) ? "keyword" : e.match(identifiers) ? "variable" : (e.next(), null);
}
const protobuf = {
  name: "protobuf",
  token: tokenBase,
  languageData: { autocomplete: keywordArray }
};
export {
  protobuf as t
};
