QueryToken Class

Represents a token in the query syntax tree.

public sealed class QueryToken : QueryNodeOrToken
Inheritance
QueryNodeOrToken QueryToken

Properties

NameDescription
KindGets the kind of this token.
QueryTextGets the full query text.
SpanGets the text span covered by this token.
TextGets the text of this token extracted from the query text.
ValueGets the parsed value of this token, or null if the token has no value.

Gets the kind of this token.

public override QuerySyntaxKind Kind { get; }

Property value

QuerySyntaxKind

QueryText

QueryToken.cs

Gets the full query text.

public string QueryText { get; }

Property value

string

Gets the text span covered by this token.

public override TextSpan Span { get; }

Property value

TextSpan

Gets the text of this token extracted from the query text.

public string Text { get; }

Property value

string

Gets the parsed value of this token, or null if the token has no value.

public string? Value { get; }

Property value

string?

Methods

NameDescription
AsText()Converts this token to a text token.
GetChildren()Gets the child elements of this token (always empty for tokens).
ToString()

Converts this token to a text token.

public QueryToken AsText()

Returns

QueryToken A text token representing the same text.

GetChildren()

QueryToken.cs

Gets the child elements of this token (always empty for tokens).

public override QueryNodeOrToken[] GetChildren()

Returns

QueryNodeOrToken[] An empty array.

ToString()

QueryToken.cs
public override string ToString()

Returns

string

No documentation is available.