Compare commits
No commits in common. "95c04033629d2ff7e5979bb36258e24a92a5e3a2" and "890166ebce7d5941a028211256cd987ffa20ee3f" have entirely different histories.
95c0403362
...
890166ebce
@ -75,7 +75,7 @@ internal static partial class Modes
|
||||
ColoredConsole.Write("Input file path: ", ConsoleColor.Blue);
|
||||
input = ColoredConsole.ReadLine(ConsoleColor.Gray);
|
||||
if (string.IsNullOrEmpty(input))
|
||||
throw new ArgumentException("Input file path is required");
|
||||
throw new NullReferenceException();
|
||||
inputPath = input;
|
||||
break;
|
||||
|
||||
@ -84,8 +84,8 @@ internal static partial class Modes
|
||||
ColoredConsole.Write("Output file path [default=stdout]: ", ConsoleColor.Blue);
|
||||
input = ColoredConsole.ReadLine(ConsoleColor.Gray);
|
||||
if (string.IsNullOrEmpty(input))
|
||||
outputPath = null;
|
||||
else outputPath = input;
|
||||
throw new ArgumentException("Input file path is required");
|
||||
inputPath = input;
|
||||
break;
|
||||
|
||||
case "s":
|
||||
|
||||
@ -41,8 +41,7 @@ public static class SearchExpressionCompiler
|
||||
var subExprs = new List<ISearchExpression>();
|
||||
int supExprBegin = 1;
|
||||
int bracketBalance = 1;
|
||||
int i = supExprBegin;
|
||||
for (; i < query.Length && bracketBalance != 0; i++)
|
||||
for (int i = supExprBegin; i < query.Length && bracketBalance != 0; i++)
|
||||
{
|
||||
if (CharEqualsAndNotEscaped('(', query, i))
|
||||
{
|
||||
@ -61,7 +60,7 @@ public static class SearchExpressionCompiler
|
||||
}
|
||||
}
|
||||
|
||||
if (i != query.Length)
|
||||
if (query[^1] != ')')
|
||||
throw new NotImplementedException("Expressions after ')' are not supported");
|
||||
|
||||
if (bracketBalance > 0)
|
||||
@ -69,7 +68,7 @@ public static class SearchExpressionCompiler
|
||||
if (bracketBalance < 0)
|
||||
throw new Exception("Too many closing brackets");
|
||||
|
||||
var subPartLast = query.Slice(supExprBegin, i - 1 - supExprBegin);
|
||||
var subPartLast = query.Slice(supExprBegin, query.Length - supExprBegin - 1);
|
||||
var subExprLast = Compile(subPartLast);
|
||||
subExprs.Add(subExprLast);
|
||||
return new MultipleMatchExpression(subExprs);
|
||||
|
||||
@ -1,43 +0,0 @@
|
||||
countries
|
||||
filter:
|
||||
always: exists (has raw_development && raw_development != 0)
|
||||
optional: is player (was_player == yes)
|
||||
exclude:
|
||||
flags
|
||||
hidden_flags
|
||||
variables
|
||||
estate
|
||||
active_agenda
|
||||
power_projection
|
||||
ai
|
||||
history
|
||||
navy
|
||||
army
|
||||
mercenary_company
|
||||
active_relations
|
||||
border_pct
|
||||
border_sit
|
||||
border_provinces
|
||||
neighbours
|
||||
home_neighbours
|
||||
core_neighbours
|
||||
inflation_history
|
||||
opinion_cache
|
||||
owned_provinces
|
||||
controlled_provinces
|
||||
core_provinces
|
||||
claim_provinces
|
||||
leader
|
||||
query:
|
||||
countries.(---.~|REB.~|PIR.~|NAT.~|*.(flags.~|hidden_flags.~|variables.~|estate.~|active_agenda.~|power_projection.~|ai.~|history.~|navy.~|army.~|mercenary_company.~|active_relations.~|border_pct.~|border_sit.~|border_provinces.~|neighbours.~|home_neighbours.~|core_neighbours.~|inflation_history.~|opinion_cache.~|owned_provinces.~|controlled_provinces.~|core_provinces.~|claim_provinces.~|leader.~|*))
|
||||
|
||||
active_war
|
||||
filter:
|
||||
optional: only player wars
|
||||
previous_war
|
||||
filter:
|
||||
optional: only player wars
|
||||
always: not fictive (has losses and lasts long)
|
||||
income_statistics
|
||||
nation_size_statistics
|
||||
inflation_statistics
|
||||
Loading…
Reference in New Issue
Block a user