mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
step into closures from elsewhere (draft)
This commit is contained in:
@ -117,6 +117,8 @@ export class SlashCommandParser {
|
||||
/**@type {SlashCommandExecutor[]}*/ commandIndex;
|
||||
/**@type {SlashCommandScope[]}*/ scopeIndex;
|
||||
|
||||
/**@type {string}*/ parserContext;
|
||||
|
||||
get userIndex() { return this.index; }
|
||||
|
||||
get ahead() {
|
||||
@ -610,6 +612,7 @@ export class SlashCommandParser {
|
||||
this.commandIndex = [];
|
||||
this.scopeIndex = [];
|
||||
this.macroIndex = [];
|
||||
this.parserContext = uuidv4();
|
||||
const closure = this.parseClosure(true);
|
||||
return closure;
|
||||
}
|
||||
@ -637,6 +640,8 @@ export class SlashCommandParser {
|
||||
if (!isRoot) this.take(2); // discard opening {:
|
||||
const textStart = this.index;
|
||||
let closure = new SlashCommandClosure(this.scope);
|
||||
closure.parserContext = this.parserContext;
|
||||
closure.fullText = this.text;
|
||||
closure.abortController = this.abortController;
|
||||
closure.debugController = this.debugController;
|
||||
this.scope = closure.scope;
|
||||
|
Reference in New Issue
Block a user