Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ SkipSingleLineComment()

bool System.Text.Json.Utf8JsonReader.SkipSingleLineComment ( ReadOnlySpan< byte > localBuffer,
out int idx )
inlineprivate

Definition at line 1764 of file Utf8JsonReader.cs.

1765 {
1767 int num = 0;
1768 if (idx != -1)
1769 {
1770 num = idx;
1771 if (localBuffer[idx] != 10)
1772 {
1773 if (idx < localBuffer.Length - 1)
1774 {
1775 if (localBuffer[idx + 1] == 10)
1776 {
1777 num++;
1778 }
1779 }
1780 else if (!IsLastSpan)
1781 {
1782 return false;
1783 }
1784 }
1785 num++;
1787 _lineNumber++;
1788 }
1789 else
1790 {
1791 if (!IsLastSpan)
1792 {
1793 return false;
1794 }
1795 idx = localBuffer.Length;
1796 num = idx;
1797 _bytePositionInLine += 2 + localBuffer.Length;
1798 }
1799 _consumed += 2 + num;
1800 return true;
1801 }
int FindLineSeparator(ReadOnlySpan< byte > localBuffer)

References System.Text.Json.Utf8JsonReader._bytePositionInLine, System.Text.Json.Utf8JsonReader._consumed, System.Text.Json.Utf8JsonReader._lineNumber, System.Text.Json.Dictionary, System.Text.Json.Utf8JsonReader.FindLineSeparator(), System.Text.Json.Utf8JsonReader.IsLastSpan, and System.L.

Referenced by System.Text.Json.Utf8JsonReader.ConsumeSingleLineComment(), and System.Text.Json.Utf8JsonReader.SkipComment().