mirror of https://github.com/ogoun/Zero.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
866 B
33 lines
866 B
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace DOM.DSL.Tokens
|
|
{
|
|
public class TFunctionToken :
|
|
TToken
|
|
{
|
|
public string FunctionName;
|
|
public IEnumerable<TToken> FunctionArgs;
|
|
public TToken NextToken;
|
|
|
|
public override TToken Clone()
|
|
{
|
|
return new TFunctionToken
|
|
{
|
|
FunctionArgs = FunctionArgs.Select(a => a.Clone()).ToArray(),
|
|
FunctionName = this.FunctionName,
|
|
NextToken = this.NextToken?.Clone()!
|
|
};
|
|
}
|
|
|
|
public override TToken CloneLocal()
|
|
{
|
|
return new TFunctionToken
|
|
{
|
|
FunctionArgs = FunctionArgs.Select(a => a.Clone()).ToArray(),
|
|
FunctionName = this.FunctionName,
|
|
NextToken = null!
|
|
};
|
|
}
|
|
}
|
|
} |