diff --git a/src/Parlot/Character.Generated.cs b/src/Parlot/Character.Generated.cs index 7603f7b1..e90c84da 100644 --- a/src/Parlot/Character.Generated.cs +++ b/src/Parlot/Character.Generated.cs @@ -6,7 +6,7 @@ public static partial class Character { private static ReadOnlySpan _characterData => new byte[] { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 8, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 8, 8, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/test/Parlot.Tests/CharMaskGeneratorTest.cs b/test/Parlot.Tests/CharMaskGeneratorTest.cs index 17142084..ca6c209f 100644 --- a/test/Parlot.Tests/CharMaskGeneratorTest.cs +++ b/test/Parlot.Tests/CharMaskGeneratorTest.cs @@ -105,6 +105,7 @@ public static bool IsWhiteSpaceOrNewLine(char ch) return (ch <= 32 && ((ch == 32) || // space (ch == '\n') || + (ch == '\f') || (ch == '\r') || (ch == '\t') || // horizontal tab (ch == '\v'))) diff --git a/test/Parlot.Tests/CharacterTests.cs b/test/Parlot.Tests/CharacterTests.cs index dbf18186..da5949d4 100644 --- a/test/Parlot.Tests/CharacterTests.cs +++ b/test/Parlot.Tests/CharacterTests.cs @@ -1,4 +1,4 @@ -using Xunit; +using Xunit; namespace Parlot.Tests; @@ -32,6 +32,7 @@ public void ShouldDecodeStringInBuffer() [InlineData('\x09', true)] [InlineData('\x20', true)] [InlineData('\xa0', true)] + [InlineData('\f', true)] [InlineData('\v', false)] [InlineData('\n', false)] [InlineData('\r', false)] @@ -42,9 +43,10 @@ public void ShouldDetectWhiteSpace(char c, bool isWhiteSpace) } [Theory] - [InlineData('\x09', true)] + [InlineData('\t', true)] [InlineData('\x20', true)] [InlineData('\xa0', true)] + [InlineData('\f', true)] [InlineData('\v', true)] [InlineData('\n', true)] [InlineData('\r', true)] diff --git a/test/Parlot.Tests/CompileTests.cs b/test/Parlot.Tests/CompileTests.cs index 86a89fc6..0ac6d06a 100644 --- a/test/Parlot.Tests/CompileTests.cs +++ b/test/Parlot.Tests/CompileTests.cs @@ -433,8 +433,8 @@ public void ShouldCompileNonWhiteSpace() [Fact] public void ShouldCompileWhiteSpace() { - Assert.Equal("\n\r\v ", Literals.WhiteSpace(true).Compile().Parse("\n\r\v a")); - Assert.Equal(" ", Literals.WhiteSpace(false).Compile().Parse(" \n\r\v a")); + Assert.Equal("\n\r\v\f ", Literals.WhiteSpace(true).Compile().Parse("\n\r\v\f a")); + Assert.Equal(" ", Literals.WhiteSpace(false).Compile().Parse(" \n\r\v\f a")); } [Theory] diff --git a/test/Parlot.Tests/FluentTests.cs b/test/Parlot.Tests/FluentTests.cs index 70e6ebe0..8a00e3bc 100644 --- a/test/Parlot.Tests/FluentTests.cs +++ b/test/Parlot.Tests/FluentTests.cs @@ -501,8 +501,8 @@ public void NonWhiteSpaceShouldStopAtSpaceOrEof() [Fact] public void ShouldParseWhiteSpace() { - Assert.Equal("\n\r\v ", Literals.WhiteSpace(true).Parse("\n\r\v a")); - Assert.Equal(" ", Literals.WhiteSpace(false).Parse(" \n\r\v a")); + Assert.Equal("\n\r\v\f ", Literals.WhiteSpace(true).Parse("\n\r\v\f a")); + Assert.Equal(" \f", Literals.WhiteSpace(false).Parse(" \f\n\r\v a")); } [Fact]