internal PathSegment(StringLiteral literal, int start, int end) { this.Span = new Span(literal, start, end); this.Parameter = TemplateParameter.TryParse(this.Span, out var parameter) ? parameter : (TemplateParameter?)null; }
public Component(LiteralExpressionSyntax literal, int start, int end) { this.Text = new TextAndLocation(literal, start, end); this.Parameter = TemplateParameter.TryParse(this.Text, out var parameter) ? parameter : (TemplateParameter?)null; }