add pauper to the list of checked formats in search (#3901)
* add pauper to the list of checked formats without a short form l:p remains reserved for pioneer * throw out weird hardcoded formats this will at least still work whenever a format gets added the shorthands are still kept
This commit is contained in:
parent
1815094249
commit
17efe8c003
1 changed files with 20 additions and 16 deletions
|
@ -28,7 +28,7 @@ ToughnessQuery <- [Tt] 'ou' 'ghness'? ws? NumericExpression
|
|||
RarityQuery <- [rR] ':' RegexString
|
||||
|
||||
FormatQuery <- 'f' ':' Format / Legality ':' Format
|
||||
Format <- [Mm] 'odern'? / [Ss] 'tandard'? / [Vv] 'intage'? / [Ll] 'egacy'? / [Cc] 'ommander'? / [Pp] 'ioneer'?
|
||||
Format <- [a-zA-Z] [a-z]*
|
||||
Legality <- [Ll] 'egal'? / [Bb] 'anned'? / [Rr] 'estricted'
|
||||
|
||||
|
||||
|
@ -138,6 +138,7 @@ static void setupParserRules()
|
|||
};
|
||||
|
||||
search["Format"] = [](const peg::SemanticValues &sv) -> QString {
|
||||
if (sv.length() == 1) {
|
||||
switch (tolower(sv.str()[0])) {
|
||||
case 'm':
|
||||
return "modern";
|
||||
|
@ -154,6 +155,9 @@ static void setupParserRules()
|
|||
default:
|
||||
return "";
|
||||
}
|
||||
} else {
|
||||
return QString::fromStdString(sv.str()).toLower();
|
||||
}
|
||||
};
|
||||
search["StringValue"] = [](const peg::SemanticValues &sv) -> StringMatcher {
|
||||
if (sv.choice() == 0) {
|
||||
|
|
Loading…
Reference in a new issue