import "../enums-BzQ4b7rt.js";
//#region src/utils.ts
/**
* Returns true when token is a tag with a given name
*/
function isTag(token, name) {
	if (token.type === "tag" || token.type === "e__tag") return name ? token.properties.name === name : true;
	return false;
}
/**
* Returns true when token is an escape tag with a given name
*/
function isEscapedTag(token, name) {
	if (token.type === "e__tag") return name ? token.properties.name === name : true;
	return false;
}
/**
* Returns true when token.type is a mustache type
*/
function isMustache(token) {
	return token.type === "e__mustache" || token.type === "es__mustache" || token.type === "mustache" || token.type === "s__mustache";
}
/**
* Returns true when token.type is a safe mustache type
*/
function isSafeMustache(token) {
	return token.type === "es__mustache" || token.type === "s__mustache";
}
/**
* Returns true when toke.type is an escaped mustache type
*/
function isEscapedMustache(token) {
	return token.type === "e__mustache" || token.type === "es__mustache";
}
/**
* Returns line and column number for a given lexer token
*/
function getLineAndColumn(token) {
	if (token.type === "newline" || token.type === "raw") return [token.line, 0];
	return [token.loc.start.line, token.loc.start.col];
}
//#endregion
export { getLineAndColumn, isEscapedMustache, isEscapedTag, isMustache, isSafeMustache, isTag };
