import { c as e, o as t } from "../../dist-DgSmYkuV.js";
//#region src/editors/languages/yara.ts
var n = [
	"rule",
	"meta",
	"strings",
	"condition",
	"import",
	"include",
	"private",
	"global",
	"true",
	"false"
], r = [
	"nocase",
	"wide",
	"ascii",
	"fullword",
	"xor",
	"base64",
	"base64wide"
], i = [
	"and",
	"or",
	"not",
	"of",
	"them",
	"any",
	"all",
	"at",
	"in",
	"for",
	"contains",
	"icontains",
	"startswith",
	"istartswith",
	"endswith",
	"iendswith",
	"matches",
	"defined"
], a = [
	"pe",
	"elf",
	"math",
	"hash",
	"cuckoo",
	"magic",
	"dotnet",
	"time",
	"console",
	"string"
], o = e.define({ token(e) {
	if (e.eatSpace()) return null;
	if (e.match("//") !== null) return e.skipToEnd(), "comment";
	if (e.match(/\/\*.*?\*\//) !== null) return "comment";
	if (e.match(/\{[\s0-9A-Fa-f?|()[\]-]*\}/) !== null) return "string";
	if (e.match(/\/(?:[^/\\]|\\.)*\//) !== null) return "regexp";
	if (e.match(/"(?:[^"\\]|\\.)*"/) !== null) return "string";
	if (e.match(/0x[0-9A-Fa-f]+/) !== null || e.match(/\d+(\.\d+)?/) !== null) return "number";
	if (e.match(/[$#@][A-Za-z_]\w*/) !== null) return "variableName.special";
	if (e.match(/[A-Za-z_]\w*/) !== null) {
		let t = e.current().toLowerCase();
		return n.includes(t) ? "keyword" : r.includes(t) ? "modifier" : i.includes(t) ? "operator" : a.includes(t) ? "namespace" : "variableName";
	}
	return e.match(/==|!=|<=|>=|<<|>>/) !== null || e.match(/[<>|=]/) !== null ? "operator" : (e.next(), null);
} });
function s() {
	return new t(o);
}
var c = [
	...n.map((e) => ({
		label: e,
		type: "keyword"
	})),
	...r.map((e) => ({
		label: e,
		type: "keyword",
		info: "string modifier"
	})),
	...i.map((e) => ({
		label: e,
		type: "keyword"
	})),
	...a.map((e) => ({
		label: e,
		type: "namespace",
		info: "built-in module"
	}))
];
//#endregion
export { s as yara, c as yaraCompletions, o as yaraLanguage };

//# sourceMappingURL=yara.js.map