import { c as e, o as t } from "./dist-DgSmYkuV.js";
//#region src/editors/languages/yaml.ts
var n = [
	"true",
	"false",
	"null",
	"yes",
	"no",
	"on",
	"off"
], r = e.define({ token(e) {
	if (e.eatSpace()) return null;
	if (e.match("#") !== null) return e.skipToEnd(), "comment";
	if (e.sol() && e.match("---") !== null || e.sol() && e.match("...") !== null) return "meta";
	if (e.match(/&[A-Za-z_][\w-]*/) !== null || e.match(/\*[A-Za-z_][\w-]*/) !== null) return "labelName";
	if (e.match(/![^\s]*/) !== null) return "tagName";
	if (e.match(/"(?:[^"\\]|\\.)*"/) !== null || e.match(/'(?:[^'\\]|\\.)*'/) !== null) return "string";
	if (e.match(/[|>][+-]?\d*/) !== null) return "meta";
	if ((e.sol() || e.string.charAt(e.start - 1) === " ") && e.match(/[\w][\w.-]*(?=\s*:)/) !== null) return "propertyName";
	if (e.match(/:\s/) !== null || e.match(/:$/) !== null && e.eol()) return "punctuation";
	if (e.match(/0x[0-9A-Fa-f]+/) !== null || e.match(/0o[0-7]+/) !== null || e.match(/[+-]?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?/) !== null || e.match(/[+-]?\.(inf|Inf|INF)/) !== null || e.match(/\.(nan|NaN|NAN)/) !== null) return "number";
	if (e.match(/[A-Za-z_]\w*/) !== null) {
		let t = e.current().toLowerCase();
		return n.includes(t) ? "atom" : null;
	}
	return e.match(/- /) === null ? e.match(/[{}[\],]/) === null ? (e.next(), null) : "bracket" : "punctuation";
} });
function i() {
	return new t(r);
}
//#endregion
export { r as n, i as t };

//# sourceMappingURL=yaml-BAVAG9c4.js.map