Skip to content

Commit c2c3abc

Browse files
committed
wip
1 parent 189f139 commit c2c3abc

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using System.Collections.Generic;
2+
using System.Linq;
3+
4+
public sealed class PropertyPath : QueryExpression
5+
{
6+
public List<string> Segments { get; }
7+
8+
public PropertyPath(Token token, List<string> segments) : base(token)
9+
{
10+
Segments = segments;
11+
}
12+
13+
public string GetFullPath()
14+
{
15+
return string.Join("/", Segments);
16+
}
17+
18+
public string GetFirstSegment()
19+
{
20+
return Segments.FirstOrDefault();
21+
}
22+
23+
public List<string> GetRemainingSegments()
24+
{
25+
return Segments.Skip(1).ToList();
26+
}
27+
}

0 commit comments

Comments
 (0)