Add spans to parameterTokens
This commit is contained in:
parent
27a7465961
commit
a64df2ff6b
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using Upsilon.Text;
|
||||
|
||||
namespace Upsilon.Parser
|
||||
{
|
||||
|
@ -6,12 +7,15 @@ namespace Upsilon.Parser
|
|||
{
|
||||
public ParameterToken(IdentifierToken typeName, IdentifierToken identifierName)
|
||||
{
|
||||
IdentifierName = identifierName;
|
||||
TypeName = typeName;
|
||||
IdentifierName = identifierName;
|
||||
var start = identifierName.Span.Start;
|
||||
if (typeName != null) start = typeName.Span.Start;
|
||||
Span = new TextSpan(start, identifierName.Span.End - start);
|
||||
}
|
||||
|
||||
public IdentifierToken IdentifierName { get; }
|
||||
public IdentifierToken TypeName { get; }
|
||||
public IdentifierToken IdentifierName { get; }
|
||||
|
||||
public override SyntaxKind Kind => SyntaxKind.Parameter;
|
||||
public override IEnumerable<SyntaxNode> ChildNodes()
|
||||
|
|
Loading…
Reference in New Issue