/
SyntacticTreeVisitor.cs
292 lines (264 loc) · 10.4 KB
/
SyntacticTreeVisitor.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
//---------------------------------------------------------------------
// <copyright file="SyntacticTreeVisitor.cs" company="Microsoft">
// Copyright (C) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.
// </copyright>
//---------------------------------------------------------------------
#if ODATA_CLIENT
namespace Microsoft.OData.Client.ALinq.UriParser
#else
namespace Microsoft.OData.UriParser
#endif
{
using System;
using Microsoft.OData.UriParser.Aggregation;
/// <summary>
/// Visitor interface for walking the Syntactic Tree.
/// </summary>
/// <typeparam name="T">Generic type produced by the visitor.</typeparam>
internal abstract class SyntacticTreeVisitor<T> : ISyntacticTreeVisitor<T>
{
/// <summary>
/// Visit an AllToken
/// </summary>
/// <param name="tokenIn">The All token to visit</param>
/// <returns>An AllNode bound to this token</returns>
public virtual T Visit(AllToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits an AnyToken
/// </summary>
/// <param name="tokenIn">The Any token to visit</param>
/// <returns>An AnyNode that's bound to this token</returns>
public virtual T Visit(AnyToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits a BinaryOperatorToken
/// </summary>
/// <param name="tokenIn">The Binary operator token to visit.</param>
/// <returns>A BinaryOperatorNode that's bound to this token</returns>
public virtual T Visit(BinaryOperatorToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits a CountSegmentToken
/// </summary>
/// <param name="tokenIn">The Count segment token to visit.</param>
/// <returns>A CountNode that's bound to this token</returns>
public virtual T Visit(CountSegmentToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits an InToken
/// </summary>
/// <param name="tokenIn">The In token to visit.</param>
/// <returns>An InNode that's bound to this token</returns>
public virtual T Visit(InToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits a DottedIdentifierToken
/// </summary>
/// <param name="tokenIn">The DottedIdentifierToken to visit</param>
/// <returns>Either a SingleResourceCastNode, or CollectionResourceCastNode bound to this DottedIdentifierToken</returns>
public virtual T Visit(DottedIdentifierToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits an ExpandToken
/// </summary>
/// <param name="tokenIn">The ExpandToken to visit</param>
/// <returns>A QueryNode bound to this ExpandToken</returns>
public virtual T Visit(ExpandToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits an ExpandTermToken
/// </summary>
/// <param name="tokenIn">The ExpandTermToken to visit</param>
/// <returns>A QueryNode bound to this ExpandTermToken</returns>
public virtual T Visit(ExpandTermToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits a FunctionCallToken
/// </summary>
/// <param name="tokenIn">The FunctionCallToken to visit</param>
/// <returns>A SingleValueFunctionCallNode bound to this FunctionCallToken</returns>
public virtual T Visit(FunctionCallToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits a LiteralToken
/// </summary>
/// <param name="tokenIn">The LiteralToken to visit</param>
/// <returns>A ConstantNode bound to this LambdaToken</returns>
public virtual T Visit(LiteralToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits an AggregateToken
/// </summary>
/// <param name="tokenIn">The AggregateToken to visit</param>
/// <returns>A T bound to this AggregateToken</returns>
public virtual T Visit(AggregateToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits a GroupByToken
/// </summary>
/// <param name="tokenIn">The GroupByToken to visit</param>
/// <returns>A T bound to this GroupByToken</returns>
public virtual T Visit(GroupByToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits an AggregateExpressionToken
/// </summary>
/// <param name="tokenIn">The AggregateExpressionToken to visit</param>
/// <returns>A T bound to this AggregateExpressionToken</returns>
public virtual T Visit(AggregateExpressionToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits an EntitySetAggregateToken
/// </summary>
/// <param name="tokenIn">The EntitySetAggregateToken to visit</param>
/// <returns>A T bound to this EntitySetAggregateToken</returns>
public virtual T Visit(EntitySetAggregateToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits a LambdaToken
/// </summary>
/// <param name="tokenIn">The LambdaToken to visit</param>
/// <returns>A LambdaNode bound to this LambdaToken</returns>
public virtual T Visit(LambdaToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits a InnerPathToken
/// </summary>
/// <param name="tokenIn">The InnerPathToken to bind</param>
/// <returns>A SingleValueNode or SingleEntityNode bound to this InnerPathToken</returns>
public virtual T Visit(InnerPathToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits an OrderByToken
/// </summary>
/// <param name="tokenIn">The OrderByToken to bind</param>
/// <returns>An OrderByClause bound to this OrderByToken</returns>
public virtual T Visit(OrderByToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits an EndPathToken
/// </summary>
/// <param name="tokenIn">The EndPathToken to bind</param>
/// <returns>A PropertyAccessClause bound to this EndPathToken</returns>
public virtual T Visit(EndPathToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits a CustomQueryOptionToken
/// </summary>
/// <param name="tokenIn">The CustomQueryOptionToken to bind</param>
/// <returns>A CustomQueryOptionNode bound to this CustomQueryOptionToken</returns>
public virtual T Visit(CustomQueryOptionToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits a RangeVariableToken
/// </summary>
/// <param name="tokenIn">The RangeVariableToken to bind</param>
/// <returns>A Resource or NonResource RangeVariableReferenceNode bound to this RangeVariableToken</returns>
public virtual T Visit(RangeVariableToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits a SelectToken
/// </summary>
/// <param name="tokenIn">The SelectToken to bind</param>
/// <returns>A QueryNode bound to this SelectToken</returns>
public virtual T Visit(SelectToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits an SelectTermToken
/// </summary>
/// <param name="tokenIn">The SelectTermToken to visit</param>
/// <returns>A QueryNode bound to this SelectTermToken</returns>
public virtual T Visit(SelectTermToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits a StarToken
/// </summary>
/// <param name="tokenIn">The StarToken to bind</param>
/// <returns>A QueryNode bound to this StarToken</returns>
public virtual T Visit(StarToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits a UnaryOperatorToken
/// </summary>
/// <param name="tokenIn">The UnaryOperatorToken to bind</param>
/// <returns>A UnaryOperatorNode bound to this UnaryOperatorToken</returns>
public virtual T Visit(UnaryOperatorToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits a FunctionParameterToken
/// </summary>
/// <param name="tokenIn">The FunctionParameterToken to bind</param>
/// <returns>A user defined value</returns>
public virtual T Visit(FunctionParameterToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits a ComputeToken
/// </summary>
/// <param name="tokenIn">The ComputeToken to bind</param>
/// <returns>A user defined value</returns>
public virtual T Visit(ComputeToken tokenIn)
{
throw new NotImplementedException();
}
/// <summary>
/// Visits a ComputeExpressionToken
/// </summary>
/// <param name="tokenIn">The ComputeExpressionToken to bind</param>
/// <returns>A user defined value</returns>
public virtual T Visit(ComputeExpressionToken tokenIn)
{
throw new NotImplementedException();
}
}
}