API methods reimplemented for DTLib.Web
This commit is contained in:
@@ -23,7 +23,7 @@ namespace ParadoxSaveParser.Lib;
|
||||
///
|
||||
/// Console.Write($"| {cur.Value} |");
|
||||
///
|
||||
/// for (var next = cur.Next; next != null; next = next.Next)
|
||||
/// for (var next = cur.Next; next is not null; next = next.Next)
|
||||
/// Console.Write($" {next.Value}");
|
||||
/// Console.WriteLine();
|
||||
/// }
|
||||
@@ -64,8 +64,8 @@ public class BufferedEnumerator<T> : IEnumerator<LinkedListNode<T>>
|
||||
return false;
|
||||
|
||||
_currentNodeIndex++;
|
||||
_currentNode = _currentNode == null ? _llist.First : _currentNode.Next;
|
||||
return _currentNode != null;
|
||||
_currentNode = _currentNode is null ? _llist.First : _currentNode.Next;
|
||||
return _currentNode is not null;
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
global using System;
|
||||
global using System.Collections.Generic;
|
||||
global using System.IO;
|
||||
global using System.Text;
|
||||
global using System.Collections.Generic;
|
||||
|
||||
namespace ParadoxSaveParser.Lib;
|
||||
|
||||
@@ -217,7 +217,7 @@ public class Parser
|
||||
if(!_tokens.MoveNext())
|
||||
throw new Exception("Unexpected end of file");
|
||||
object? value = ParseValue();
|
||||
if (value == null)
|
||||
if (value is null)
|
||||
break;
|
||||
list.Add(value);
|
||||
}
|
||||
@@ -277,7 +277,7 @@ public class Parser
|
||||
throw new UnexpectedTokenException(tok);
|
||||
|
||||
object? value = ParseValue();
|
||||
if (value == null)
|
||||
if (value is null)
|
||||
throw new UnexpectedTokenException(_tokens.Current.Value);
|
||||
|
||||
if(!dict.TryGetValue(key, out List<object>? list))
|
||||
|
||||
Reference in New Issue
Block a user