OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of dart2js.semantics_visitor; | 5 part of dart2js.semantics_visitor; |
6 | 6 |
7 enum SendStructureKind { | 7 enum SendStructureKind { |
8 GET, | 8 GET, |
9 SET, | 9 SET, |
10 INVOKE, | 10 INVOKE, |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 SendStructure sendStructure = elements.getSendStructure(node); | 205 SendStructure sendStructure = elements.getSendStructure(node); |
206 if (sendStructure != null) { | 206 if (sendStructure != null) { |
207 return sendStructure; | 207 return sendStructure; |
208 } | 208 } |
209 | 209 |
210 if (elements.isAssert(node)) { | 210 if (elements.isAssert(node)) { |
211 return internalError(node, "Unexpected assert."); | 211 return internalError(node, "Unexpected assert."); |
212 } | 212 } |
213 | 213 |
214 AssignmentOperator assignmentOperator; | 214 AssignmentOperator assignmentOperator; |
215 UnaryOperator unaryOperator; | |
216 BinaryOperator binaryOperator; | 215 BinaryOperator binaryOperator; |
217 IncDecOperator incDecOperator; | 216 IncDecOperator incDecOperator; |
218 | 217 |
219 if (node.isOperator) { | 218 if (node.isOperator) { |
220 String operatorText = node.selector.asOperator().source; | 219 String operatorText = node.selector.asOperator().source; |
221 if (operatorText == 'is') { | 220 if (operatorText == 'is') { |
222 return internalError(node, "Unexpected is test."); | 221 return internalError(node, "Unexpected is test."); |
223 } else if (operatorText == 'as') { | 222 } else if (operatorText == 'as') { |
224 return internalError(node, "Unexpected as cast."); | 223 return internalError(node, "Unexpected as cast."); |
225 } else if (operatorText == '&&') { | 224 } else if (operatorText == '&&') { |
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
983 return internalError(node, "Unexpected variable $element."); | 982 return internalError(node, "Unexpected variable $element."); |
984 } | 983 } |
985 if (element.isConst) { | 984 if (element.isConst) { |
986 ConstantExpression constant = elements.getConstant(element.initializer); | 985 ConstantExpression constant = elements.getConstant(element.initializer); |
987 return new ConstantVariableStructure(kind, node, element, constant); | 986 return new ConstantVariableStructure(kind, node, element, constant); |
988 } else { | 987 } else { |
989 return new NonConstantVariableStructure(kind, node, element); | 988 return new NonConstantVariableStructure(kind, node, element); |
990 } | 989 } |
991 } | 990 } |
992 } | 991 } |
OLD | NEW |