mirror of
https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git
synced 2026-01-26 19:19:57 +00:00
21 lines
595 B
JavaScript
21 lines
595 B
JavaScript
class FunctionNotOverriddenError extends Error {
|
|
constructor(message = "", ...args) {
|
|
super(message, ...args);
|
|
this.message = message + " is an abstract base function and must be overwritten.";
|
|
}
|
|
}
|
|
|
|
class BaseTagParser {
|
|
triggerCondition = null;
|
|
|
|
constructor (triggerCondition) {
|
|
if (new.target === BaseTagParser) {
|
|
throw new TypeError("Cannot construct abstract BaseCompletionParser directly");
|
|
}
|
|
this.triggerCondition = triggerCondition;
|
|
}
|
|
|
|
parse() {
|
|
throw new FunctionNotOverriddenError("parse()");
|
|
}
|
|
} |