mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 22:42:14 -07:00
rename property
This commit is contained in:
parent
f1ec9c4622
commit
7c2b6cd3d3
1 changed files with 7 additions and 5 deletions
|
|
@ -20,7 +20,7 @@ QueryPart <- NotQuery / SetQuery / RarityQuery / CMCQuery / FormatQuery / PowerQ
|
||||||
|
|
||||||
NotQuery <- ('NOT' ws/'-') SomewhatComplexQueryPart
|
NotQuery <- ('NOT' ws/'-') SomewhatComplexQueryPart
|
||||||
SetQuery <- ('e'/'set') [:] FlexStringValue
|
SetQuery <- ('e'/'set') [:] FlexStringValue
|
||||||
OracleQuery <- 'o' [:] RegexString
|
OracleQuery <- 'o' [:] MatcherString
|
||||||
|
|
||||||
|
|
||||||
CMCQuery <- ('cmc'/'mv') ws? NumericExpression
|
CMCQuery <- ('cmc'/'mv') ws? NumericExpression
|
||||||
|
|
@ -42,7 +42,7 @@ ColorEx <- Color / [mc]
|
||||||
|
|
||||||
ColorQuery <- [cC] 'olor'? <[iI]?> <[:!]> ColorEx*
|
ColorQuery <- [cC] 'olor'? <[iI]?> <[:!]> ColorEx*
|
||||||
|
|
||||||
FieldQuery <- String [:] RegexString / String ws? NumericExpression
|
FieldQuery <- String [:] MatcherString / String ws? NumericExpression
|
||||||
|
|
||||||
NonDoubleQuoteUnlessEscaped <- '\\\"'. / !["].
|
NonDoubleQuoteUnlessEscaped <- '\\\"'. / !["].
|
||||||
NonSingleQuoteUnlessEscaped <- "\\\'". / !['].
|
NonSingleQuoteUnlessEscaped <- "\\\'". / !['].
|
||||||
|
|
@ -52,8 +52,10 @@ String <- SingleApostropheString / UnescapedStringListPart+ / ["] <NonDoubleQuot
|
||||||
StringValue <- String / [(] StringList [)]
|
StringValue <- String / [(] StringList [)]
|
||||||
StringList <- StringListString (ws? [,] ws? StringListString)*
|
StringList <- StringListString (ws? [,] ws? StringListString)*
|
||||||
StringListString <- UnescapedStringListPart+
|
StringListString <- UnescapedStringListPart+
|
||||||
GenericQuery <- RegexString
|
GenericQuery <- MatcherString
|
||||||
RegexString <- String
|
|
||||||
|
# A String that can either be a normal string or a regex search string
|
||||||
|
MatcherString <- String
|
||||||
|
|
||||||
FlexStringValue <- CompactStringSet / String / [(] StringList [)]
|
FlexStringValue <- CompactStringSet / String / [(] StringList [)]
|
||||||
CompactStringSet <- StringListString ([,+] StringListString)+
|
CompactStringSet <- StringListString ([,+] StringListString)+
|
||||||
|
|
@ -261,7 +263,7 @@ static void setupParserRules()
|
||||||
return QString::fromStdString(std::string(sv.sv()));
|
return QString::fromStdString(std::string(sv.sv()));
|
||||||
};
|
};
|
||||||
|
|
||||||
search["RegexString"] = [](const peg::SemanticValues &sv) -> StringMatcher {
|
search["MatcherString"] = [](const peg::SemanticValues &sv) -> StringMatcher {
|
||||||
auto target = std::any_cast<QString>(sv[0]);
|
auto target = std::any_cast<QString>(sv[0]);
|
||||||
auto sanitizedTarget = QString(target);
|
auto sanitizedTarget = QString(target);
|
||||||
sanitizedTarget.replace("\\\"", "\"");
|
sanitizedTarget.replace("\\\"", "\"");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue