constructor(name, caption, extensions) {
		if (Array.isArray(extensions)) {
			extensions = extensions.join("|");
		}

		this.name = name;
		this.mode = "ace/mode/" + name;
		this.extensions = extensions;
		this.caption = caption || this.name.replace(/_/g, " ");
		let re;

		if (/\^/.test(extensions)) {
			re =
				extensions.replace(/\|(\^)?/g, function (a, b) {
					return "$|" + (b ? "^" : "^.*\\.");
				}) + "$";
		} else {
			re = "^.*\\.(" + extensions + ")$";
		}

		this.extRe = new RegExp(re, "i");
	}
Create a new mode
@param {string} name
@param {string} caption
@param {string|Array<string>} extensions