ShouldType.allowOnlyWords

Allows to check that only a select list of words are permitted before the current word. On failure, an informative error is printed. Usage: should.allowOnlyWords!("word1", "word2").before!"newWord";

struct ShouldType(G, string[] phrase = [])
template allowOnlyWords (
allowedWords...
) if (
allSatisfy!(isStringLiteral, allowedWords)
) {}

Members

Functions

before
void before()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta