public static AttributeSyntax Create(NameToken name, EqualsToken eq, AttributeLiteralToken literal) { if (eq.Equals(EqualsToken.Default)) { return(new AttributeSyntaxWithDefaultEqToken(name, literal)); } return(new AttributeSyntaxWithCustomEqToken(name, eq, literal)); }
AttributeSyntax(NameToken name, AttributeLiteralToken literal) : base(name) { Literal = literal; }
public AttributeSyntaxWithCustomEqToken(NameToken name, EqualsToken eq, AttributeLiteralToken literal) : base( name, literal) { Eq = eq; }
public AttributeSyntaxWithDefaultEqToken(NameToken name, AttributeLiteralToken literal) : base(name, literal) { }
protected virtual SyntaxToken VisitAttributeLiteral(AttributeLiteralToken token) { return(token); }