CssAnPlusBSyntax Class

Represents an An+B expression, such as 2n+1 or odd, which selects every A-th element starting with the B-th.

public sealed class CssAnPlusBSyntax : CssSyntaxNode

Remarks

The tokens are kept as the tokenizer split them, which is not where a reader would: 2n-1 is a single token.

Inheritance
CssSyntaxNode CssAnPlusBSyntax

Properties

NameDescription
AGets the step, A. It is zero for a plain index such as 3.
BGets the offset, B.
IsValidDetermines whether the tokens are a valid An+B expression; when they are not, CssAnPlusBSyntax.A and CssAnPlusBSyntax.B are zero.
Tokens

Gets the step, A. It is zero for a plain index such as 3.

public int A { get; }

Property value

int

Gets the offset, B.

public int B { get; }

Property value

int

Determines whether the tokens are a valid An+B expression; when they are not, CssAnPlusBSyntax.A and CssAnPlusBSyntax.B are zero.

public bool IsValid { get; }

Property value

bool

public SyntaxTokenList Tokens { get; }

Property value

SyntaxTokenList

No documentation is available.

Methods

NameDescription
Accept(CssSyntaxVisitor)
Accept<TResult>(CssSyntaxVisitor<TResult>)
Update(SyntaxTokenList)Returns this node with the given parts, or itself when nothing changed.
WithTokens(SyntaxTokenList)Returns this node with tokens in place of its CssAnPlusBSyntax.Tokens.

Accept overloads

Accept(CssSyntaxVisitor)

Syntax.g.cs
public override void Accept(CssSyntaxVisitor visitor)
Parameters
visitor CssSyntaxVisitor

No documentation is available.

Accept<TResult>(CssSyntaxVisitor<TResult>)

Syntax.g.cs
public override TResult? Accept<TResult>(CssSyntaxVisitor<TResult> visitor)
Type parameters
TResult
Parameters
visitor CssSyntaxVisitor<TResult>
Returns

TResult?

No documentation is available.

Update(SyntaxTokenList)

Syntax.g.cs

Returns this node with the given parts, or itself when nothing changed.

public CssAnPlusBSyntax Update(SyntaxTokenList tokens)

Parameters

tokens SyntaxTokenList

Returns

CssAnPlusBSyntax

WithTokens(SyntaxTokenList)

Syntax.g.cs

Returns this node with tokens in place of its CssAnPlusBSyntax.Tokens.

public CssAnPlusBSyntax WithTokens(SyntaxTokenList tokens)

Parameters

tokens SyntaxTokenList

Returns

CssAnPlusBSyntax