-
Hi. I have code |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
What do you want to achieve? UriQueryExpressionParser will return a tree of tokens (Abstract Syntax Tree). You would need to visit the nodes in order to process it. The result of your ParseFilter would look something like this: flowchart TD
bo[BinaryOperatorToken Equals]-->ep;
bo-->lt[LiteralToken London];
ep[EndPathToken name]-->ip[InnerPathToken city];
You could implement the ISyntacticTreeVisitor interface to visit the different nodes and change it into a string. In the library I've seen that they use Binders to change QueryTokens to QueryNodes and there is a NodeToStringBuilder that builds the query string from the tree. |
Beta Was this translation helpful? Give feedback.
-
Many thx for your answer |
Beta Was this translation helpful? Give feedback.
What do you want to achieve? UriQueryExpressionParser will return a tree of tokens (Abstract Syntax Tree). You would need to visit the nodes in order to process it. The result of your ParseFilter would look something like this:
You could implement the ISyntacticTreeVisitor interface to visit the different nodes and change it into a string. In the library I've seen that they use Binders to change QueryTokens to QueryNodes and there is a NodeToStringBuilder that builds the query string from the tree.