| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.ast; | 8 library engine.ast; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 16307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16318 } | 16318 } |
| 16319 parent = access.parent; | 16319 parent = access.parent; |
| 16320 target = access; | 16320 target = access; |
| 16321 } | 16321 } |
| 16322 // skip label | 16322 // skip label |
| 16323 if (parent is Label) { | 16323 if (parent is Label) { |
| 16324 return false; | 16324 return false; |
| 16325 } | 16325 } |
| 16326 // analyze usage | 16326 // analyze usage |
| 16327 if (parent is AssignmentExpression) { | 16327 if (parent is AssignmentExpression) { |
| 16328 AssignmentExpression expr = parent as AssignmentExpression; | 16328 if (identical(parent.leftHandSide, target) && |
| 16329 if (identical(expr.leftHandSide, target) && | 16329 parent.operator.type == TokenType.EQ) { |
| 16330 expr.operator.type == TokenType.EQ) { | |
| 16331 return false; | 16330 return false; |
| 16332 } | 16331 } |
| 16333 } | 16332 } |
| 16334 if (parent is ForEachStatement) { | 16333 if (parent is ForEachStatement) { |
| 16335 ForEachStatement stmt = parent as ForEachStatement; | 16334 if (identical(parent.identifier, target)) { |
| 16336 if (identical(stmt.identifier, target)) { | |
| 16337 return false; | 16335 return false; |
| 16338 } | 16336 } |
| 16339 } | 16337 } |
| 16340 return true; | 16338 return true; |
| 16341 } | 16339 } |
| 16342 | 16340 |
| 16343 /** | 16341 /** |
| 16344 * Return `true` if this expression is computing a left-hand value. | 16342 * Return `true` if this expression is computing a left-hand value. |
| 16345 * | 16343 * |
| 16346 * Note that [inGetterContext] and [inSetterContext] are not opposites, nor | 16344 * Note that [inGetterContext] and [inSetterContext] are not opposites, nor |
| (...skipping 16 matching lines...) Expand all Loading... |
| 16363 } else if (parent is PropertyAccess) { | 16361 } else if (parent is PropertyAccess) { |
| 16364 PropertyAccess access = parent as PropertyAccess; | 16362 PropertyAccess access = parent as PropertyAccess; |
| 16365 if (identical(access.target, this)) { | 16363 if (identical(access.target, this)) { |
| 16366 return false; | 16364 return false; |
| 16367 } | 16365 } |
| 16368 parent = access.parent; | 16366 parent = access.parent; |
| 16369 target = access; | 16367 target = access; |
| 16370 } | 16368 } |
| 16371 // analyze usage | 16369 // analyze usage |
| 16372 if (parent is PrefixExpression) { | 16370 if (parent is PrefixExpression) { |
| 16373 return (parent as PrefixExpression).operator.type.isIncrementOperator; | 16371 return parent.operator.type.isIncrementOperator; |
| 16374 } else if (parent is PostfixExpression) { | 16372 } else if (parent is PostfixExpression) { |
| 16375 return true; | 16373 return true; |
| 16376 } else if (parent is AssignmentExpression) { | 16374 } else if (parent is AssignmentExpression) { |
| 16377 return identical((parent as AssignmentExpression).leftHandSide, target); | 16375 return identical(parent.leftHandSide, target); |
| 16378 } else if (parent is ForEachStatement) { | 16376 } else if (parent is ForEachStatement) { |
| 16379 return identical((parent as ForEachStatement).identifier, target); | 16377 return identical(parent.identifier, target); |
| 16380 } | 16378 } |
| 16381 return false; | 16379 return false; |
| 16382 } | 16380 } |
| 16383 | 16381 |
| 16384 @override | 16382 @override |
| 16385 void visitChildren(AstVisitor visitor) { | 16383 void visitChildren(AstVisitor visitor) { |
| 16386 // There are no children to visit. | 16384 // There are no children to visit. |
| 16387 } | 16385 } |
| 16388 | 16386 |
| 16389 /** | 16387 /** |
| (...skipping 3701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20091 } | 20089 } |
| 20092 | 20090 |
| 20093 @override | 20091 @override |
| 20094 accept(AstVisitor visitor) => visitor.visitYieldStatement(this); | 20092 accept(AstVisitor visitor) => visitor.visitYieldStatement(this); |
| 20095 | 20093 |
| 20096 @override | 20094 @override |
| 20097 void visitChildren(AstVisitor visitor) { | 20095 void visitChildren(AstVisitor visitor) { |
| 20098 _safelyVisitChild(_expression, visitor); | 20096 _safelyVisitChild(_expression, visitor); |
| 20099 } | 20097 } |
| 20100 } | 20098 } |
| OLD | NEW |