Allow a history in matcher tests
Closed this issue · 1 comments
JoshuaKGoldberg commented
Adding here as note taking while I add basic regular expressions...
Instead of using expression: RegExp
, make it test: IMatchTest
with:
export interface IMatchTest {
exec(input: string, history: <something>[]): string[] | undefined;
}
There needs to be a context/history of past commands so simple phrases like "end the loop" know what they're ending. I don't yet know what that should look like. Maybe the command classes themselves?
JoshuaKGoldberg commented
Maybe the commands should have a start and/or stop context option, where context is stored as the starting class or an enum?