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 // 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 4757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4768 */ | 4768 */ |
| 4769 bool get _directivesAreBeforeDeclarations { | 4769 bool get _directivesAreBeforeDeclarations { |
| 4770 if (_directives.isEmpty || _declarations.isEmpty) { | 4770 if (_directives.isEmpty || _declarations.isEmpty) { |
| 4771 return true; | 4771 return true; |
| 4772 } | 4772 } |
| 4773 Directive lastDirective = _directives[_directives.length - 1]; | 4773 Directive lastDirective = _directives[_directives.length - 1]; |
| 4774 CompilationUnitMember firstDeclaration = _declarations[0]; | 4774 CompilationUnitMember firstDeclaration = _declarations[0]; |
| 4775 return lastDirective.offset < firstDeclaration.offset; | 4775 return lastDirective.offset < firstDeclaration.offset; |
| 4776 } | 4776 } |
| 4777 | 4777 |
| 4778 /** | |
| 4779 * Replaces contents of this [CompilationUnit] with the given [other]. | |
| 4780 */ | |
| 4781 void replaceWith(CompilationUnit other) { | |
|
Brian Wilkerson
2015/06/02 15:50:41
I really don't think we want to add this to the pu
scheglov
2015/06/02 17:13:11
Oops... You're right.
Removing it.
| |
| 4782 beginToken = other.beginToken; | |
| 4783 _scriptTag = other._scriptTag; | |
| 4784 _directives = other._directives; | |
| 4785 _declarations = other._declarations; | |
| 4786 element = other.element; | |
| 4787 lineInfo = other.lineInfo; | |
| 4788 } | |
| 4789 | |
| 4778 @override | 4790 @override |
| 4779 accept(AstVisitor visitor) => visitor.visitCompilationUnit(this); | 4791 accept(AstVisitor visitor) => visitor.visitCompilationUnit(this); |
| 4780 | 4792 |
| 4781 @override | 4793 @override |
| 4782 void visitChildren(AstVisitor visitor) { | 4794 void visitChildren(AstVisitor visitor) { |
| 4783 _safelyVisitChild(_scriptTag, visitor); | 4795 _safelyVisitChild(_scriptTag, visitor); |
| 4784 if (_directivesAreBeforeDeclarations) { | 4796 if (_directivesAreBeforeDeclarations) { |
| 4785 _directives.accept(visitor); | 4797 _directives.accept(visitor); |
| 4786 _declarations.accept(visitor); | 4798 _declarations.accept(visitor); |
| 4787 } else { | 4799 } else { |
| (...skipping 15268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 20056 } | 20068 } |
| 20057 | 20069 |
| 20058 @override | 20070 @override |
| 20059 accept(AstVisitor visitor) => visitor.visitYieldStatement(this); | 20071 accept(AstVisitor visitor) => visitor.visitYieldStatement(this); |
| 20060 | 20072 |
| 20061 @override | 20073 @override |
| 20062 void visitChildren(AstVisitor visitor) { | 20074 void visitChildren(AstVisitor visitor) { |
| 20063 _safelyVisitChild(_expression, visitor); | 20075 _safelyVisitChild(_expression, visitor); |
| 20064 } | 20076 } |
| 20065 } | 20077 } |
| OLD | NEW |