Skip to content

Commit

Permalink
refactor: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
furesoft committed Nov 10, 2024
1 parent 1055f4d commit d9f0f51
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Silverfly/Lexer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@ public Token Next()

private void RecognizeLine(char c)
{
if (c != '\r' && c != '\n')
if (c is not ('\r' or '\n'))
{
return;
}

_line++;
_column = 1;
_column = 0;
}

private bool InvokeSymbols(out Token token)
Expand Down
7 changes: 7 additions & 0 deletions Source/TestProject/Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,13 @@ public Task Block_Should_Pass()
return Test("-42.5;13");
}


[Test]
public Task SourceLocation_Should_Pass()
{
return Test("hello\nworld");
}

[Test]
public Task SimpleTypeName_Should_Pass()
{
Expand Down

0 comments on commit d9f0f51

Please sign in to comment.