Chromium Code Reviews| 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 library analyzer.src.dart.ast.ast; | 5 library analyzer.src.dart.ast.ast; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/syntactic_entity.dart'; | 10 import 'package:analyzer/dart/ast/syntactic_entity.dart'; |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 511 /** | 511 /** |
| 512 * Initialize a newly created as expression. | 512 * Initialize a newly created as expression. |
| 513 */ | 513 */ |
| 514 AsExpressionImpl( | 514 AsExpressionImpl( |
| 515 ExpressionImpl expression, this.asOperator, TypeAnnotationImpl type) { | 515 ExpressionImpl expression, this.asOperator, TypeAnnotationImpl type) { |
| 516 _expression = _becomeParentOf(expression); | 516 _expression = _becomeParentOf(expression); |
| 517 _type = _becomeParentOf(type); | 517 _type = _becomeParentOf(type); |
| 518 } | 518 } |
| 519 | 519 |
| 520 @override | 520 @override |
| 521 get length { | |
|
Brian Wilkerson
2017/04/11 19:07:51
I think this is the wrong approach to fixing the p
Alan Knight
2017/04/11 20:32:06
Per Jennifer, it doesn't seem like mapping these i
| |
| 522 if (endToken.isSynthetic) { | |
| 523 return _expression.length; | |
| 524 } else { | |
| 525 return super.length; | |
| 526 } | |
| 527 } | |
| 528 | |
| 529 @override | |
| 521 Token get beginToken => _expression.beginToken; | 530 Token get beginToken => _expression.beginToken; |
| 522 | 531 |
| 523 @override | 532 @override |
| 524 Iterable<SyntacticEntity> get childEntities => | 533 Iterable<SyntacticEntity> get childEntities => |
| 525 new ChildEntities()..add(_expression)..add(asOperator)..add(_type); | 534 new ChildEntities()..add(_expression)..add(asOperator)..add(_type); |
| 526 | 535 |
| 527 @override | 536 @override |
| 528 Token get endToken => _type.endToken; | 537 Token get endToken => _type.endToken; |
| 529 | 538 |
| 530 @override | 539 @override |
| (...skipping 10954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 11485 | 11494 |
| 11486 @override | 11495 @override |
| 11487 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 11496 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 11488 visitor.visitYieldStatement(this); | 11497 visitor.visitYieldStatement(this); |
| 11489 | 11498 |
| 11490 @override | 11499 @override |
| 11491 void visitChildren(AstVisitor visitor) { | 11500 void visitChildren(AstVisitor visitor) { |
| 11492 _expression?.accept(visitor); | 11501 _expression?.accept(visitor); |
| 11493 } | 11502 } |
| 11494 } | 11503 } |
| OLD | NEW |