QuerySyntax Class
Represents a query syntax node in the abstract syntax tree.
public abstract class QuerySyntax : QueryNodeOrToken- Inheritance
QueryNodeOrTokenQuerySyntax
Constructors
| Name | Description |
|---|---|
| QuerySyntax() |
QuerySyntax()
protected QuerySyntax()No documentation is available.
Methods
| Name | Description |
|---|---|
| Parse(string) | Parses a query string into a syntax tree. |
| Parse(string, IReadOnlyList<QueryDiagnostic>) | Parses a query string into a syntax tree, and reports the problems found in it. |
| ToString() |
Parse overloads
Parse(string)
QuerySyntax.csParses a query string into a syntax tree.
public static QuerySyntax Parse(string text)Parameters
textstring- The query string to parse.
Returns
QuerySyntax The root node of the parsed syntax tree.
Exceptions
QueryTooComplexException- The query nests expressions too deeply to be parsed.
Parse(string, IReadOnlyList<QueryDiagnostic>)
QuerySyntax.csParses a query string into a syntax tree, and reports the problems found in it.
public static QuerySyntax Parse(string text, out IReadOnlyList<QueryDiagnostic> diagnostics)Parameters
textstring- The query string to parse.
diagnosticsIReadOnlyList<QueryDiagnostic>- When this method returns, the problems found in the query, such as unbalanced parentheses or operators without operand, in the order they appear in it. The list is empty when the query has no problem.
Returns
QuerySyntax The root node of the parsed syntax tree. It is the same tree as QuerySyntax.Parse returns.
Exceptions
QueryTooComplexException- The query nests expressions too deeply to be parsed.
Remarks
Keys are not checked: only a builder knows which keys have a handler. Use Query<T>.Diagnostics or ExpressionQuery<T>.Diagnostics to get the unknown keys too.