-
Notifications
You must be signed in to change notification settings - Fork 187
/
IASTBinaryExpression.java
282 lines (236 loc) · 5.66 KB
/
IASTBinaryExpression.java
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
/*******************************************************************************
* Copyright (c) 2004, 2012 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Doug Schaefer (IBM) - Initial API and implementation
* Markus Schorn (Wind River Systems)
*******************************************************************************/
package org.eclipse.cdt.core.dom.ast;
/**
* This interface represents a binary expression.
*
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTBinaryExpression extends IASTExpression {
/**
* Node property that describes the relationship between an
* <code>IASTBinaryExpression</code> and an <code>IASTExpression</code>
* representing the lhs.
*/
public static final ASTNodeProperty OPERAND_ONE = new ASTNodeProperty(
"IASTBinaryExpression.OPERAND_ONE - IASTExpression for LHS"); //$NON-NLS-1$
/**
* Node property that describes the relationship between an
* <code>IASTBinaryExpression</code> and an <code>IASTExpression</code>
* representing the rhs.
*/
public static final ASTNodeProperty OPERAND_TWO = new ASTNodeProperty(
"IASTBinaryExpression.OPERAND_TWO - IASTExpression for RHS"); //$NON-NLS-1$
/**
* Sets the operator.
*
* @param op value to set.
*/
public void setOperator(int op);
/**
* Returns the operator.
*
* @return int value as operator
*/
public int getOperator();
/**
* multiply *
*/
public static final int op_multiply = 1;
/**
* divide /
*/
public static final int op_divide = 2;
/**
* modulo %
*/
public static final int op_modulo = 3;
/**
* plus +
*/
public static final int op_plus = 4;
/**
* minus -
*/
public static final int op_minus = 5;
/**
* shift left <<
*/
public static final int op_shiftLeft = 6;
/**
* shift right >>
*/
public static final int op_shiftRight = 7;
/**
* less than <
*/
public static final int op_lessThan = 8;
/**
* greater than >
*/
public static final int op_greaterThan = 9;
/**
* less than or equals <=
*/
public static final int op_lessEqual = 10;
/**
* greater than or equals >=
*/
public static final int op_greaterEqual = 11;
/**
* binary and &
*/
public static final int op_binaryAnd = 12;
/**
* binary Xor ^
*/
public static final int op_binaryXor = 13;
/**
* binary Or |
*/
public static final int op_binaryOr = 14;
/**
* logical and &&
*/
public static final int op_logicalAnd = 15;
/**
* logical or ||
*/
public static final int op_logicalOr = 16;
/**
* assignment =
*/
public static final int op_assign = 17;
/**
* multiply assignment *=
*/
public static final int op_multiplyAssign = 18;
/**
* divide assignemnt /=
*/
public static final int op_divideAssign = 19;
/**
* modulo assignment %=
*/
public static final int op_moduloAssign = 20;
/**
* plus assignment +=
*/
public static final int op_plusAssign = 21;
/**
* minus assignment -=
*/
public static final int op_minusAssign = 22;
/**
* shift left assignment <<=
*/
public static final int op_shiftLeftAssign = 23;
/**
* shift right assign >>=
*/
public static final int op_shiftRightAssign = 24;
/**
* binary and assign &=
*/
public static final int op_binaryAndAssign = 25;
/**
* binary Xor assign ^=
*/
public static final int op_binaryXorAssign = 26;
/**
* binary Or assign |=
*/
public static final int op_binaryOrAssign = 27;
/**
* equals ==
*/
public static final int op_equals = 28;
/**
* not equals !=
*/
public static final int op_notequals = 29;
/**
* For c==, only.
* <code>op_pmdot</code> pointer-to-member field dereference.
*/
public static final int op_pmdot = 30;
/**
* For c++, only.
* <code>op_pmarrow</code> pointer-to-member pointer dereference.
*/
public static final int op_pmarrow = 31;
/**
* For g++, only.
* <code>op_max</code> represents >?
*/
public static final int op_max = 32;
/**
* For g++, only.
* <code>op_min</code> represents <?
*/
public static final int op_min = 33;
/**
* For gcc compilers, only.
* <code>op_ellipses</code> represents ... as used for case ranges.
*/
public static final int op_ellipses = 34;
/**
* For c++, only.
* <code>op_threewaycompare</code> represents <code><=></code> three-way comparison operator.
* @since 8.1
*/
public static final int op_threewaycomparison = 35;
/**
* Get the first operand.
*
* @return <code>IASTExpression</code> representing operand 1.
*/
public IASTExpression getOperand1();
/**
* Set the first operand.
*
* @param expression
* <code>IASTExpression</code> value.
*/
public void setOperand1(IASTExpression expression);
/**
* Get the second operand.
*
* @return <code>IASTExpression</code> representing operand 2.
*/
public IASTExpression getOperand2();
/**
* Returns the second operand of the expression. For c++ assignment expressions this can be
* a braced list initializer.
* @since 5.2
*/
public IASTInitializerClause getInitOperand2();
/**
* @param expression
* <code>IASTExpression</code> value
*/
public void setOperand2(IASTExpression expression);
/**
* @since 5.1
*/
@Override
public IASTBinaryExpression copy();
/**
* @since 5.3
*/
@Override
public IASTBinaryExpression copy(CopyStyle style);
}