Skip to content

Commit

Permalink
Fix null reference warning, add 2 adjective rules (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
IhateTrains authored Dec 31, 2023
1 parent 9878958 commit a741a72
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions commonItems/Linguistics/adjective_rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@
{"*ah", "*ah"},
{"*aí", "*aian"}, // Kolōnaí (Colonae in Latin) -> Kolonaian (rule made up)
{"*ai", "*aian"}, // Kolōnai
{"*aj", "*ajian"}, // Thaj (place in Arabia), rule made up
{"*al", "*ali"}, // Nepal
{"*an", "*anian"}, // Jordan
{"*ao", "*aoan"}, // Curaçao
Expand Down Expand Up @@ -601,6 +602,7 @@
{"*ík", "*ikian"}, // Reykjavík
{"*jh", "*jhi"}, // Wajh
{"*ju", "*ju"}, // Gwangju
{"*jo", "*joan"}, // Blaikingawjo, rule made up
{"*fi", "*fitan"}, // Amalfi
{"*ff", "*ffian"}, // Cardiff
{"*le", "*lean"}, // Chile
Expand Down
6 changes: 5 additions & 1 deletion commonItems/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,11 @@ public static string GetNextLexeme(BufferedReader reader) {
}
var lexeme = GetNextLexeme(reader);
if (CommonRegexes.Variable.IsMatch(lexeme)) {
return GetValueString(reader.ResolveVariable(lexeme));
var variableValue = reader.ResolveVariable(lexeme);
if (variableValue is null) {
return null;
}
return GetValueString(variableValue);
}
if (CommonRegexes.InterpolatedExpression.IsMatch(lexeme)) {
return GetValueString(reader.EvaluateExpression(lexeme));
Expand Down
2 changes: 1 addition & 1 deletion commonItems/commonItems.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<PackageId>PGCG.$(AssemblyName)</PackageId>
<Version>10.0.3</Version>
<Version>10.0.4</Version>
<Authors>PGCG</Authors>
<PackageProjectUrl>https://github.com/ParadoxGameConverters/commonItems.NET</PackageProjectUrl>
<RepositoryUrl>https://github.com/ParadoxGameConverters/commonItems.NET</RepositoryUrl>
Expand Down

0 comments on commit a741a72

Please sign in to comment.