Skip to content

Commit 36689e0

Browse files
committed
#201 - rm dead code
1 parent 2ed6ebb commit 36689e0

File tree

1 file changed

+3
-15
lines changed
  • src/Domain/HydraScript.Domain.FrontEnd/Lexer

1 file changed

+3
-15
lines changed

src/Domain/HydraScript.Domain.FrontEnd/Lexer/Token.cs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System.Diagnostics.CodeAnalysis;
22
using System.Text.RegularExpressions;
33
using HydraScript.Domain.FrontEnd.Lexer.TokenTypes;
4-
using ZLinq;
54

65
namespace HydraScript.Domain.FrontEnd.Lexer;
76

@@ -24,30 +23,19 @@ public record EndToken() : Token(new EndOfProgramType(), null!, null!)
2423
{
2524
public override string ToString() => Type.Tag;
2625
}
27-
26+
2827
[ExcludeFromCodeCoverage]
2928
public record Segment(Coordinates Start, Coordinates End)
3029
{
3130
public override string ToString() => $"{Start}-{End}";
3231

33-
public static Segment operator +(Segment left, Segment right) =>
32+
public static Segment operator +(Segment left, Segment right) =>
3433
new(left.Start, right.End);
3534

3635
public static implicit operator string(Segment segment) =>
3736
segment.ToString();
38-
39-
public static implicit operator Segment(string segment)
40-
{
41-
var coords = segment.Split("-").AsValueEnumerable()
42-
.Select(x => x[1..^1].Replace(" ", string.Empty))
43-
.Select(x => x.Split(',').AsValueEnumerable().Select(int.Parse).ToArray())
44-
.ToArray();
45-
return new Segment(
46-
new Coordinates(coords[0][0], coords[0][1]),
47-
new Coordinates(coords[1][0], coords[1][1]));
48-
}
4937
}
50-
38+
5139
[ExcludeFromCodeCoverage]
5240
public record Coordinates(int Line, int Column)
5341
{

0 commit comments

Comments
 (0)