| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 * Set the metadata associated with this node to the given metadata. | 143 * Set the metadata associated with this node to the given metadata. |
| 144 * | 144 * |
| 145 * @param metadata the metadata to be associated with this node | 145 * @param metadata the metadata to be associated with this node |
| 146 */ | 146 */ |
| 147 void set metadata(List<Annotation> metadata) { | 147 void set metadata(List<Annotation> metadata) { |
| 148 this._metadata.clear(); | 148 this._metadata.clear(); |
| 149 this._metadata.addAll(metadata); | 149 this._metadata.addAll(metadata); |
| 150 } | 150 } |
| 151 | 151 |
| 152 void visitChildren(AstVisitor visitor) { | 152 void visitChildren(AstVisitor visitor) { |
| 153 if (commentIsBeforeAnnotations()) { | 153 if (_commentIsBeforeAnnotations()) { |
| 154 safelyVisitChild(_comment, visitor); | 154 safelyVisitChild(_comment, visitor); |
| 155 _metadata.accept(visitor); | 155 _metadata.accept(visitor); |
| 156 } else { | 156 } else { |
| 157 for (AstNode child in sortedCommentAndAnnotations) { | 157 for (AstNode child in sortedCommentAndAnnotations) { |
| 158 child.accept(visitor); | 158 child.accept(visitor); |
| 159 } | 159 } |
| 160 } | 160 } |
| 161 } | 161 } |
| 162 | 162 |
| 163 /** | 163 /** |
| 164 * Return the first token following the comment and metadata. | 164 * Return the first token following the comment and metadata. |
| 165 * | 165 * |
| 166 * @return the first token following the comment and metadata | 166 * @return the first token following the comment and metadata |
| 167 */ | 167 */ |
| 168 Token get firstTokenAfterCommentAndMetadata; | 168 Token get firstTokenAfterCommentAndMetadata; |
| 169 | 169 |
| 170 /** | 170 /** |
| 171 * Return `true` if the comment is lexically before any annotations. | 171 * Return `true` if the comment is lexically before any annotations. |
| 172 * | 172 * |
| 173 * @return `true` if the comment is lexically before any annotations | 173 * @return `true` if the comment is lexically before any annotations |
| 174 */ | 174 */ |
| 175 bool commentIsBeforeAnnotations() { | 175 bool _commentIsBeforeAnnotations() { |
| 176 if (_comment == null || _metadata.isEmpty) { | 176 if (_comment == null || _metadata.isEmpty) { |
| 177 return true; | 177 return true; |
| 178 } | 178 } |
| 179 Annotation firstAnnotation = _metadata[0]; | 179 Annotation firstAnnotation = _metadata[0]; |
| 180 return _comment.offset < firstAnnotation.offset; | 180 return _comment.offset < firstAnnotation.offset; |
| 181 } | 181 } |
| 182 | 182 |
| 183 /** | 183 /** |
| 184 * Return an array containing the comment and annotations associated with this
node, sorted in | 184 * Return an array containing the comment and annotations associated with this
node, sorted in |
| 185 * lexical order. | 185 * lexical order. |
| (...skipping 2676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2862 * Set the script tag at the beginning of the compilation unit to the given sc
ript tag. | 2862 * Set the script tag at the beginning of the compilation unit to the given sc
ript tag. |
| 2863 * | 2863 * |
| 2864 * @param scriptTag the script tag at the beginning of the compilation unit | 2864 * @param scriptTag the script tag at the beginning of the compilation unit |
| 2865 */ | 2865 */ |
| 2866 void set scriptTag(ScriptTag scriptTag) { | 2866 void set scriptTag(ScriptTag scriptTag) { |
| 2867 this._scriptTag = becomeParentOf(scriptTag); | 2867 this._scriptTag = becomeParentOf(scriptTag); |
| 2868 } | 2868 } |
| 2869 | 2869 |
| 2870 void visitChildren(AstVisitor visitor) { | 2870 void visitChildren(AstVisitor visitor) { |
| 2871 safelyVisitChild(_scriptTag, visitor); | 2871 safelyVisitChild(_scriptTag, visitor); |
| 2872 if (directivesAreBeforeDeclarations()) { | 2872 if (_directivesAreBeforeDeclarations()) { |
| 2873 _directives.accept(visitor); | 2873 _directives.accept(visitor); |
| 2874 _declarations.accept(visitor); | 2874 _declarations.accept(visitor); |
| 2875 } else { | 2875 } else { |
| 2876 for (AstNode child in sortedDirectivesAndDeclarations) { | 2876 for (AstNode child in sortedDirectivesAndDeclarations) { |
| 2877 child.accept(visitor); | 2877 child.accept(visitor); |
| 2878 } | 2878 } |
| 2879 } | 2879 } |
| 2880 } | 2880 } |
| 2881 | 2881 |
| 2882 /** | 2882 /** |
| 2883 * Return `true` if all of the directives are lexically before any declaration
s. | 2883 * Return `true` if all of the directives are lexically before any declaration
s. |
| 2884 * | 2884 * |
| 2885 * @return `true` if all of the directives are lexically before any declaratio
ns | 2885 * @return `true` if all of the directives are lexically before any declaratio
ns |
| 2886 */ | 2886 */ |
| 2887 bool directivesAreBeforeDeclarations() { | 2887 bool _directivesAreBeforeDeclarations() { |
| 2888 if (_directives.isEmpty || _declarations.isEmpty) { | 2888 if (_directives.isEmpty || _declarations.isEmpty) { |
| 2889 return true; | 2889 return true; |
| 2890 } | 2890 } |
| 2891 Directive lastDirective = _directives[_directives.length - 1]; | 2891 Directive lastDirective = _directives[_directives.length - 1]; |
| 2892 CompilationUnitMember firstDeclaration = _declarations[0]; | 2892 CompilationUnitMember firstDeclaration = _declarations[0]; |
| 2893 return lastDirective.offset < firstDeclaration.offset; | 2893 return lastDirective.offset < firstDeclaration.offset; |
| 2894 } | 2894 } |
| 2895 | 2895 |
| 2896 /** | 2896 /** |
| 2897 * Return an array containing all of the directives and declarations in this c
ompilation unit, | 2897 * Return an array containing all of the directives and declarations in this c
ompilation unit, |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3278 super.visitChildren(visitor); | 3278 super.visitChildren(visitor); |
| 3279 safelyVisitChild(_returnType, visitor); | 3279 safelyVisitChild(_returnType, visitor); |
| 3280 safelyVisitChild(_name, visitor); | 3280 safelyVisitChild(_name, visitor); |
| 3281 safelyVisitChild(_parameters, visitor); | 3281 safelyVisitChild(_parameters, visitor); |
| 3282 _initializers.accept(visitor); | 3282 _initializers.accept(visitor); |
| 3283 safelyVisitChild(_redirectedConstructor, visitor); | 3283 safelyVisitChild(_redirectedConstructor, visitor); |
| 3284 safelyVisitChild(_body, visitor); | 3284 safelyVisitChild(_body, visitor); |
| 3285 } | 3285 } |
| 3286 | 3286 |
| 3287 Token get firstTokenAfterCommentAndMetadata { | 3287 Token get firstTokenAfterCommentAndMetadata { |
| 3288 Token leftMost = this.leftMost([externalKeyword, constKeyword, factoryKeywor
d]); | 3288 Token leftMost = _leftMost([externalKeyword, constKeyword, factoryKeyword]); |
| 3289 if (leftMost != null) { | 3289 if (leftMost != null) { |
| 3290 return leftMost; | 3290 return leftMost; |
| 3291 } | 3291 } |
| 3292 return _returnType.beginToken; | 3292 return _returnType.beginToken; |
| 3293 } | 3293 } |
| 3294 | 3294 |
| 3295 /** | 3295 /** |
| 3296 * Return the left-most of the given tokens, or `null` if there are no tokens
given or if | 3296 * Return the left-most of the given tokens, or `null` if there are no tokens
given or if |
| 3297 * all of the given tokens are `null`. | 3297 * all of the given tokens are `null`. |
| 3298 * | 3298 * |
| 3299 * @param tokens the tokens being compared to find the left-most token | 3299 * @param tokens the tokens being compared to find the left-most token |
| 3300 * @return the left-most of the given tokens | 3300 * @return the left-most of the given tokens |
| 3301 */ | 3301 */ |
| 3302 Token leftMost(List<Token> tokens) { | 3302 Token _leftMost(List<Token> tokens) { |
| 3303 Token leftMost = null; | 3303 Token leftMost = null; |
| 3304 int offset = 2147483647; | 3304 int offset = 2147483647; |
| 3305 for (Token token in tokens) { | 3305 for (Token token in tokens) { |
| 3306 if (token != null && token.offset < offset) { | 3306 if (token != null && token.offset < offset) { |
| 3307 leftMost = token; | 3307 leftMost = token; |
| 3308 } | 3308 } |
| 3309 } | 3309 } |
| 3310 return leftMost; | 3310 return leftMost; |
| 3311 } | 3311 } |
| 3312 } | 3312 } |
| (...skipping 5070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8383 */ | 8383 */ |
| 8384 void set identifier(SimpleIdentifier identifier) { | 8384 void set identifier(SimpleIdentifier identifier) { |
| 8385 this._identifier = becomeParentOf(identifier); | 8385 this._identifier = becomeParentOf(identifier); |
| 8386 } | 8386 } |
| 8387 | 8387 |
| 8388 void visitChildren(AstVisitor visitor) { | 8388 void visitChildren(AstVisitor visitor) { |
| 8389 // | 8389 // |
| 8390 // Note that subclasses are responsible for visiting the identifier because
they often need to | 8390 // Note that subclasses are responsible for visiting the identifier because
they often need to |
| 8391 // visit other nodes before visiting the identifier. | 8391 // visit other nodes before visiting the identifier. |
| 8392 // | 8392 // |
| 8393 if (commentIsBeforeAnnotations()) { | 8393 if (_commentIsBeforeAnnotations()) { |
| 8394 safelyVisitChild(_comment, visitor); | 8394 safelyVisitChild(_comment, visitor); |
| 8395 _metadata.accept(visitor); | 8395 _metadata.accept(visitor); |
| 8396 } else { | 8396 } else { |
| 8397 for (AstNode child in sortedCommentAndAnnotations) { | 8397 for (AstNode child in sortedCommentAndAnnotations) { |
| 8398 child.accept(visitor); | 8398 child.accept(visitor); |
| 8399 } | 8399 } |
| 8400 } | 8400 } |
| 8401 } | 8401 } |
| 8402 | 8402 |
| 8403 /** | 8403 /** |
| 8404 * Return `true` if the comment is lexically before any annotations. | 8404 * Return `true` if the comment is lexically before any annotations. |
| 8405 * | 8405 * |
| 8406 * @return `true` if the comment is lexically before any annotations | 8406 * @return `true` if the comment is lexically before any annotations |
| 8407 */ | 8407 */ |
| 8408 bool commentIsBeforeAnnotations() { | 8408 bool _commentIsBeforeAnnotations() { |
| 8409 if (_comment == null || _metadata.isEmpty) { | 8409 if (_comment == null || _metadata.isEmpty) { |
| 8410 return true; | 8410 return true; |
| 8411 } | 8411 } |
| 8412 Annotation firstAnnotation = _metadata[0]; | 8412 Annotation firstAnnotation = _metadata[0]; |
| 8413 return _comment.offset < firstAnnotation.offset; | 8413 return _comment.offset < firstAnnotation.offset; |
| 8414 } | 8414 } |
| 8415 | 8415 |
| 8416 /** | 8416 /** |
| 8417 * Return an array containing the comment and annotations associated with this
parameter, sorted | 8417 * Return an array containing the comment and annotations associated with this
parameter, sorted |
| 8418 * in lexical order. | 8418 * in lexical order. |
| (...skipping 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9780 | 9780 |
| 9781 bool get isSynthetic => token.isSynthetic; | 9781 bool get isSynthetic => token.isSynthetic; |
| 9782 | 9782 |
| 9783 /** | 9783 /** |
| 9784 * Set the element associated with this identifier based on propagated type in
formation to the | 9784 * Set the element associated with this identifier based on propagated type in
formation to the |
| 9785 * given element. | 9785 * given element. |
| 9786 * | 9786 * |
| 9787 * @param element the element to be associated with this identifier | 9787 * @param element the element to be associated with this identifier |
| 9788 */ | 9788 */ |
| 9789 void set propagatedElement(Element element) { | 9789 void set propagatedElement(Element element) { |
| 9790 _propagatedElement = validateElement(element); | 9790 _propagatedElement = _validateElement(element); |
| 9791 } | 9791 } |
| 9792 | 9792 |
| 9793 /** | 9793 /** |
| 9794 * Set the element associated with this identifier based on static type inform
ation to the given | 9794 * Set the element associated with this identifier based on static type inform
ation to the given |
| 9795 * element. | 9795 * element. |
| 9796 * | 9796 * |
| 9797 * @param element the element to be associated with this identifier | 9797 * @param element the element to be associated with this identifier |
| 9798 */ | 9798 */ |
| 9799 void set staticElement(Element element) { | 9799 void set staticElement(Element element) { |
| 9800 _staticElement = validateElement(element); | 9800 _staticElement = _validateElement(element); |
| 9801 } | 9801 } |
| 9802 | 9802 |
| 9803 void visitChildren(AstVisitor visitor) { | 9803 void visitChildren(AstVisitor visitor) { |
| 9804 } | 9804 } |
| 9805 | 9805 |
| 9806 /** | 9806 /** |
| 9807 * Return the given element if it is valid, or report the problem and return `
null` if it is | 9807 * Return the given element if it is valid, or report the problem and return `
null` if it is |
| 9808 * not appropriate. | 9808 * not appropriate. |
| 9809 * | 9809 * |
| 9810 * @param parent the parent of the element, used for reporting when there is a
problem | 9810 * @param parent the parent of the element, used for reporting when there is a
problem |
| 9811 * @param isValid `true` if the element is appropriate | 9811 * @param isValid `true` if the element is appropriate |
| 9812 * @param element the element to be associated with this identifier | 9812 * @param element the element to be associated with this identifier |
| 9813 * @return the element to be associated with this identifier | 9813 * @return the element to be associated with this identifier |
| 9814 */ | 9814 */ |
| 9815 Element returnOrReportElement(AstNode parent, bool isValid, Element element) { | 9815 Element _returnOrReportElement(AstNode parent, bool isValid, Element element)
{ |
| 9816 if (!isValid) { | 9816 if (!isValid) { |
| 9817 AnalysisEngine.instance.logger.logInformation3("Internal error: attempting
to set the name of a ${parent.runtimeType.toString()} to a ${element.runtimeTyp
e.toString()}", new JavaException()); | 9817 AnalysisEngine.instance.logger.logInformation2("Internal error: attempting
to set the name of a ${parent.runtimeType.toString()} to a ${element.runtimeTyp
e.toString()}", new JavaException()); |
| 9818 return null; | 9818 return null; |
| 9819 } | 9819 } |
| 9820 return element; | 9820 return element; |
| 9821 } | 9821 } |
| 9822 | 9822 |
| 9823 /** | 9823 /** |
| 9824 * Return the given element if it is an appropriate element based on the paren
t of this | 9824 * Return the given element if it is an appropriate element based on the paren
t of this |
| 9825 * identifier, or `null` if it is not appropriate. | 9825 * identifier, or `null` if it is not appropriate. |
| 9826 * | 9826 * |
| 9827 * @param element the element to be associated with this identifier | 9827 * @param element the element to be associated with this identifier |
| 9828 * @return the element to be associated with this identifier | 9828 * @return the element to be associated with this identifier |
| 9829 */ | 9829 */ |
| 9830 Element validateElement(Element element) { | 9830 Element _validateElement(Element element) { |
| 9831 if (element == null) { | 9831 if (element == null) { |
| 9832 return null; | 9832 return null; |
| 9833 } | 9833 } |
| 9834 AstNode parent = this.parent; | 9834 AstNode parent = this.parent; |
| 9835 if (parent is ClassDeclaration && identical(parent.name, this)) { | 9835 if (parent is ClassDeclaration && identical(parent.name, this)) { |
| 9836 return returnOrReportElement(parent, element is ClassElement, element); | 9836 return _returnOrReportElement(parent, element is ClassElement, element); |
| 9837 } else if (parent is ClassTypeAlias && identical(parent.name, this)) { | 9837 } else if (parent is ClassTypeAlias && identical(parent.name, this)) { |
| 9838 return returnOrReportElement(parent, element is ClassElement, element); | 9838 return _returnOrReportElement(parent, element is ClassElement, element); |
| 9839 } else if (parent is DeclaredIdentifier && identical(parent.identifier, this
)) { | 9839 } else if (parent is DeclaredIdentifier && identical(parent.identifier, this
)) { |
| 9840 return returnOrReportElement(parent, element is LocalVariableElement, elem
ent); | 9840 return _returnOrReportElement(parent, element is LocalVariableElement, ele
ment); |
| 9841 } else if (parent is FormalParameter && identical(parent.identifier, this))
{ | 9841 } else if (parent is FormalParameter && identical(parent.identifier, this))
{ |
| 9842 return returnOrReportElement(parent, element is ParameterElement, element)
; | 9842 return _returnOrReportElement(parent, element is ParameterElement, element
); |
| 9843 } else if (parent is FunctionDeclaration && identical(parent.name, this)) { | 9843 } else if (parent is FunctionDeclaration && identical(parent.name, this)) { |
| 9844 return returnOrReportElement(parent, element is ExecutableElement, element
); | 9844 return _returnOrReportElement(parent, element is ExecutableElement, elemen
t); |
| 9845 } else if (parent is FunctionTypeAlias && identical(parent.name, this)) { | 9845 } else if (parent is FunctionTypeAlias && identical(parent.name, this)) { |
| 9846 return returnOrReportElement(parent, element is FunctionTypeAliasElement,
element); | 9846 return _returnOrReportElement(parent, element is FunctionTypeAliasElement,
element); |
| 9847 } else if (parent is MethodDeclaration && identical(parent.name, this)) { | 9847 } else if (parent is MethodDeclaration && identical(parent.name, this)) { |
| 9848 return returnOrReportElement(parent, element is ExecutableElement, element
); | 9848 return _returnOrReportElement(parent, element is ExecutableElement, elemen
t); |
| 9849 } else if (parent is TypeParameter && identical(parent.name, this)) { | 9849 } else if (parent is TypeParameter && identical(parent.name, this)) { |
| 9850 return returnOrReportElement(parent, element is TypeParameterElement, elem
ent); | 9850 return _returnOrReportElement(parent, element is TypeParameterElement, ele
ment); |
| 9851 } else if (parent is VariableDeclaration && identical(parent.name, this)) { | 9851 } else if (parent is VariableDeclaration && identical(parent.name, this)) { |
| 9852 return returnOrReportElement(parent, element is VariableElement, element); | 9852 return _returnOrReportElement(parent, element is VariableElement, element)
; |
| 9853 } | 9853 } |
| 9854 return element; | 9854 return element; |
| 9855 } | 9855 } |
| 9856 } | 9856 } |
| 9857 | 9857 |
| 9858 /** | 9858 /** |
| 9859 * Instances of the class `SimpleStringLiteral` represent a string literal expre
ssion that | 9859 * Instances of the class `SimpleStringLiteral` represent a string literal expre
ssion that |
| 9860 * does not contain any interpolations. | 9860 * does not contain any interpolations. |
| 9861 * | 9861 * |
| 9862 * <pre> | 9862 * <pre> |
| (...skipping 2124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11987 } | 11987 } |
| 11988 | 11988 |
| 11989 Object visitMethodInvocation(MethodInvocation node) => visitNode(node); | 11989 Object visitMethodInvocation(MethodInvocation node) => visitNode(node); |
| 11990 | 11990 |
| 11991 Object visitNode(AstNode node) => NOT_A_CONSTANT; | 11991 Object visitNode(AstNode node) => NOT_A_CONSTANT; |
| 11992 | 11992 |
| 11993 Object visitNullLiteral(NullLiteral node) => null; | 11993 Object visitNullLiteral(NullLiteral node) => null; |
| 11994 | 11994 |
| 11995 Object visitParenthesizedExpression(ParenthesizedExpression node) => node.expr
ession.accept(this); | 11995 Object visitParenthesizedExpression(ParenthesizedExpression node) => node.expr
ession.accept(this); |
| 11996 | 11996 |
| 11997 Object visitPrefixedIdentifier(PrefixedIdentifier node) => getConstantValue(nu
ll); | 11997 Object visitPrefixedIdentifier(PrefixedIdentifier node) => _getConstantValue(n
ull); |
| 11998 | 11998 |
| 11999 Object visitPrefixExpression(PrefixExpression node) { | 11999 Object visitPrefixExpression(PrefixExpression node) { |
| 12000 Object operand = node.operand.accept(this); | 12000 Object operand = node.operand.accept(this); |
| 12001 if (identical(operand, NOT_A_CONSTANT)) { | 12001 if (identical(operand, NOT_A_CONSTANT)) { |
| 12002 return operand; | 12002 return operand; |
| 12003 } | 12003 } |
| 12004 while (true) { | 12004 while (true) { |
| 12005 if (node.operator.type == TokenType.BANG) { | 12005 if (node.operator.type == TokenType.BANG) { |
| 12006 if (identical(operand, true)) { | 12006 if (identical(operand, true)) { |
| 12007 return false; | 12007 return false; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 12020 } else if (operand is double) { | 12020 } else if (operand is double) { |
| 12021 return -operand; | 12021 return -operand; |
| 12022 } | 12022 } |
| 12023 } else { | 12023 } else { |
| 12024 } | 12024 } |
| 12025 break; | 12025 break; |
| 12026 } | 12026 } |
| 12027 return NOT_A_CONSTANT; | 12027 return NOT_A_CONSTANT; |
| 12028 } | 12028 } |
| 12029 | 12029 |
| 12030 Object visitPropertyAccess(PropertyAccess node) => getConstantValue(null); | 12030 Object visitPropertyAccess(PropertyAccess node) => _getConstantValue(null); |
| 12031 | 12031 |
| 12032 Object visitSimpleIdentifier(SimpleIdentifier node) => getConstantValue(null); | 12032 Object visitSimpleIdentifier(SimpleIdentifier node) => _getConstantValue(null)
; |
| 12033 | 12033 |
| 12034 Object visitSimpleStringLiteral(SimpleStringLiteral node) => node.value; | 12034 Object visitSimpleStringLiteral(SimpleStringLiteral node) => node.value; |
| 12035 | 12035 |
| 12036 Object visitStringInterpolation(StringInterpolation node) { | 12036 Object visitStringInterpolation(StringInterpolation node) { |
| 12037 JavaStringBuilder builder = new JavaStringBuilder(); | 12037 JavaStringBuilder builder = new JavaStringBuilder(); |
| 12038 for (InterpolationElement element in node.elements) { | 12038 for (InterpolationElement element in node.elements) { |
| 12039 Object value = element.accept(this); | 12039 Object value = element.accept(this); |
| 12040 if (identical(value, NOT_A_CONSTANT)) { | 12040 if (identical(value, NOT_A_CONSTANT)) { |
| 12041 return value; | 12041 return value; |
| 12042 } | 12042 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 12056 } | 12056 } |
| 12057 return builder.toString(); | 12057 return builder.toString(); |
| 12058 } | 12058 } |
| 12059 | 12059 |
| 12060 /** | 12060 /** |
| 12061 * Return the constant value of the static constant represented by the given e
lement. | 12061 * Return the constant value of the static constant represented by the given e
lement. |
| 12062 * | 12062 * |
| 12063 * @param element the element whose value is to be returned | 12063 * @param element the element whose value is to be returned |
| 12064 * @return the constant value of the static constant | 12064 * @return the constant value of the static constant |
| 12065 */ | 12065 */ |
| 12066 Object getConstantValue(Element element) { | 12066 Object _getConstantValue(Element element) { |
| 12067 // TODO(brianwilkerson) Implement this | 12067 // TODO(brianwilkerson) Implement this |
| 12068 if (element is FieldElement) { | 12068 if (element is FieldElement) { |
| 12069 FieldElement field = element; | 12069 FieldElement field = element; |
| 12070 if (field.isStatic && field.isConst) { | 12070 if (field.isStatic && field.isConst) { |
| 12071 } | 12071 } |
| 12072 } | 12072 } |
| 12073 return NOT_A_CONSTANT; | 12073 return NOT_A_CONSTANT; |
| 12074 } | 12074 } |
| 12075 } | 12075 } |
| 12076 | 12076 |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12545 * @return the element that was found | 12545 * @return the element that was found |
| 12546 */ | 12546 */ |
| 12547 AstNode searchWithin(AstNode node) { | 12547 AstNode searchWithin(AstNode node) { |
| 12548 if (node == null) { | 12548 if (node == null) { |
| 12549 return null; | 12549 return null; |
| 12550 } | 12550 } |
| 12551 try { | 12551 try { |
| 12552 node.accept(this); | 12552 node.accept(this); |
| 12553 } on NodeLocator_NodeFoundException catch (exception) { | 12553 } on NodeLocator_NodeFoundException catch (exception) { |
| 12554 } on JavaException catch (exception) { | 12554 } on JavaException catch (exception) { |
| 12555 AnalysisEngine.instance.logger.logInformation3("Unable to locate element a
t offset (${_startOffset} - ${_endOffset})", exception); | 12555 AnalysisEngine.instance.logger.logInformation2("Unable to locate element a
t offset (${_startOffset} - ${_endOffset})", exception); |
| 12556 return null; | 12556 return null; |
| 12557 } | 12557 } |
| 12558 return _foundNode; | 12558 return _foundNode; |
| 12559 } | 12559 } |
| 12560 | 12560 |
| 12561 Object visitNode(AstNode node) { | 12561 Object visitNode(AstNode node) { |
| 12562 int start = node.offset; | 12562 int start = node.offset; |
| 12563 int end = start + node.length; | 12563 int end = start + node.length; |
| 12564 if (end < _startOffset) { | 12564 if (end < _startOffset) { |
| 12565 return null; | 12565 return null; |
| 12566 } | 12566 } |
| 12567 if (start > _endOffset) { | 12567 if (start > _endOffset) { |
| 12568 return null; | 12568 return null; |
| 12569 } | 12569 } |
| 12570 try { | 12570 try { |
| 12571 node.visitChildren(this); | 12571 node.visitChildren(this); |
| 12572 } on NodeLocator_NodeFoundException catch (exception) { | 12572 } on NodeLocator_NodeFoundException catch (exception) { |
| 12573 throw exception; | 12573 throw exception; |
| 12574 } on JavaException catch (exception) { | 12574 } on JavaException catch (exception) { |
| 12575 // Ignore the exception and proceed in order to visit the rest of the stru
cture. | 12575 // Ignore the exception and proceed in order to visit the rest of the stru
cture. |
| 12576 AnalysisEngine.instance.logger.logInformation3("Exception caught while tra
versing an AST structure.", exception); | 12576 AnalysisEngine.instance.logger.logInformation2("Exception caught while tra
versing an AST structure.", exception); |
| 12577 } | 12577 } |
| 12578 if (start <= _startOffset && _endOffset <= end) { | 12578 if (start <= _startOffset && _endOffset <= end) { |
| 12579 _foundNode = node; | 12579 _foundNode = node; |
| 12580 throw new NodeLocator_NodeFoundException(); | 12580 throw new NodeLocator_NodeFoundException(); |
| 12581 } | 12581 } |
| 12582 return null; | 12582 return null; |
| 12583 } | 12583 } |
| 12584 } | 12584 } |
| 12585 | 12585 |
| 12586 /** | 12586 /** |
| (...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13345 * Initialize a newly created visitor to write source code representing the vi
sited nodes to the | 13345 * Initialize a newly created visitor to write source code representing the vi
sited nodes to the |
| 13346 * given writer. | 13346 * given writer. |
| 13347 * | 13347 * |
| 13348 * @param writer the writer to which the source is to be written | 13348 * @param writer the writer to which the source is to be written |
| 13349 */ | 13349 */ |
| 13350 ToSourceVisitor(PrintWriter writer) { | 13350 ToSourceVisitor(PrintWriter writer) { |
| 13351 this._writer = writer; | 13351 this._writer = writer; |
| 13352 } | 13352 } |
| 13353 | 13353 |
| 13354 Object visitAdjacentStrings(AdjacentStrings node) { | 13354 Object visitAdjacentStrings(AdjacentStrings node) { |
| 13355 visitNodeListWithSeparator(node.strings, " "); | 13355 _visitNodeListWithSeparator(node.strings, " "); |
| 13356 return null; | 13356 return null; |
| 13357 } | 13357 } |
| 13358 | 13358 |
| 13359 Object visitAnnotation(Annotation node) { | 13359 Object visitAnnotation(Annotation node) { |
| 13360 _writer.print('@'); | 13360 _writer.print('@'); |
| 13361 visitNode(node.name); | 13361 _visitNode(node.name); |
| 13362 visitNodeWithPrefix(".", node.constructorName); | 13362 _visitNodeWithPrefix(".", node.constructorName); |
| 13363 visitNode(node.arguments); | 13363 _visitNode(node.arguments); |
| 13364 return null; | 13364 return null; |
| 13365 } | 13365 } |
| 13366 | 13366 |
| 13367 Object visitArgumentDefinitionTest(ArgumentDefinitionTest node) { | 13367 Object visitArgumentDefinitionTest(ArgumentDefinitionTest node) { |
| 13368 _writer.print('?'); | 13368 _writer.print('?'); |
| 13369 visitNode(node.identifier); | 13369 _visitNode(node.identifier); |
| 13370 return null; | 13370 return null; |
| 13371 } | 13371 } |
| 13372 | 13372 |
| 13373 Object visitArgumentList(ArgumentList node) { | 13373 Object visitArgumentList(ArgumentList node) { |
| 13374 _writer.print('('); | 13374 _writer.print('('); |
| 13375 visitNodeListWithSeparator(node.arguments, ", "); | 13375 _visitNodeListWithSeparator(node.arguments, ", "); |
| 13376 _writer.print(')'); | 13376 _writer.print(')'); |
| 13377 return null; | 13377 return null; |
| 13378 } | 13378 } |
| 13379 | 13379 |
| 13380 Object visitAsExpression(AsExpression node) { | 13380 Object visitAsExpression(AsExpression node) { |
| 13381 visitNode(node.expression); | 13381 _visitNode(node.expression); |
| 13382 _writer.print(" as "); | 13382 _writer.print(" as "); |
| 13383 visitNode(node.type); | 13383 _visitNode(node.type); |
| 13384 return null; | 13384 return null; |
| 13385 } | 13385 } |
| 13386 | 13386 |
| 13387 Object visitAssertStatement(AssertStatement node) { | 13387 Object visitAssertStatement(AssertStatement node) { |
| 13388 _writer.print("assert ("); | 13388 _writer.print("assert ("); |
| 13389 visitNode(node.condition); | 13389 _visitNode(node.condition); |
| 13390 _writer.print(");"); | 13390 _writer.print(");"); |
| 13391 return null; | 13391 return null; |
| 13392 } | 13392 } |
| 13393 | 13393 |
| 13394 Object visitAssignmentExpression(AssignmentExpression node) { | 13394 Object visitAssignmentExpression(AssignmentExpression node) { |
| 13395 visitNode(node.leftHandSide); | 13395 _visitNode(node.leftHandSide); |
| 13396 _writer.print(' '); | 13396 _writer.print(' '); |
| 13397 _writer.print(node.operator.lexeme); | 13397 _writer.print(node.operator.lexeme); |
| 13398 _writer.print(' '); | 13398 _writer.print(' '); |
| 13399 visitNode(node.rightHandSide); | 13399 _visitNode(node.rightHandSide); |
| 13400 return null; | 13400 return null; |
| 13401 } | 13401 } |
| 13402 | 13402 |
| 13403 Object visitBinaryExpression(BinaryExpression node) { | 13403 Object visitBinaryExpression(BinaryExpression node) { |
| 13404 visitNode(node.leftOperand); | 13404 _visitNode(node.leftOperand); |
| 13405 _writer.print(' '); | 13405 _writer.print(' '); |
| 13406 _writer.print(node.operator.lexeme); | 13406 _writer.print(node.operator.lexeme); |
| 13407 _writer.print(' '); | 13407 _writer.print(' '); |
| 13408 visitNode(node.rightOperand); | 13408 _visitNode(node.rightOperand); |
| 13409 return null; | 13409 return null; |
| 13410 } | 13410 } |
| 13411 | 13411 |
| 13412 Object visitBlock(Block node) { | 13412 Object visitBlock(Block node) { |
| 13413 _writer.print('{'); | 13413 _writer.print('{'); |
| 13414 visitNodeListWithSeparator(node.statements, " "); | 13414 _visitNodeListWithSeparator(node.statements, " "); |
| 13415 _writer.print('}'); | 13415 _writer.print('}'); |
| 13416 return null; | 13416 return null; |
| 13417 } | 13417 } |
| 13418 | 13418 |
| 13419 Object visitBlockFunctionBody(BlockFunctionBody node) { | 13419 Object visitBlockFunctionBody(BlockFunctionBody node) { |
| 13420 visitNode(node.block); | 13420 _visitNode(node.block); |
| 13421 return null; | 13421 return null; |
| 13422 } | 13422 } |
| 13423 | 13423 |
| 13424 Object visitBooleanLiteral(BooleanLiteral node) { | 13424 Object visitBooleanLiteral(BooleanLiteral node) { |
| 13425 _writer.print(node.literal.lexeme); | 13425 _writer.print(node.literal.lexeme); |
| 13426 return null; | 13426 return null; |
| 13427 } | 13427 } |
| 13428 | 13428 |
| 13429 Object visitBreakStatement(BreakStatement node) { | 13429 Object visitBreakStatement(BreakStatement node) { |
| 13430 _writer.print("break"); | 13430 _writer.print("break"); |
| 13431 visitNodeWithPrefix(" ", node.label); | 13431 _visitNodeWithPrefix(" ", node.label); |
| 13432 _writer.print(";"); | 13432 _writer.print(";"); |
| 13433 return null; | 13433 return null; |
| 13434 } | 13434 } |
| 13435 | 13435 |
| 13436 Object visitCascadeExpression(CascadeExpression node) { | 13436 Object visitCascadeExpression(CascadeExpression node) { |
| 13437 visitNode(node.target); | 13437 _visitNode(node.target); |
| 13438 visitNodeList(node.cascadeSections); | 13438 _visitNodeList(node.cascadeSections); |
| 13439 return null; | 13439 return null; |
| 13440 } | 13440 } |
| 13441 | 13441 |
| 13442 Object visitCatchClause(CatchClause node) { | 13442 Object visitCatchClause(CatchClause node) { |
| 13443 visitNodeWithPrefix("on ", node.exceptionType); | 13443 _visitNodeWithPrefix("on ", node.exceptionType); |
| 13444 if (node.catchKeyword != null) { | 13444 if (node.catchKeyword != null) { |
| 13445 if (node.exceptionType != null) { | 13445 if (node.exceptionType != null) { |
| 13446 _writer.print(' '); | 13446 _writer.print(' '); |
| 13447 } | 13447 } |
| 13448 _writer.print("catch ("); | 13448 _writer.print("catch ("); |
| 13449 visitNode(node.exceptionParameter); | 13449 _visitNode(node.exceptionParameter); |
| 13450 visitNodeWithPrefix(", ", node.stackTraceParameter); | 13450 _visitNodeWithPrefix(", ", node.stackTraceParameter); |
| 13451 _writer.print(") "); | 13451 _writer.print(") "); |
| 13452 } else { | 13452 } else { |
| 13453 _writer.print(" "); | 13453 _writer.print(" "); |
| 13454 } | 13454 } |
| 13455 visitNode(node.body); | 13455 _visitNode(node.body); |
| 13456 return null; | 13456 return null; |
| 13457 } | 13457 } |
| 13458 | 13458 |
| 13459 Object visitClassDeclaration(ClassDeclaration node) { | 13459 Object visitClassDeclaration(ClassDeclaration node) { |
| 13460 visitTokenWithSuffix(node.abstractKeyword, " "); | 13460 _visitTokenWithSuffix(node.abstractKeyword, " "); |
| 13461 _writer.print("class "); | 13461 _writer.print("class "); |
| 13462 visitNode(node.name); | 13462 _visitNode(node.name); |
| 13463 visitNode(node.typeParameters); | 13463 _visitNode(node.typeParameters); |
| 13464 visitNodeWithPrefix(" ", node.extendsClause); | 13464 _visitNodeWithPrefix(" ", node.extendsClause); |
| 13465 visitNodeWithPrefix(" ", node.withClause); | 13465 _visitNodeWithPrefix(" ", node.withClause); |
| 13466 visitNodeWithPrefix(" ", node.implementsClause); | 13466 _visitNodeWithPrefix(" ", node.implementsClause); |
| 13467 _writer.print(" {"); | 13467 _writer.print(" {"); |
| 13468 visitNodeListWithSeparator(node.members, " "); | 13468 _visitNodeListWithSeparator(node.members, " "); |
| 13469 _writer.print("}"); | 13469 _writer.print("}"); |
| 13470 return null; | 13470 return null; |
| 13471 } | 13471 } |
| 13472 | 13472 |
| 13473 Object visitClassTypeAlias(ClassTypeAlias node) { | 13473 Object visitClassTypeAlias(ClassTypeAlias node) { |
| 13474 if (node.abstractKeyword != null) { | 13474 if (node.abstractKeyword != null) { |
| 13475 _writer.print("abstract "); | 13475 _writer.print("abstract "); |
| 13476 } | 13476 } |
| 13477 _writer.print("class "); | 13477 _writer.print("class "); |
| 13478 visitNode(node.name); | 13478 _visitNode(node.name); |
| 13479 visitNode(node.typeParameters); | 13479 _visitNode(node.typeParameters); |
| 13480 _writer.print(" = "); | 13480 _writer.print(" = "); |
| 13481 visitNode(node.superclass); | 13481 _visitNode(node.superclass); |
| 13482 visitNodeWithPrefix(" ", node.withClause); | 13482 _visitNodeWithPrefix(" ", node.withClause); |
| 13483 visitNodeWithPrefix(" ", node.implementsClause); | 13483 _visitNodeWithPrefix(" ", node.implementsClause); |
| 13484 _writer.print(";"); | 13484 _writer.print(";"); |
| 13485 return null; | 13485 return null; |
| 13486 } | 13486 } |
| 13487 | 13487 |
| 13488 Object visitComment(Comment node) => null; | 13488 Object visitComment(Comment node) => null; |
| 13489 | 13489 |
| 13490 Object visitCommentReference(CommentReference node) => null; | 13490 Object visitCommentReference(CommentReference node) => null; |
| 13491 | 13491 |
| 13492 Object visitCompilationUnit(CompilationUnit node) { | 13492 Object visitCompilationUnit(CompilationUnit node) { |
| 13493 ScriptTag scriptTag = node.scriptTag; | 13493 ScriptTag scriptTag = node.scriptTag; |
| 13494 NodeList<Directive> directives = node.directives; | 13494 NodeList<Directive> directives = node.directives; |
| 13495 visitNode(scriptTag); | 13495 _visitNode(scriptTag); |
| 13496 String prefix = scriptTag == null ? "" : " "; | 13496 String prefix = scriptTag == null ? "" : " "; |
| 13497 visitNodeListWithSeparatorAndPrefix(prefix, directives, " "); | 13497 _visitNodeListWithSeparatorAndPrefix(prefix, directives, " "); |
| 13498 prefix = scriptTag == null && directives.isEmpty ? "" : " "; | 13498 prefix = scriptTag == null && directives.isEmpty ? "" : " "; |
| 13499 visitNodeListWithSeparatorAndPrefix(prefix, node.declarations, " "); | 13499 _visitNodeListWithSeparatorAndPrefix(prefix, node.declarations, " "); |
| 13500 return null; | 13500 return null; |
| 13501 } | 13501 } |
| 13502 | 13502 |
| 13503 Object visitConditionalExpression(ConditionalExpression node) { | 13503 Object visitConditionalExpression(ConditionalExpression node) { |
| 13504 visitNode(node.condition); | 13504 _visitNode(node.condition); |
| 13505 _writer.print(" ? "); | 13505 _writer.print(" ? "); |
| 13506 visitNode(node.thenExpression); | 13506 _visitNode(node.thenExpression); |
| 13507 _writer.print(" : "); | 13507 _writer.print(" : "); |
| 13508 visitNode(node.elseExpression); | 13508 _visitNode(node.elseExpression); |
| 13509 return null; | 13509 return null; |
| 13510 } | 13510 } |
| 13511 | 13511 |
| 13512 Object visitConstructorDeclaration(ConstructorDeclaration node) { | 13512 Object visitConstructorDeclaration(ConstructorDeclaration node) { |
| 13513 visitTokenWithSuffix(node.externalKeyword, " "); | 13513 _visitTokenWithSuffix(node.externalKeyword, " "); |
| 13514 visitTokenWithSuffix(node.constKeyword, " "); | 13514 _visitTokenWithSuffix(node.constKeyword, " "); |
| 13515 visitTokenWithSuffix(node.factoryKeyword, " "); | 13515 _visitTokenWithSuffix(node.factoryKeyword, " "); |
| 13516 visitNode(node.returnType); | 13516 _visitNode(node.returnType); |
| 13517 visitNodeWithPrefix(".", node.name); | 13517 _visitNodeWithPrefix(".", node.name); |
| 13518 visitNode(node.parameters); | 13518 _visitNode(node.parameters); |
| 13519 visitNodeListWithSeparatorAndPrefix(" : ", node.initializers, ", "); | 13519 _visitNodeListWithSeparatorAndPrefix(" : ", node.initializers, ", "); |
| 13520 visitNodeWithPrefix(" = ", node.redirectedConstructor); | 13520 _visitNodeWithPrefix(" = ", node.redirectedConstructor); |
| 13521 visitFunctionWithPrefix(" ", node.body); | 13521 _visitFunctionWithPrefix(" ", node.body); |
| 13522 return null; | 13522 return null; |
| 13523 } | 13523 } |
| 13524 | 13524 |
| 13525 Object visitConstructorFieldInitializer(ConstructorFieldInitializer node) { | 13525 Object visitConstructorFieldInitializer(ConstructorFieldInitializer node) { |
| 13526 visitTokenWithSuffix(node.keyword, "."); | 13526 _visitTokenWithSuffix(node.keyword, "."); |
| 13527 visitNode(node.fieldName); | 13527 _visitNode(node.fieldName); |
| 13528 _writer.print(" = "); | 13528 _writer.print(" = "); |
| 13529 visitNode(node.expression); | 13529 _visitNode(node.expression); |
| 13530 return null; | 13530 return null; |
| 13531 } | 13531 } |
| 13532 | 13532 |
| 13533 Object visitConstructorName(ConstructorName node) { | 13533 Object visitConstructorName(ConstructorName node) { |
| 13534 visitNode(node.type); | 13534 _visitNode(node.type); |
| 13535 visitNodeWithPrefix(".", node.name); | 13535 _visitNodeWithPrefix(".", node.name); |
| 13536 return null; | 13536 return null; |
| 13537 } | 13537 } |
| 13538 | 13538 |
| 13539 Object visitContinueStatement(ContinueStatement node) { | 13539 Object visitContinueStatement(ContinueStatement node) { |
| 13540 _writer.print("continue"); | 13540 _writer.print("continue"); |
| 13541 visitNodeWithPrefix(" ", node.label); | 13541 _visitNodeWithPrefix(" ", node.label); |
| 13542 _writer.print(";"); | 13542 _writer.print(";"); |
| 13543 return null; | 13543 return null; |
| 13544 } | 13544 } |
| 13545 | 13545 |
| 13546 Object visitDeclaredIdentifier(DeclaredIdentifier node) { | 13546 Object visitDeclaredIdentifier(DeclaredIdentifier node) { |
| 13547 visitTokenWithSuffix(node.keyword, " "); | 13547 _visitTokenWithSuffix(node.keyword, " "); |
| 13548 visitNodeWithSuffix(node.type, " "); | 13548 _visitNodeWithSuffix(node.type, " "); |
| 13549 visitNode(node.identifier); | 13549 _visitNode(node.identifier); |
| 13550 return null; | 13550 return null; |
| 13551 } | 13551 } |
| 13552 | 13552 |
| 13553 Object visitDefaultFormalParameter(DefaultFormalParameter node) { | 13553 Object visitDefaultFormalParameter(DefaultFormalParameter node) { |
| 13554 visitNode(node.parameter); | 13554 _visitNode(node.parameter); |
| 13555 if (node.separator != null) { | 13555 if (node.separator != null) { |
| 13556 _writer.print(" "); | 13556 _writer.print(" "); |
| 13557 _writer.print(node.separator.lexeme); | 13557 _writer.print(node.separator.lexeme); |
| 13558 visitNodeWithPrefix(" ", node.defaultValue); | 13558 _visitNodeWithPrefix(" ", node.defaultValue); |
| 13559 } | 13559 } |
| 13560 return null; | 13560 return null; |
| 13561 } | 13561 } |
| 13562 | 13562 |
| 13563 Object visitDoStatement(DoStatement node) { | 13563 Object visitDoStatement(DoStatement node) { |
| 13564 _writer.print("do "); | 13564 _writer.print("do "); |
| 13565 visitNode(node.body); | 13565 _visitNode(node.body); |
| 13566 _writer.print(" while ("); | 13566 _writer.print(" while ("); |
| 13567 visitNode(node.condition); | 13567 _visitNode(node.condition); |
| 13568 _writer.print(");"); | 13568 _writer.print(");"); |
| 13569 return null; | 13569 return null; |
| 13570 } | 13570 } |
| 13571 | 13571 |
| 13572 Object visitDoubleLiteral(DoubleLiteral node) { | 13572 Object visitDoubleLiteral(DoubleLiteral node) { |
| 13573 _writer.print(node.literal.lexeme); | 13573 _writer.print(node.literal.lexeme); |
| 13574 return null; | 13574 return null; |
| 13575 } | 13575 } |
| 13576 | 13576 |
| 13577 Object visitEmptyFunctionBody(EmptyFunctionBody node) { | 13577 Object visitEmptyFunctionBody(EmptyFunctionBody node) { |
| 13578 _writer.print(';'); | 13578 _writer.print(';'); |
| 13579 return null; | 13579 return null; |
| 13580 } | 13580 } |
| 13581 | 13581 |
| 13582 Object visitEmptyStatement(EmptyStatement node) { | 13582 Object visitEmptyStatement(EmptyStatement node) { |
| 13583 _writer.print(';'); | 13583 _writer.print(';'); |
| 13584 return null; | 13584 return null; |
| 13585 } | 13585 } |
| 13586 | 13586 |
| 13587 Object visitExportDirective(ExportDirective node) { | 13587 Object visitExportDirective(ExportDirective node) { |
| 13588 _writer.print("export "); | 13588 _writer.print("export "); |
| 13589 visitNode(node.uri); | 13589 _visitNode(node.uri); |
| 13590 visitNodeListWithSeparatorAndPrefix(" ", node.combinators, " "); | 13590 _visitNodeListWithSeparatorAndPrefix(" ", node.combinators, " "); |
| 13591 _writer.print(';'); | 13591 _writer.print(';'); |
| 13592 return null; | 13592 return null; |
| 13593 } | 13593 } |
| 13594 | 13594 |
| 13595 Object visitExpressionFunctionBody(ExpressionFunctionBody node) { | 13595 Object visitExpressionFunctionBody(ExpressionFunctionBody node) { |
| 13596 _writer.print("=> "); | 13596 _writer.print("=> "); |
| 13597 visitNode(node.expression); | 13597 _visitNode(node.expression); |
| 13598 if (node.semicolon != null) { | 13598 if (node.semicolon != null) { |
| 13599 _writer.print(';'); | 13599 _writer.print(';'); |
| 13600 } | 13600 } |
| 13601 return null; | 13601 return null; |
| 13602 } | 13602 } |
| 13603 | 13603 |
| 13604 Object visitExpressionStatement(ExpressionStatement node) { | 13604 Object visitExpressionStatement(ExpressionStatement node) { |
| 13605 visitNode(node.expression); | 13605 _visitNode(node.expression); |
| 13606 _writer.print(';'); | 13606 _writer.print(';'); |
| 13607 return null; | 13607 return null; |
| 13608 } | 13608 } |
| 13609 | 13609 |
| 13610 Object visitExtendsClause(ExtendsClause node) { | 13610 Object visitExtendsClause(ExtendsClause node) { |
| 13611 _writer.print("extends "); | 13611 _writer.print("extends "); |
| 13612 visitNode(node.superclass); | 13612 _visitNode(node.superclass); |
| 13613 return null; | 13613 return null; |
| 13614 } | 13614 } |
| 13615 | 13615 |
| 13616 Object visitFieldDeclaration(FieldDeclaration node) { | 13616 Object visitFieldDeclaration(FieldDeclaration node) { |
| 13617 visitTokenWithSuffix(node.staticKeyword, " "); | 13617 _visitTokenWithSuffix(node.staticKeyword, " "); |
| 13618 visitNode(node.fields); | 13618 _visitNode(node.fields); |
| 13619 _writer.print(";"); | 13619 _writer.print(";"); |
| 13620 return null; | 13620 return null; |
| 13621 } | 13621 } |
| 13622 | 13622 |
| 13623 Object visitFieldFormalParameter(FieldFormalParameter node) { | 13623 Object visitFieldFormalParameter(FieldFormalParameter node) { |
| 13624 visitTokenWithSuffix(node.keyword, " "); | 13624 _visitTokenWithSuffix(node.keyword, " "); |
| 13625 visitNodeWithSuffix(node.type, " "); | 13625 _visitNodeWithSuffix(node.type, " "); |
| 13626 _writer.print("this."); | 13626 _writer.print("this."); |
| 13627 visitNode(node.identifier); | 13627 _visitNode(node.identifier); |
| 13628 visitNode(node.parameters); | 13628 _visitNode(node.parameters); |
| 13629 return null; | 13629 return null; |
| 13630 } | 13630 } |
| 13631 | 13631 |
| 13632 Object visitForEachStatement(ForEachStatement node) { | 13632 Object visitForEachStatement(ForEachStatement node) { |
| 13633 DeclaredIdentifier loopVariable = node.loopVariable; | 13633 DeclaredIdentifier loopVariable = node.loopVariable; |
| 13634 _writer.print("for ("); | 13634 _writer.print("for ("); |
| 13635 if (loopVariable == null) { | 13635 if (loopVariable == null) { |
| 13636 visitNode(node.identifier); | 13636 _visitNode(node.identifier); |
| 13637 } else { | 13637 } else { |
| 13638 visitNode(loopVariable); | 13638 _visitNode(loopVariable); |
| 13639 } | 13639 } |
| 13640 _writer.print(" in "); | 13640 _writer.print(" in "); |
| 13641 visitNode(node.iterator); | 13641 _visitNode(node.iterator); |
| 13642 _writer.print(") "); | 13642 _writer.print(") "); |
| 13643 visitNode(node.body); | 13643 _visitNode(node.body); |
| 13644 return null; | 13644 return null; |
| 13645 } | 13645 } |
| 13646 | 13646 |
| 13647 Object visitFormalParameterList(FormalParameterList node) { | 13647 Object visitFormalParameterList(FormalParameterList node) { |
| 13648 String groupEnd = null; | 13648 String groupEnd = null; |
| 13649 _writer.print('('); | 13649 _writer.print('('); |
| 13650 NodeList<FormalParameter> parameters = node.parameters; | 13650 NodeList<FormalParameter> parameters = node.parameters; |
| 13651 int size = parameters.length; | 13651 int size = parameters.length; |
| 13652 for (int i = 0; i < size; i++) { | 13652 for (int i = 0; i < size; i++) { |
| 13653 FormalParameter parameter = parameters[i]; | 13653 FormalParameter parameter = parameters[i]; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 13669 _writer.print(groupEnd); | 13669 _writer.print(groupEnd); |
| 13670 } | 13670 } |
| 13671 _writer.print(')'); | 13671 _writer.print(')'); |
| 13672 return null; | 13672 return null; |
| 13673 } | 13673 } |
| 13674 | 13674 |
| 13675 Object visitForStatement(ForStatement node) { | 13675 Object visitForStatement(ForStatement node) { |
| 13676 Expression initialization = node.initialization; | 13676 Expression initialization = node.initialization; |
| 13677 _writer.print("for ("); | 13677 _writer.print("for ("); |
| 13678 if (initialization != null) { | 13678 if (initialization != null) { |
| 13679 visitNode(initialization); | 13679 _visitNode(initialization); |
| 13680 } else { | 13680 } else { |
| 13681 visitNode(node.variables); | 13681 _visitNode(node.variables); |
| 13682 } | 13682 } |
| 13683 _writer.print(";"); | 13683 _writer.print(";"); |
| 13684 visitNodeWithPrefix(" ", node.condition); | 13684 _visitNodeWithPrefix(" ", node.condition); |
| 13685 _writer.print(";"); | 13685 _writer.print(";"); |
| 13686 visitNodeListWithSeparatorAndPrefix(" ", node.updaters, ", "); | 13686 _visitNodeListWithSeparatorAndPrefix(" ", node.updaters, ", "); |
| 13687 _writer.print(") "); | 13687 _writer.print(") "); |
| 13688 visitNode(node.body); | 13688 _visitNode(node.body); |
| 13689 return null; | 13689 return null; |
| 13690 } | 13690 } |
| 13691 | 13691 |
| 13692 Object visitFunctionDeclaration(FunctionDeclaration node) { | 13692 Object visitFunctionDeclaration(FunctionDeclaration node) { |
| 13693 visitNodeWithSuffix(node.returnType, " "); | 13693 _visitNodeWithSuffix(node.returnType, " "); |
| 13694 visitTokenWithSuffix(node.propertyKeyword, " "); | 13694 _visitTokenWithSuffix(node.propertyKeyword, " "); |
| 13695 visitNode(node.name); | 13695 _visitNode(node.name); |
| 13696 visitNode(node.functionExpression); | 13696 _visitNode(node.functionExpression); |
| 13697 return null; | 13697 return null; |
| 13698 } | 13698 } |
| 13699 | 13699 |
| 13700 Object visitFunctionDeclarationStatement(FunctionDeclarationStatement node) { | 13700 Object visitFunctionDeclarationStatement(FunctionDeclarationStatement node) { |
| 13701 visitNode(node.functionDeclaration); | 13701 _visitNode(node.functionDeclaration); |
| 13702 _writer.print(';'); | 13702 _writer.print(';'); |
| 13703 return null; | 13703 return null; |
| 13704 } | 13704 } |
| 13705 | 13705 |
| 13706 Object visitFunctionExpression(FunctionExpression node) { | 13706 Object visitFunctionExpression(FunctionExpression node) { |
| 13707 visitNode(node.parameters); | 13707 _visitNode(node.parameters); |
| 13708 _writer.print(' '); | 13708 _writer.print(' '); |
| 13709 visitNode(node.body); | 13709 _visitNode(node.body); |
| 13710 return null; | 13710 return null; |
| 13711 } | 13711 } |
| 13712 | 13712 |
| 13713 Object visitFunctionExpressionInvocation(FunctionExpressionInvocation node) { | 13713 Object visitFunctionExpressionInvocation(FunctionExpressionInvocation node) { |
| 13714 visitNode(node.function); | 13714 _visitNode(node.function); |
| 13715 visitNode(node.argumentList); | 13715 _visitNode(node.argumentList); |
| 13716 return null; | 13716 return null; |
| 13717 } | 13717 } |
| 13718 | 13718 |
| 13719 Object visitFunctionTypeAlias(FunctionTypeAlias node) { | 13719 Object visitFunctionTypeAlias(FunctionTypeAlias node) { |
| 13720 _writer.print("typedef "); | 13720 _writer.print("typedef "); |
| 13721 visitNodeWithSuffix(node.returnType, " "); | 13721 _visitNodeWithSuffix(node.returnType, " "); |
| 13722 visitNode(node.name); | 13722 _visitNode(node.name); |
| 13723 visitNode(node.typeParameters); | 13723 _visitNode(node.typeParameters); |
| 13724 visitNode(node.parameters); | 13724 _visitNode(node.parameters); |
| 13725 _writer.print(";"); | 13725 _writer.print(";"); |
| 13726 return null; | 13726 return null; |
| 13727 } | 13727 } |
| 13728 | 13728 |
| 13729 Object visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) { | 13729 Object visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) { |
| 13730 visitNodeWithSuffix(node.returnType, " "); | 13730 _visitNodeWithSuffix(node.returnType, " "); |
| 13731 visitNode(node.identifier); | 13731 _visitNode(node.identifier); |
| 13732 visitNode(node.parameters); | 13732 _visitNode(node.parameters); |
| 13733 return null; | 13733 return null; |
| 13734 } | 13734 } |
| 13735 | 13735 |
| 13736 Object visitHideCombinator(HideCombinator node) { | 13736 Object visitHideCombinator(HideCombinator node) { |
| 13737 _writer.print("hide "); | 13737 _writer.print("hide "); |
| 13738 visitNodeListWithSeparator(node.hiddenNames, ", "); | 13738 _visitNodeListWithSeparator(node.hiddenNames, ", "); |
| 13739 return null; | 13739 return null; |
| 13740 } | 13740 } |
| 13741 | 13741 |
| 13742 Object visitIfStatement(IfStatement node) { | 13742 Object visitIfStatement(IfStatement node) { |
| 13743 _writer.print("if ("); | 13743 _writer.print("if ("); |
| 13744 visitNode(node.condition); | 13744 _visitNode(node.condition); |
| 13745 _writer.print(") "); | 13745 _writer.print(") "); |
| 13746 visitNode(node.thenStatement); | 13746 _visitNode(node.thenStatement); |
| 13747 visitNodeWithPrefix(" else ", node.elseStatement); | 13747 _visitNodeWithPrefix(" else ", node.elseStatement); |
| 13748 return null; | 13748 return null; |
| 13749 } | 13749 } |
| 13750 | 13750 |
| 13751 Object visitImplementsClause(ImplementsClause node) { | 13751 Object visitImplementsClause(ImplementsClause node) { |
| 13752 _writer.print("implements "); | 13752 _writer.print("implements "); |
| 13753 visitNodeListWithSeparator(node.interfaces, ", "); | 13753 _visitNodeListWithSeparator(node.interfaces, ", "); |
| 13754 return null; | 13754 return null; |
| 13755 } | 13755 } |
| 13756 | 13756 |
| 13757 Object visitImportDirective(ImportDirective node) { | 13757 Object visitImportDirective(ImportDirective node) { |
| 13758 _writer.print("import "); | 13758 _writer.print("import "); |
| 13759 visitNode(node.uri); | 13759 _visitNode(node.uri); |
| 13760 visitNodeWithPrefix(" as ", node.prefix); | 13760 _visitNodeWithPrefix(" as ", node.prefix); |
| 13761 visitNodeListWithSeparatorAndPrefix(" ", node.combinators, " "); | 13761 _visitNodeListWithSeparatorAndPrefix(" ", node.combinators, " "); |
| 13762 _writer.print(';'); | 13762 _writer.print(';'); |
| 13763 return null; | 13763 return null; |
| 13764 } | 13764 } |
| 13765 | 13765 |
| 13766 Object visitIndexExpression(IndexExpression node) { | 13766 Object visitIndexExpression(IndexExpression node) { |
| 13767 if (node.isCascaded) { | 13767 if (node.isCascaded) { |
| 13768 _writer.print(".."); | 13768 _writer.print(".."); |
| 13769 } else { | 13769 } else { |
| 13770 visitNode(node.target); | 13770 _visitNode(node.target); |
| 13771 } | 13771 } |
| 13772 _writer.print('['); | 13772 _writer.print('['); |
| 13773 visitNode(node.index); | 13773 _visitNode(node.index); |
| 13774 _writer.print(']'); | 13774 _writer.print(']'); |
| 13775 return null; | 13775 return null; |
| 13776 } | 13776 } |
| 13777 | 13777 |
| 13778 Object visitInstanceCreationExpression(InstanceCreationExpression node) { | 13778 Object visitInstanceCreationExpression(InstanceCreationExpression node) { |
| 13779 visitTokenWithSuffix(node.keyword, " "); | 13779 _visitTokenWithSuffix(node.keyword, " "); |
| 13780 visitNode(node.constructorName); | 13780 _visitNode(node.constructorName); |
| 13781 visitNode(node.argumentList); | 13781 _visitNode(node.argumentList); |
| 13782 return null; | 13782 return null; |
| 13783 } | 13783 } |
| 13784 | 13784 |
| 13785 Object visitIntegerLiteral(IntegerLiteral node) { | 13785 Object visitIntegerLiteral(IntegerLiteral node) { |
| 13786 _writer.print(node.literal.lexeme); | 13786 _writer.print(node.literal.lexeme); |
| 13787 return null; | 13787 return null; |
| 13788 } | 13788 } |
| 13789 | 13789 |
| 13790 Object visitInterpolationExpression(InterpolationExpression node) { | 13790 Object visitInterpolationExpression(InterpolationExpression node) { |
| 13791 if (node.rightBracket != null) { | 13791 if (node.rightBracket != null) { |
| 13792 _writer.print("\${"); | 13792 _writer.print("\${"); |
| 13793 visitNode(node.expression); | 13793 _visitNode(node.expression); |
| 13794 _writer.print("}"); | 13794 _writer.print("}"); |
| 13795 } else { | 13795 } else { |
| 13796 _writer.print("\$"); | 13796 _writer.print("\$"); |
| 13797 visitNode(node.expression); | 13797 _visitNode(node.expression); |
| 13798 } | 13798 } |
| 13799 return null; | 13799 return null; |
| 13800 } | 13800 } |
| 13801 | 13801 |
| 13802 Object visitInterpolationString(InterpolationString node) { | 13802 Object visitInterpolationString(InterpolationString node) { |
| 13803 _writer.print(node.contents.lexeme); | 13803 _writer.print(node.contents.lexeme); |
| 13804 return null; | 13804 return null; |
| 13805 } | 13805 } |
| 13806 | 13806 |
| 13807 Object visitIsExpression(IsExpression node) { | 13807 Object visitIsExpression(IsExpression node) { |
| 13808 visitNode(node.expression); | 13808 _visitNode(node.expression); |
| 13809 if (node.notOperator == null) { | 13809 if (node.notOperator == null) { |
| 13810 _writer.print(" is "); | 13810 _writer.print(" is "); |
| 13811 } else { | 13811 } else { |
| 13812 _writer.print(" is! "); | 13812 _writer.print(" is! "); |
| 13813 } | 13813 } |
| 13814 visitNode(node.type); | 13814 _visitNode(node.type); |
| 13815 return null; | 13815 return null; |
| 13816 } | 13816 } |
| 13817 | 13817 |
| 13818 Object visitLabel(Label node) { | 13818 Object visitLabel(Label node) { |
| 13819 visitNode(node.label); | 13819 _visitNode(node.label); |
| 13820 _writer.print(":"); | 13820 _writer.print(":"); |
| 13821 return null; | 13821 return null; |
| 13822 } | 13822 } |
| 13823 | 13823 |
| 13824 Object visitLabeledStatement(LabeledStatement node) { | 13824 Object visitLabeledStatement(LabeledStatement node) { |
| 13825 visitNodeListWithSeparatorAndSuffix(node.labels, " ", " "); | 13825 _visitNodeListWithSeparatorAndSuffix(node.labels, " ", " "); |
| 13826 visitNode(node.statement); | 13826 _visitNode(node.statement); |
| 13827 return null; | 13827 return null; |
| 13828 } | 13828 } |
| 13829 | 13829 |
| 13830 Object visitLibraryDirective(LibraryDirective node) { | 13830 Object visitLibraryDirective(LibraryDirective node) { |
| 13831 _writer.print("library "); | 13831 _writer.print("library "); |
| 13832 visitNode(node.name); | 13832 _visitNode(node.name); |
| 13833 _writer.print(';'); | 13833 _writer.print(';'); |
| 13834 return null; | 13834 return null; |
| 13835 } | 13835 } |
| 13836 | 13836 |
| 13837 Object visitLibraryIdentifier(LibraryIdentifier node) { | 13837 Object visitLibraryIdentifier(LibraryIdentifier node) { |
| 13838 _writer.print(node.name); | 13838 _writer.print(node.name); |
| 13839 return null; | 13839 return null; |
| 13840 } | 13840 } |
| 13841 | 13841 |
| 13842 Object visitListLiteral(ListLiteral node) { | 13842 Object visitListLiteral(ListLiteral node) { |
| 13843 if (node.constKeyword != null) { | 13843 if (node.constKeyword != null) { |
| 13844 _writer.print(node.constKeyword.lexeme); | 13844 _writer.print(node.constKeyword.lexeme); |
| 13845 _writer.print(' '); | 13845 _writer.print(' '); |
| 13846 } | 13846 } |
| 13847 visitNodeWithSuffix(node.typeArguments, " "); | 13847 _visitNodeWithSuffix(node.typeArguments, " "); |
| 13848 _writer.print("["); | 13848 _writer.print("["); |
| 13849 visitNodeListWithSeparator(node.elements, ", "); | 13849 _visitNodeListWithSeparator(node.elements, ", "); |
| 13850 _writer.print("]"); | 13850 _writer.print("]"); |
| 13851 return null; | 13851 return null; |
| 13852 } | 13852 } |
| 13853 | 13853 |
| 13854 Object visitMapLiteral(MapLiteral node) { | 13854 Object visitMapLiteral(MapLiteral node) { |
| 13855 if (node.constKeyword != null) { | 13855 if (node.constKeyword != null) { |
| 13856 _writer.print(node.constKeyword.lexeme); | 13856 _writer.print(node.constKeyword.lexeme); |
| 13857 _writer.print(' '); | 13857 _writer.print(' '); |
| 13858 } | 13858 } |
| 13859 visitNodeWithSuffix(node.typeArguments, " "); | 13859 _visitNodeWithSuffix(node.typeArguments, " "); |
| 13860 _writer.print("{"); | 13860 _writer.print("{"); |
| 13861 visitNodeListWithSeparator(node.entries, ", "); | 13861 _visitNodeListWithSeparator(node.entries, ", "); |
| 13862 _writer.print("}"); | 13862 _writer.print("}"); |
| 13863 return null; | 13863 return null; |
| 13864 } | 13864 } |
| 13865 | 13865 |
| 13866 Object visitMapLiteralEntry(MapLiteralEntry node) { | 13866 Object visitMapLiteralEntry(MapLiteralEntry node) { |
| 13867 visitNode(node.key); | 13867 _visitNode(node.key); |
| 13868 _writer.print(" : "); | 13868 _writer.print(" : "); |
| 13869 visitNode(node.value); | 13869 _visitNode(node.value); |
| 13870 return null; | 13870 return null; |
| 13871 } | 13871 } |
| 13872 | 13872 |
| 13873 Object visitMethodDeclaration(MethodDeclaration node) { | 13873 Object visitMethodDeclaration(MethodDeclaration node) { |
| 13874 visitTokenWithSuffix(node.externalKeyword, " "); | 13874 _visitTokenWithSuffix(node.externalKeyword, " "); |
| 13875 visitTokenWithSuffix(node.modifierKeyword, " "); | 13875 _visitTokenWithSuffix(node.modifierKeyword, " "); |
| 13876 visitNodeWithSuffix(node.returnType, " "); | 13876 _visitNodeWithSuffix(node.returnType, " "); |
| 13877 visitTokenWithSuffix(node.propertyKeyword, " "); | 13877 _visitTokenWithSuffix(node.propertyKeyword, " "); |
| 13878 visitTokenWithSuffix(node.operatorKeyword, " "); | 13878 _visitTokenWithSuffix(node.operatorKeyword, " "); |
| 13879 visitNode(node.name); | 13879 _visitNode(node.name); |
| 13880 if (!node.isGetter) { | 13880 if (!node.isGetter) { |
| 13881 visitNode(node.parameters); | 13881 _visitNode(node.parameters); |
| 13882 } | 13882 } |
| 13883 visitFunctionWithPrefix(" ", node.body); | 13883 _visitFunctionWithPrefix(" ", node.body); |
| 13884 return null; | 13884 return null; |
| 13885 } | 13885 } |
| 13886 | 13886 |
| 13887 Object visitMethodInvocation(MethodInvocation node) { | 13887 Object visitMethodInvocation(MethodInvocation node) { |
| 13888 if (node.isCascaded) { | 13888 if (node.isCascaded) { |
| 13889 _writer.print(".."); | 13889 _writer.print(".."); |
| 13890 } else { | 13890 } else { |
| 13891 visitNodeWithSuffix(node.target, "."); | 13891 _visitNodeWithSuffix(node.target, "."); |
| 13892 } | 13892 } |
| 13893 visitNode(node.methodName); | 13893 _visitNode(node.methodName); |
| 13894 visitNode(node.argumentList); | 13894 _visitNode(node.argumentList); |
| 13895 return null; | 13895 return null; |
| 13896 } | 13896 } |
| 13897 | 13897 |
| 13898 Object visitNamedExpression(NamedExpression node) { | 13898 Object visitNamedExpression(NamedExpression node) { |
| 13899 visitNode(node.name); | 13899 _visitNode(node.name); |
| 13900 visitNodeWithPrefix(" ", node.expression); | 13900 _visitNodeWithPrefix(" ", node.expression); |
| 13901 return null; | 13901 return null; |
| 13902 } | 13902 } |
| 13903 | 13903 |
| 13904 Object visitNativeClause(NativeClause node) { | 13904 Object visitNativeClause(NativeClause node) { |
| 13905 _writer.print("native "); | 13905 _writer.print("native "); |
| 13906 visitNode(node.name); | 13906 _visitNode(node.name); |
| 13907 return null; | 13907 return null; |
| 13908 } | 13908 } |
| 13909 | 13909 |
| 13910 Object visitNativeFunctionBody(NativeFunctionBody node) { | 13910 Object visitNativeFunctionBody(NativeFunctionBody node) { |
| 13911 _writer.print("native "); | 13911 _writer.print("native "); |
| 13912 visitNode(node.stringLiteral); | 13912 _visitNode(node.stringLiteral); |
| 13913 _writer.print(';'); | 13913 _writer.print(';'); |
| 13914 return null; | 13914 return null; |
| 13915 } | 13915 } |
| 13916 | 13916 |
| 13917 Object visitNullLiteral(NullLiteral node) { | 13917 Object visitNullLiteral(NullLiteral node) { |
| 13918 _writer.print("null"); | 13918 _writer.print("null"); |
| 13919 return null; | 13919 return null; |
| 13920 } | 13920 } |
| 13921 | 13921 |
| 13922 Object visitParenthesizedExpression(ParenthesizedExpression node) { | 13922 Object visitParenthesizedExpression(ParenthesizedExpression node) { |
| 13923 _writer.print('('); | 13923 _writer.print('('); |
| 13924 visitNode(node.expression); | 13924 _visitNode(node.expression); |
| 13925 _writer.print(')'); | 13925 _writer.print(')'); |
| 13926 return null; | 13926 return null; |
| 13927 } | 13927 } |
| 13928 | 13928 |
| 13929 Object visitPartDirective(PartDirective node) { | 13929 Object visitPartDirective(PartDirective node) { |
| 13930 _writer.print("part "); | 13930 _writer.print("part "); |
| 13931 visitNode(node.uri); | 13931 _visitNode(node.uri); |
| 13932 _writer.print(';'); | 13932 _writer.print(';'); |
| 13933 return null; | 13933 return null; |
| 13934 } | 13934 } |
| 13935 | 13935 |
| 13936 Object visitPartOfDirective(PartOfDirective node) { | 13936 Object visitPartOfDirective(PartOfDirective node) { |
| 13937 _writer.print("part of "); | 13937 _writer.print("part of "); |
| 13938 visitNode(node.libraryName); | 13938 _visitNode(node.libraryName); |
| 13939 _writer.print(';'); | 13939 _writer.print(';'); |
| 13940 return null; | 13940 return null; |
| 13941 } | 13941 } |
| 13942 | 13942 |
| 13943 Object visitPostfixExpression(PostfixExpression node) { | 13943 Object visitPostfixExpression(PostfixExpression node) { |
| 13944 visitNode(node.operand); | 13944 _visitNode(node.operand); |
| 13945 _writer.print(node.operator.lexeme); | 13945 _writer.print(node.operator.lexeme); |
| 13946 return null; | 13946 return null; |
| 13947 } | 13947 } |
| 13948 | 13948 |
| 13949 Object visitPrefixedIdentifier(PrefixedIdentifier node) { | 13949 Object visitPrefixedIdentifier(PrefixedIdentifier node) { |
| 13950 visitNode(node.prefix); | 13950 _visitNode(node.prefix); |
| 13951 _writer.print('.'); | 13951 _writer.print('.'); |
| 13952 visitNode(node.identifier); | 13952 _visitNode(node.identifier); |
| 13953 return null; | 13953 return null; |
| 13954 } | 13954 } |
| 13955 | 13955 |
| 13956 Object visitPrefixExpression(PrefixExpression node) { | 13956 Object visitPrefixExpression(PrefixExpression node) { |
| 13957 _writer.print(node.operator.lexeme); | 13957 _writer.print(node.operator.lexeme); |
| 13958 visitNode(node.operand); | 13958 _visitNode(node.operand); |
| 13959 return null; | 13959 return null; |
| 13960 } | 13960 } |
| 13961 | 13961 |
| 13962 Object visitPropertyAccess(PropertyAccess node) { | 13962 Object visitPropertyAccess(PropertyAccess node) { |
| 13963 if (node.isCascaded) { | 13963 if (node.isCascaded) { |
| 13964 _writer.print(".."); | 13964 _writer.print(".."); |
| 13965 } else { | 13965 } else { |
| 13966 visitNode(node.target); | 13966 _visitNode(node.target); |
| 13967 _writer.print('.'); | 13967 _writer.print('.'); |
| 13968 } | 13968 } |
| 13969 visitNode(node.propertyName); | 13969 _visitNode(node.propertyName); |
| 13970 return null; | 13970 return null; |
| 13971 } | 13971 } |
| 13972 | 13972 |
| 13973 Object visitRedirectingConstructorInvocation(RedirectingConstructorInvocation
node) { | 13973 Object visitRedirectingConstructorInvocation(RedirectingConstructorInvocation
node) { |
| 13974 _writer.print("this"); | 13974 _writer.print("this"); |
| 13975 visitNodeWithPrefix(".", node.constructorName); | 13975 _visitNodeWithPrefix(".", node.constructorName); |
| 13976 visitNode(node.argumentList); | 13976 _visitNode(node.argumentList); |
| 13977 return null; | 13977 return null; |
| 13978 } | 13978 } |
| 13979 | 13979 |
| 13980 Object visitRethrowExpression(RethrowExpression node) { | 13980 Object visitRethrowExpression(RethrowExpression node) { |
| 13981 _writer.print("rethrow"); | 13981 _writer.print("rethrow"); |
| 13982 return null; | 13982 return null; |
| 13983 } | 13983 } |
| 13984 | 13984 |
| 13985 Object visitReturnStatement(ReturnStatement node) { | 13985 Object visitReturnStatement(ReturnStatement node) { |
| 13986 Expression expression = node.expression; | 13986 Expression expression = node.expression; |
| 13987 if (expression == null) { | 13987 if (expression == null) { |
| 13988 _writer.print("return;"); | 13988 _writer.print("return;"); |
| 13989 } else { | 13989 } else { |
| 13990 _writer.print("return "); | 13990 _writer.print("return "); |
| 13991 expression.accept(this); | 13991 expression.accept(this); |
| 13992 _writer.print(";"); | 13992 _writer.print(";"); |
| 13993 } | 13993 } |
| 13994 return null; | 13994 return null; |
| 13995 } | 13995 } |
| 13996 | 13996 |
| 13997 Object visitScriptTag(ScriptTag node) { | 13997 Object visitScriptTag(ScriptTag node) { |
| 13998 _writer.print(node.scriptTag.lexeme); | 13998 _writer.print(node.scriptTag.lexeme); |
| 13999 return null; | 13999 return null; |
| 14000 } | 14000 } |
| 14001 | 14001 |
| 14002 Object visitShowCombinator(ShowCombinator node) { | 14002 Object visitShowCombinator(ShowCombinator node) { |
| 14003 _writer.print("show "); | 14003 _writer.print("show "); |
| 14004 visitNodeListWithSeparator(node.shownNames, ", "); | 14004 _visitNodeListWithSeparator(node.shownNames, ", "); |
| 14005 return null; | 14005 return null; |
| 14006 } | 14006 } |
| 14007 | 14007 |
| 14008 Object visitSimpleFormalParameter(SimpleFormalParameter node) { | 14008 Object visitSimpleFormalParameter(SimpleFormalParameter node) { |
| 14009 visitTokenWithSuffix(node.keyword, " "); | 14009 _visitTokenWithSuffix(node.keyword, " "); |
| 14010 visitNodeWithSuffix(node.type, " "); | 14010 _visitNodeWithSuffix(node.type, " "); |
| 14011 visitNode(node.identifier); | 14011 _visitNode(node.identifier); |
| 14012 return null; | 14012 return null; |
| 14013 } | 14013 } |
| 14014 | 14014 |
| 14015 Object visitSimpleIdentifier(SimpleIdentifier node) { | 14015 Object visitSimpleIdentifier(SimpleIdentifier node) { |
| 14016 _writer.print(node.token.lexeme); | 14016 _writer.print(node.token.lexeme); |
| 14017 return null; | 14017 return null; |
| 14018 } | 14018 } |
| 14019 | 14019 |
| 14020 Object visitSimpleStringLiteral(SimpleStringLiteral node) { | 14020 Object visitSimpleStringLiteral(SimpleStringLiteral node) { |
| 14021 _writer.print(node.literal.lexeme); | 14021 _writer.print(node.literal.lexeme); |
| 14022 return null; | 14022 return null; |
| 14023 } | 14023 } |
| 14024 | 14024 |
| 14025 Object visitStringInterpolation(StringInterpolation node) { | 14025 Object visitStringInterpolation(StringInterpolation node) { |
| 14026 visitNodeList(node.elements); | 14026 _visitNodeList(node.elements); |
| 14027 return null; | 14027 return null; |
| 14028 } | 14028 } |
| 14029 | 14029 |
| 14030 Object visitSuperConstructorInvocation(SuperConstructorInvocation node) { | 14030 Object visitSuperConstructorInvocation(SuperConstructorInvocation node) { |
| 14031 _writer.print("super"); | 14031 _writer.print("super"); |
| 14032 visitNodeWithPrefix(".", node.constructorName); | 14032 _visitNodeWithPrefix(".", node.constructorName); |
| 14033 visitNode(node.argumentList); | 14033 _visitNode(node.argumentList); |
| 14034 return null; | 14034 return null; |
| 14035 } | 14035 } |
| 14036 | 14036 |
| 14037 Object visitSuperExpression(SuperExpression node) { | 14037 Object visitSuperExpression(SuperExpression node) { |
| 14038 _writer.print("super"); | 14038 _writer.print("super"); |
| 14039 return null; | 14039 return null; |
| 14040 } | 14040 } |
| 14041 | 14041 |
| 14042 Object visitSwitchCase(SwitchCase node) { | 14042 Object visitSwitchCase(SwitchCase node) { |
| 14043 visitNodeListWithSeparatorAndSuffix(node.labels, " ", " "); | 14043 _visitNodeListWithSeparatorAndSuffix(node.labels, " ", " "); |
| 14044 _writer.print("case "); | 14044 _writer.print("case "); |
| 14045 visitNode(node.expression); | 14045 _visitNode(node.expression); |
| 14046 _writer.print(": "); | 14046 _writer.print(": "); |
| 14047 visitNodeListWithSeparator(node.statements, " "); | 14047 _visitNodeListWithSeparator(node.statements, " "); |
| 14048 return null; | 14048 return null; |
| 14049 } | 14049 } |
| 14050 | 14050 |
| 14051 Object visitSwitchDefault(SwitchDefault node) { | 14051 Object visitSwitchDefault(SwitchDefault node) { |
| 14052 visitNodeListWithSeparatorAndSuffix(node.labels, " ", " "); | 14052 _visitNodeListWithSeparatorAndSuffix(node.labels, " ", " "); |
| 14053 _writer.print("default: "); | 14053 _writer.print("default: "); |
| 14054 visitNodeListWithSeparator(node.statements, " "); | 14054 _visitNodeListWithSeparator(node.statements, " "); |
| 14055 return null; | 14055 return null; |
| 14056 } | 14056 } |
| 14057 | 14057 |
| 14058 Object visitSwitchStatement(SwitchStatement node) { | 14058 Object visitSwitchStatement(SwitchStatement node) { |
| 14059 _writer.print("switch ("); | 14059 _writer.print("switch ("); |
| 14060 visitNode(node.expression); | 14060 _visitNode(node.expression); |
| 14061 _writer.print(") {"); | 14061 _writer.print(") {"); |
| 14062 visitNodeListWithSeparator(node.members, " "); | 14062 _visitNodeListWithSeparator(node.members, " "); |
| 14063 _writer.print("}"); | 14063 _writer.print("}"); |
| 14064 return null; | 14064 return null; |
| 14065 } | 14065 } |
| 14066 | 14066 |
| 14067 Object visitSymbolLiteral(SymbolLiteral node) { | 14067 Object visitSymbolLiteral(SymbolLiteral node) { |
| 14068 _writer.print("#"); | 14068 _writer.print("#"); |
| 14069 List<Token> components = node.components; | 14069 List<Token> components = node.components; |
| 14070 for (int i = 0; i < components.length; i++) { | 14070 for (int i = 0; i < components.length; i++) { |
| 14071 if (i > 0) { | 14071 if (i > 0) { |
| 14072 _writer.print("."); | 14072 _writer.print("."); |
| 14073 } | 14073 } |
| 14074 _writer.print(components[i].lexeme); | 14074 _writer.print(components[i].lexeme); |
| 14075 } | 14075 } |
| 14076 return null; | 14076 return null; |
| 14077 } | 14077 } |
| 14078 | 14078 |
| 14079 Object visitThisExpression(ThisExpression node) { | 14079 Object visitThisExpression(ThisExpression node) { |
| 14080 _writer.print("this"); | 14080 _writer.print("this"); |
| 14081 return null; | 14081 return null; |
| 14082 } | 14082 } |
| 14083 | 14083 |
| 14084 Object visitThrowExpression(ThrowExpression node) { | 14084 Object visitThrowExpression(ThrowExpression node) { |
| 14085 _writer.print("throw "); | 14085 _writer.print("throw "); |
| 14086 visitNode(node.expression); | 14086 _visitNode(node.expression); |
| 14087 return null; | 14087 return null; |
| 14088 } | 14088 } |
| 14089 | 14089 |
| 14090 Object visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) { | 14090 Object visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) { |
| 14091 visitNodeWithSuffix(node.variables, ";"); | 14091 _visitNodeWithSuffix(node.variables, ";"); |
| 14092 return null; | 14092 return null; |
| 14093 } | 14093 } |
| 14094 | 14094 |
| 14095 Object visitTryStatement(TryStatement node) { | 14095 Object visitTryStatement(TryStatement node) { |
| 14096 _writer.print("try "); | 14096 _writer.print("try "); |
| 14097 visitNode(node.body); | 14097 _visitNode(node.body); |
| 14098 visitNodeListWithSeparatorAndPrefix(" ", node.catchClauses, " "); | 14098 _visitNodeListWithSeparatorAndPrefix(" ", node.catchClauses, " "); |
| 14099 visitNodeWithPrefix(" finally ", node.finallyBlock); | 14099 _visitNodeWithPrefix(" finally ", node.finallyBlock); |
| 14100 return null; | 14100 return null; |
| 14101 } | 14101 } |
| 14102 | 14102 |
| 14103 Object visitTypeArgumentList(TypeArgumentList node) { | 14103 Object visitTypeArgumentList(TypeArgumentList node) { |
| 14104 _writer.print('<'); | 14104 _writer.print('<'); |
| 14105 visitNodeListWithSeparator(node.arguments, ", "); | 14105 _visitNodeListWithSeparator(node.arguments, ", "); |
| 14106 _writer.print('>'); | 14106 _writer.print('>'); |
| 14107 return null; | 14107 return null; |
| 14108 } | 14108 } |
| 14109 | 14109 |
| 14110 Object visitTypeName(TypeName node) { | 14110 Object visitTypeName(TypeName node) { |
| 14111 visitNode(node.name); | 14111 _visitNode(node.name); |
| 14112 visitNode(node.typeArguments); | 14112 _visitNode(node.typeArguments); |
| 14113 return null; | 14113 return null; |
| 14114 } | 14114 } |
| 14115 | 14115 |
| 14116 Object visitTypeParameter(TypeParameter node) { | 14116 Object visitTypeParameter(TypeParameter node) { |
| 14117 visitNode(node.name); | 14117 _visitNode(node.name); |
| 14118 visitNodeWithPrefix(" extends ", node.bound); | 14118 _visitNodeWithPrefix(" extends ", node.bound); |
| 14119 return null; | 14119 return null; |
| 14120 } | 14120 } |
| 14121 | 14121 |
| 14122 Object visitTypeParameterList(TypeParameterList node) { | 14122 Object visitTypeParameterList(TypeParameterList node) { |
| 14123 _writer.print('<'); | 14123 _writer.print('<'); |
| 14124 visitNodeListWithSeparator(node.typeParameters, ", "); | 14124 _visitNodeListWithSeparator(node.typeParameters, ", "); |
| 14125 _writer.print('>'); | 14125 _writer.print('>'); |
| 14126 return null; | 14126 return null; |
| 14127 } | 14127 } |
| 14128 | 14128 |
| 14129 Object visitVariableDeclaration(VariableDeclaration node) { | 14129 Object visitVariableDeclaration(VariableDeclaration node) { |
| 14130 visitNode(node.name); | 14130 _visitNode(node.name); |
| 14131 visitNodeWithPrefix(" = ", node.initializer); | 14131 _visitNodeWithPrefix(" = ", node.initializer); |
| 14132 return null; | 14132 return null; |
| 14133 } | 14133 } |
| 14134 | 14134 |
| 14135 Object visitVariableDeclarationList(VariableDeclarationList node) { | 14135 Object visitVariableDeclarationList(VariableDeclarationList node) { |
| 14136 visitTokenWithSuffix(node.keyword, " "); | 14136 _visitTokenWithSuffix(node.keyword, " "); |
| 14137 visitNodeWithSuffix(node.type, " "); | 14137 _visitNodeWithSuffix(node.type, " "); |
| 14138 visitNodeListWithSeparator(node.variables, ", "); | 14138 _visitNodeListWithSeparator(node.variables, ", "); |
| 14139 return null; | 14139 return null; |
| 14140 } | 14140 } |
| 14141 | 14141 |
| 14142 Object visitVariableDeclarationStatement(VariableDeclarationStatement node) { | 14142 Object visitVariableDeclarationStatement(VariableDeclarationStatement node) { |
| 14143 visitNode(node.variables); | 14143 _visitNode(node.variables); |
| 14144 _writer.print(";"); | 14144 _writer.print(";"); |
| 14145 return null; | 14145 return null; |
| 14146 } | 14146 } |
| 14147 | 14147 |
| 14148 Object visitWhileStatement(WhileStatement node) { | 14148 Object visitWhileStatement(WhileStatement node) { |
| 14149 _writer.print("while ("); | 14149 _writer.print("while ("); |
| 14150 visitNode(node.condition); | 14150 _visitNode(node.condition); |
| 14151 _writer.print(") "); | 14151 _writer.print(") "); |
| 14152 visitNode(node.body); | 14152 _visitNode(node.body); |
| 14153 return null; | 14153 return null; |
| 14154 } | 14154 } |
| 14155 | 14155 |
| 14156 Object visitWithClause(WithClause node) { | 14156 Object visitWithClause(WithClause node) { |
| 14157 _writer.print("with "); | 14157 _writer.print("with "); |
| 14158 visitNodeListWithSeparator(node.mixinTypes, ", "); | 14158 _visitNodeListWithSeparator(node.mixinTypes, ", "); |
| 14159 return null; | 14159 return null; |
| 14160 } | 14160 } |
| 14161 | 14161 |
| 14162 /** | 14162 /** |
| 14163 * Visit the given function body, printing the prefix before if given body is
not empty. | 14163 * Visit the given function body, printing the prefix before if given body is
not empty. |
| 14164 * | 14164 * |
| 14165 * @param prefix the prefix to be printed if there is a node to visit | 14165 * @param prefix the prefix to be printed if there is a node to visit |
| 14166 * @param body the function body to be visited | 14166 * @param body the function body to be visited |
| 14167 */ | 14167 */ |
| 14168 void visitFunctionWithPrefix(String prefix, FunctionBody body) { | 14168 void _visitFunctionWithPrefix(String prefix, FunctionBody body) { |
| 14169 if (body is! EmptyFunctionBody) { | 14169 if (body is! EmptyFunctionBody) { |
| 14170 _writer.print(prefix); | 14170 _writer.print(prefix); |
| 14171 } | 14171 } |
| 14172 visitNode(body); | 14172 _visitNode(body); |
| 14173 } | 14173 } |
| 14174 | 14174 |
| 14175 /** | 14175 /** |
| 14176 * Safely visit the given node. | 14176 * Safely visit the given node. |
| 14177 * | 14177 * |
| 14178 * @param node the node to be visited | 14178 * @param node the node to be visited |
| 14179 */ | 14179 */ |
| 14180 void visitNode(AstNode node) { | 14180 void _visitNode(AstNode node) { |
| 14181 if (node != null) { | 14181 if (node != null) { |
| 14182 node.accept(this); | 14182 node.accept(this); |
| 14183 } | 14183 } |
| 14184 } | 14184 } |
| 14185 | 14185 |
| 14186 /** | 14186 /** |
| 14187 * Print a list of nodes without any separation. | 14187 * Print a list of nodes without any separation. |
| 14188 * | 14188 * |
| 14189 * @param nodes the nodes to be printed | 14189 * @param nodes the nodes to be printed |
| 14190 * @param separator the separator to be printed between adjacent nodes | 14190 * @param separator the separator to be printed between adjacent nodes |
| 14191 */ | 14191 */ |
| 14192 void visitNodeList(NodeList<AstNode> nodes) { | 14192 void _visitNodeList(NodeList<AstNode> nodes) { |
| 14193 visitNodeListWithSeparator(nodes, ""); | 14193 _visitNodeListWithSeparator(nodes, ""); |
| 14194 } | 14194 } |
| 14195 | 14195 |
| 14196 /** | 14196 /** |
| 14197 * Print a list of nodes, separated by the given separator. | 14197 * Print a list of nodes, separated by the given separator. |
| 14198 * | 14198 * |
| 14199 * @param nodes the nodes to be printed | 14199 * @param nodes the nodes to be printed |
| 14200 * @param separator the separator to be printed between adjacent nodes | 14200 * @param separator the separator to be printed between adjacent nodes |
| 14201 */ | 14201 */ |
| 14202 void visitNodeListWithSeparator(NodeList<AstNode> nodes, String separator) { | 14202 void _visitNodeListWithSeparator(NodeList<AstNode> nodes, String separator) { |
| 14203 if (nodes != null) { | 14203 if (nodes != null) { |
| 14204 int size = nodes.length; | 14204 int size = nodes.length; |
| 14205 for (int i = 0; i < size; i++) { | 14205 for (int i = 0; i < size; i++) { |
| 14206 if (i > 0) { | 14206 if (i > 0) { |
| 14207 _writer.print(separator); | 14207 _writer.print(separator); |
| 14208 } | 14208 } |
| 14209 nodes[i].accept(this); | 14209 nodes[i].accept(this); |
| 14210 } | 14210 } |
| 14211 } | 14211 } |
| 14212 } | 14212 } |
| 14213 | 14213 |
| 14214 /** | 14214 /** |
| 14215 * Print a list of nodes, separated by the given separator. | 14215 * Print a list of nodes, separated by the given separator. |
| 14216 * | 14216 * |
| 14217 * @param prefix the prefix to be printed if the list is not empty | 14217 * @param prefix the prefix to be printed if the list is not empty |
| 14218 * @param nodes the nodes to be printed | 14218 * @param nodes the nodes to be printed |
| 14219 * @param separator the separator to be printed between adjacent nodes | 14219 * @param separator the separator to be printed between adjacent nodes |
| 14220 */ | 14220 */ |
| 14221 void visitNodeListWithSeparatorAndPrefix(String prefix, NodeList<AstNode> node
s, String separator) { | 14221 void _visitNodeListWithSeparatorAndPrefix(String prefix, NodeList<AstNode> nod
es, String separator) { |
| 14222 if (nodes != null) { | 14222 if (nodes != null) { |
| 14223 int size = nodes.length; | 14223 int size = nodes.length; |
| 14224 if (size > 0) { | 14224 if (size > 0) { |
| 14225 _writer.print(prefix); | 14225 _writer.print(prefix); |
| 14226 for (int i = 0; i < size; i++) { | 14226 for (int i = 0; i < size; i++) { |
| 14227 if (i > 0) { | 14227 if (i > 0) { |
| 14228 _writer.print(separator); | 14228 _writer.print(separator); |
| 14229 } | 14229 } |
| 14230 nodes[i].accept(this); | 14230 nodes[i].accept(this); |
| 14231 } | 14231 } |
| 14232 } | 14232 } |
| 14233 } | 14233 } |
| 14234 } | 14234 } |
| 14235 | 14235 |
| 14236 /** | 14236 /** |
| 14237 * Print a list of nodes, separated by the given separator. | 14237 * Print a list of nodes, separated by the given separator. |
| 14238 * | 14238 * |
| 14239 * @param nodes the nodes to be printed | 14239 * @param nodes the nodes to be printed |
| 14240 * @param separator the separator to be printed between adjacent nodes | 14240 * @param separator the separator to be printed between adjacent nodes |
| 14241 * @param suffix the suffix to be printed if the list is not empty | 14241 * @param suffix the suffix to be printed if the list is not empty |
| 14242 */ | 14242 */ |
| 14243 void visitNodeListWithSeparatorAndSuffix(NodeList<AstNode> nodes, String separ
ator, String suffix) { | 14243 void _visitNodeListWithSeparatorAndSuffix(NodeList<AstNode> nodes, String sepa
rator, String suffix) { |
| 14244 if (nodes != null) { | 14244 if (nodes != null) { |
| 14245 int size = nodes.length; | 14245 int size = nodes.length; |
| 14246 if (size > 0) { | 14246 if (size > 0) { |
| 14247 for (int i = 0; i < size; i++) { | 14247 for (int i = 0; i < size; i++) { |
| 14248 if (i > 0) { | 14248 if (i > 0) { |
| 14249 _writer.print(separator); | 14249 _writer.print(separator); |
| 14250 } | 14250 } |
| 14251 nodes[i].accept(this); | 14251 nodes[i].accept(this); |
| 14252 } | 14252 } |
| 14253 _writer.print(suffix); | 14253 _writer.print(suffix); |
| 14254 } | 14254 } |
| 14255 } | 14255 } |
| 14256 } | 14256 } |
| 14257 | 14257 |
| 14258 /** | 14258 /** |
| 14259 * Safely visit the given node, printing the prefix before the node if it is n
on-`null`. | 14259 * Safely visit the given node, printing the prefix before the node if it is n
on-`null`. |
| 14260 * | 14260 * |
| 14261 * @param prefix the prefix to be printed if there is a node to visit | 14261 * @param prefix the prefix to be printed if there is a node to visit |
| 14262 * @param node the node to be visited | 14262 * @param node the node to be visited |
| 14263 */ | 14263 */ |
| 14264 void visitNodeWithPrefix(String prefix, AstNode node) { | 14264 void _visitNodeWithPrefix(String prefix, AstNode node) { |
| 14265 if (node != null) { | 14265 if (node != null) { |
| 14266 _writer.print(prefix); | 14266 _writer.print(prefix); |
| 14267 node.accept(this); | 14267 node.accept(this); |
| 14268 } | 14268 } |
| 14269 } | 14269 } |
| 14270 | 14270 |
| 14271 /** | 14271 /** |
| 14272 * Safely visit the given node, printing the suffix after the node if it is no
n-`null`. | 14272 * Safely visit the given node, printing the suffix after the node if it is no
n-`null`. |
| 14273 * | 14273 * |
| 14274 * @param suffix the suffix to be printed if there is a node to visit | 14274 * @param suffix the suffix to be printed if there is a node to visit |
| 14275 * @param node the node to be visited | 14275 * @param node the node to be visited |
| 14276 */ | 14276 */ |
| 14277 void visitNodeWithSuffix(AstNode node, String suffix) { | 14277 void _visitNodeWithSuffix(AstNode node, String suffix) { |
| 14278 if (node != null) { | 14278 if (node != null) { |
| 14279 node.accept(this); | 14279 node.accept(this); |
| 14280 _writer.print(suffix); | 14280 _writer.print(suffix); |
| 14281 } | 14281 } |
| 14282 } | 14282 } |
| 14283 | 14283 |
| 14284 /** | 14284 /** |
| 14285 * Safely visit the given node, printing the suffix after the node if it is no
n-`null`. | 14285 * Safely visit the given node, printing the suffix after the node if it is no
n-`null`. |
| 14286 * | 14286 * |
| 14287 * @param suffix the suffix to be printed if there is a node to visit | 14287 * @param suffix the suffix to be printed if there is a node to visit |
| 14288 * @param node the node to be visited | 14288 * @param node the node to be visited |
| 14289 */ | 14289 */ |
| 14290 void visitTokenWithSuffix(Token token, String suffix) { | 14290 void _visitTokenWithSuffix(Token token, String suffix) { |
| 14291 if (token != null) { | 14291 if (token != null) { |
| 14292 _writer.print(token.lexeme); | 14292 _writer.print(token.lexeme); |
| 14293 _writer.print(suffix); | 14293 _writer.print(suffix); |
| 14294 } | 14294 } |
| 14295 } | 14295 } |
| 14296 } | 14296 } |
| 14297 | 14297 |
| 14298 /** | 14298 /** |
| 14299 * Instances of the class `UnifyingAstVisitor` implement an AST visitor that wil
l recursively | 14299 * Instances of the class `UnifyingAstVisitor` implement an AST visitor that wil
l recursively |
| 14300 * visit all of the nodes in an AST structure (like instances of the class | 14300 * visit all of the nodes in an AST structure (like instances of the class |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14517 | 14517 |
| 14518 R visitWithClause(WithClause node) => visitNode(node); | 14518 R visitWithClause(WithClause node) => visitNode(node); |
| 14519 } | 14519 } |
| 14520 | 14520 |
| 14521 /** | 14521 /** |
| 14522 * Instances of the class `AstCloner` implement an object that will clone any AS
T structure | 14522 * Instances of the class `AstCloner` implement an object that will clone any AS
T structure |
| 14523 * that it visits. The cloner will only clone the structure, it will not preserv
e any resolution | 14523 * that it visits. The cloner will only clone the structure, it will not preserv
e any resolution |
| 14524 * results or properties associated with the nodes. | 14524 * results or properties associated with the nodes. |
| 14525 */ | 14525 */ |
| 14526 class AstCloner implements AstVisitor<AstNode> { | 14526 class AstCloner implements AstVisitor<AstNode> { |
| 14527 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => new AdjacentStri
ngs(cloneNodeList(node.strings)); | 14527 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => new AdjacentStri
ngs(_cloneNodeList(node.strings)); |
| 14528 | 14528 |
| 14529 Annotation visitAnnotation(Annotation node) => new Annotation(node.atSign, clo
neNode(node.name), node.period, cloneNode(node.constructorName), cloneNode(node.
arguments)); | 14529 Annotation visitAnnotation(Annotation node) => new Annotation(node.atSign, _cl
oneNode(node.name), node.period, _cloneNode(node.constructorName), _cloneNode(no
de.arguments)); |
| 14530 | 14530 |
| 14531 ArgumentDefinitionTest visitArgumentDefinitionTest(ArgumentDefinitionTest node
) => new ArgumentDefinitionTest(node.question, cloneNode(node.identifier)); | 14531 ArgumentDefinitionTest visitArgumentDefinitionTest(ArgumentDefinitionTest node
) => new ArgumentDefinitionTest(node.question, _cloneNode(node.identifier)); |
| 14532 | 14532 |
| 14533 ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList(node.lef
tParenthesis, cloneNodeList(node.arguments), node.rightParenthesis); | 14533 ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList(node.lef
tParenthesis, _cloneNodeList(node.arguments), node.rightParenthesis); |
| 14534 | 14534 |
| 14535 AsExpression visitAsExpression(AsExpression node) => new AsExpression(cloneNod
e(node.expression), node.asOperator, cloneNode(node.type)); | 14535 AsExpression visitAsExpression(AsExpression node) => new AsExpression(_cloneNo
de(node.expression), node.asOperator, _cloneNode(node.type)); |
| 14536 | 14536 |
| 14537 AstNode visitAssertStatement(AssertStatement node) => new AssertStatement(node
.keyword, node.leftParenthesis, cloneNode(node.condition), node.rightParenthesis
, node.semicolon); | 14537 AstNode visitAssertStatement(AssertStatement node) => new AssertStatement(node
.keyword, node.leftParenthesis, _cloneNode(node.condition), node.rightParenthesi
s, node.semicolon); |
| 14538 | 14538 |
| 14539 AssignmentExpression visitAssignmentExpression(AssignmentExpression node) => n
ew AssignmentExpression(cloneNode(node.leftHandSide), node.operator, cloneNode(n
ode.rightHandSide)); | 14539 AssignmentExpression visitAssignmentExpression(AssignmentExpression node) => n
ew AssignmentExpression(_cloneNode(node.leftHandSide), node.operator, _cloneNode
(node.rightHandSide)); |
| 14540 | 14540 |
| 14541 BinaryExpression visitBinaryExpression(BinaryExpression node) => new BinaryExp
ression(cloneNode(node.leftOperand), node.operator, cloneNode(node.rightOperand)
); | 14541 BinaryExpression visitBinaryExpression(BinaryExpression node) => new BinaryExp
ression(_cloneNode(node.leftOperand), node.operator, _cloneNode(node.rightOperan
d)); |
| 14542 | 14542 |
| 14543 Block visitBlock(Block node) => new Block(node.leftBracket, cloneNodeList(node
.statements), node.rightBracket); | 14543 Block visitBlock(Block node) => new Block(node.leftBracket, _cloneNodeList(nod
e.statements), node.rightBracket); |
| 14544 | 14544 |
| 14545 BlockFunctionBody visitBlockFunctionBody(BlockFunctionBody node) => new BlockF
unctionBody(cloneNode(node.block)); | 14545 BlockFunctionBody visitBlockFunctionBody(BlockFunctionBody node) => new BlockF
unctionBody(_cloneNode(node.block)); |
| 14546 | 14546 |
| 14547 BooleanLiteral visitBooleanLiteral(BooleanLiteral node) => new BooleanLiteral(
node.literal, node.value); | 14547 BooleanLiteral visitBooleanLiteral(BooleanLiteral node) => new BooleanLiteral(
node.literal, node.value); |
| 14548 | 14548 |
| 14549 BreakStatement visitBreakStatement(BreakStatement node) => new BreakStatement(
node.keyword, cloneNode(node.label), node.semicolon); | 14549 BreakStatement visitBreakStatement(BreakStatement node) => new BreakStatement(
node.keyword, _cloneNode(node.label), node.semicolon); |
| 14550 | 14550 |
| 14551 CascadeExpression visitCascadeExpression(CascadeExpression node) => new Cascad
eExpression(cloneNode(node.target), cloneNodeList(node.cascadeSections)); | 14551 CascadeExpression visitCascadeExpression(CascadeExpression node) => new Cascad
eExpression(_cloneNode(node.target), _cloneNodeList(node.cascadeSections)); |
| 14552 | 14552 |
| 14553 CatchClause visitCatchClause(CatchClause node) => new CatchClause(node.onKeywo
rd, cloneNode(node.exceptionType), node.catchKeyword, node.leftParenthesis, clon
eNode(node.exceptionParameter), node.comma, cloneNode(node.stackTraceParameter),
node.rightParenthesis, cloneNode(node.body)); | 14553 CatchClause visitCatchClause(CatchClause node) => new CatchClause(node.onKeywo
rd, _cloneNode(node.exceptionType), node.catchKeyword, node.leftParenthesis, _cl
oneNode(node.exceptionParameter), node.comma, _cloneNode(node.stackTraceParamete
r), node.rightParenthesis, _cloneNode(node.body)); |
| 14554 | 14554 |
| 14555 ClassDeclaration visitClassDeclaration(ClassDeclaration node) { | 14555 ClassDeclaration visitClassDeclaration(ClassDeclaration node) { |
| 14556 ClassDeclaration copy = new ClassDeclaration(cloneNode(node.documentationCom
ment), cloneNodeList(node.metadata), node.abstractKeyword, node.classKeyword, cl
oneNode(node.name), cloneNode(node.typeParameters), cloneNode(node.extendsClause
), cloneNode(node.withClause), cloneNode(node.implementsClause), node.leftBracke
t, cloneNodeList(node.members), node.rightBracket); | 14556 ClassDeclaration copy = new ClassDeclaration(_cloneNode(node.documentationCo
mment), _cloneNodeList(node.metadata), node.abstractKeyword, node.classKeyword,
_cloneNode(node.name), _cloneNode(node.typeParameters), _cloneNode(node.extendsC
lause), _cloneNode(node.withClause), _cloneNode(node.implementsClause), node.lef
tBracket, _cloneNodeList(node.members), node.rightBracket); |
| 14557 copy.nativeClause = cloneNode(node.nativeClause); | 14557 copy.nativeClause = _cloneNode(node.nativeClause); |
| 14558 return copy; | 14558 return copy; |
| 14559 } | 14559 } |
| 14560 | 14560 |
| 14561 ClassTypeAlias visitClassTypeAlias(ClassTypeAlias node) => new ClassTypeAlias(
cloneNode(node.documentationComment), cloneNodeList(node.metadata), node.keyword
, cloneNode(node.name), cloneNode(node.typeParameters), node.equals, node.abstra
ctKeyword, cloneNode(node.superclass), cloneNode(node.withClause), cloneNode(nod
e.implementsClause), node.semicolon); | 14561 ClassTypeAlias visitClassTypeAlias(ClassTypeAlias node) => new ClassTypeAlias(
_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), node.keywo
rd, _cloneNode(node.name), _cloneNode(node.typeParameters), node.equals, node.ab
stractKeyword, _cloneNode(node.superclass), _cloneNode(node.withClause), _cloneN
ode(node.implementsClause), node.semicolon); |
| 14562 | 14562 |
| 14563 Comment visitComment(Comment node) { | 14563 Comment visitComment(Comment node) { |
| 14564 if (node.isDocumentation) { | 14564 if (node.isDocumentation) { |
| 14565 return Comment.createDocumentationCommentWithReferences(node.tokens, clone
NodeList(node.references)); | 14565 return Comment.createDocumentationCommentWithReferences(node.tokens, _clon
eNodeList(node.references)); |
| 14566 } else if (node.isBlock) { | 14566 } else if (node.isBlock) { |
| 14567 return Comment.createBlockComment(node.tokens); | 14567 return Comment.createBlockComment(node.tokens); |
| 14568 } | 14568 } |
| 14569 return Comment.createEndOfLineComment(node.tokens); | 14569 return Comment.createEndOfLineComment(node.tokens); |
| 14570 } | 14570 } |
| 14571 | 14571 |
| 14572 CommentReference visitCommentReference(CommentReference node) => new CommentRe
ference(node.newKeyword, cloneNode(node.identifier)); | 14572 CommentReference visitCommentReference(CommentReference node) => new CommentRe
ference(node.newKeyword, _cloneNode(node.identifier)); |
| 14573 | 14573 |
| 14574 CompilationUnit visitCompilationUnit(CompilationUnit node) { | 14574 CompilationUnit visitCompilationUnit(CompilationUnit node) { |
| 14575 CompilationUnit clone = new CompilationUnit(node.beginToken, cloneNode(node.
scriptTag), cloneNodeList(node.directives), cloneNodeList(node.declarations), no
de.endToken); | 14575 CompilationUnit clone = new CompilationUnit(node.beginToken, _cloneNode(node
.scriptTag), _cloneNodeList(node.directives), _cloneNodeList(node.declarations),
node.endToken); |
| 14576 clone.lineInfo = node.lineInfo; | 14576 clone.lineInfo = node.lineInfo; |
| 14577 return clone; | 14577 return clone; |
| 14578 } | 14578 } |
| 14579 | 14579 |
| 14580 ConditionalExpression visitConditionalExpression(ConditionalExpression node) =
> new ConditionalExpression(cloneNode(node.condition), node.question, cloneNode(
node.thenExpression), node.colon, cloneNode(node.elseExpression)); | 14580 ConditionalExpression visitConditionalExpression(ConditionalExpression node) =
> new ConditionalExpression(_cloneNode(node.condition), node.question, _cloneNod
e(node.thenExpression), node.colon, _cloneNode(node.elseExpression)); |
| 14581 | 14581 |
| 14582 ConstructorDeclaration visitConstructorDeclaration(ConstructorDeclaration node
) => new ConstructorDeclaration(cloneNode(node.documentationComment), cloneNodeL
ist(node.metadata), node.externalKeyword, node.constKeyword, node.factoryKeyword
, cloneNode(node.returnType), node.period, cloneNode(node.name), cloneNode(node.
parameters), node.separator, cloneNodeList(node.initializers), cloneNode(node.re
directedConstructor), cloneNode(node.body)); | 14582 ConstructorDeclaration visitConstructorDeclaration(ConstructorDeclaration node
) => new ConstructorDeclaration(_cloneNode(node.documentationComment), _cloneNod
eList(node.metadata), node.externalKeyword, node.constKeyword, node.factoryKeywo
rd, _cloneNode(node.returnType), node.period, _cloneNode(node.name), _cloneNode(
node.parameters), node.separator, _cloneNodeList(node.initializers), _cloneNode(
node.redirectedConstructor), _cloneNode(node.body)); |
| 14583 | 14583 |
| 14584 ConstructorFieldInitializer visitConstructorFieldInitializer(ConstructorFieldI
nitializer node) => new ConstructorFieldInitializer(node.keyword, node.period, c
loneNode(node.fieldName), node.equals, cloneNode(node.expression)); | 14584 ConstructorFieldInitializer visitConstructorFieldInitializer(ConstructorFieldI
nitializer node) => new ConstructorFieldInitializer(node.keyword, node.period, _
cloneNode(node.fieldName), node.equals, _cloneNode(node.expression)); |
| 14585 | 14585 |
| 14586 ConstructorName visitConstructorName(ConstructorName node) => new ConstructorN
ame(cloneNode(node.type), node.period, cloneNode(node.name)); | 14586 ConstructorName visitConstructorName(ConstructorName node) => new ConstructorN
ame(_cloneNode(node.type), node.period, _cloneNode(node.name)); |
| 14587 | 14587 |
| 14588 ContinueStatement visitContinueStatement(ContinueStatement node) => new Contin
ueStatement(node.keyword, cloneNode(node.label), node.semicolon); | 14588 ContinueStatement visitContinueStatement(ContinueStatement node) => new Contin
ueStatement(node.keyword, _cloneNode(node.label), node.semicolon); |
| 14589 | 14589 |
| 14590 DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) => new Dec
laredIdentifier(cloneNode(node.documentationComment), cloneNodeList(node.metadat
a), node.keyword, cloneNode(node.type), cloneNode(node.identifier)); | 14590 DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) => new Dec
laredIdentifier(_cloneNode(node.documentationComment), _cloneNodeList(node.metad
ata), node.keyword, _cloneNode(node.type), _cloneNode(node.identifier)); |
| 14591 | 14591 |
| 14592 DefaultFormalParameter visitDefaultFormalParameter(DefaultFormalParameter node
) => new DefaultFormalParameter(cloneNode(node.parameter), node.kind, node.separ
ator, cloneNode(node.defaultValue)); | 14592 DefaultFormalParameter visitDefaultFormalParameter(DefaultFormalParameter node
) => new DefaultFormalParameter(_cloneNode(node.parameter), node.kind, node.sepa
rator, _cloneNode(node.defaultValue)); |
| 14593 | 14593 |
| 14594 DoStatement visitDoStatement(DoStatement node) => new DoStatement(node.doKeywo
rd, cloneNode(node.body), node.whileKeyword, node.leftParenthesis, cloneNode(nod
e.condition), node.rightParenthesis, node.semicolon); | 14594 DoStatement visitDoStatement(DoStatement node) => new DoStatement(node.doKeywo
rd, _cloneNode(node.body), node.whileKeyword, node.leftParenthesis, _cloneNode(n
ode.condition), node.rightParenthesis, node.semicolon); |
| 14595 | 14595 |
| 14596 DoubleLiteral visitDoubleLiteral(DoubleLiteral node) => new DoubleLiteral(node
.literal, node.value); | 14596 DoubleLiteral visitDoubleLiteral(DoubleLiteral node) => new DoubleLiteral(node
.literal, node.value); |
| 14597 | 14597 |
| 14598 EmptyFunctionBody visitEmptyFunctionBody(EmptyFunctionBody node) => new EmptyF
unctionBody(node.semicolon); | 14598 EmptyFunctionBody visitEmptyFunctionBody(EmptyFunctionBody node) => new EmptyF
unctionBody(node.semicolon); |
| 14599 | 14599 |
| 14600 EmptyStatement visitEmptyStatement(EmptyStatement node) => new EmptyStatement(
node.semicolon); | 14600 EmptyStatement visitEmptyStatement(EmptyStatement node) => new EmptyStatement(
node.semicolon); |
| 14601 | 14601 |
| 14602 ExportDirective visitExportDirective(ExportDirective node) => new ExportDirect
ive(cloneNode(node.documentationComment), cloneNodeList(node.metadata), node.key
word, cloneNode(node.uri), cloneNodeList(node.combinators), node.semicolon); | 14602 ExportDirective visitExportDirective(ExportDirective node) => new ExportDirect
ive(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), node.k
eyword, _cloneNode(node.uri), _cloneNodeList(node.combinators), node.semicolon); |
| 14603 | 14603 |
| 14604 ExpressionFunctionBody visitExpressionFunctionBody(ExpressionFunctionBody node
) => new ExpressionFunctionBody(node.functionDefinition, cloneNode(node.expressi
on), node.semicolon); | 14604 ExpressionFunctionBody visitExpressionFunctionBody(ExpressionFunctionBody node
) => new ExpressionFunctionBody(node.functionDefinition, _cloneNode(node.express
ion), node.semicolon); |
| 14605 | 14605 |
| 14606 ExpressionStatement visitExpressionStatement(ExpressionStatement node) => new
ExpressionStatement(cloneNode(node.expression), node.semicolon); | 14606 ExpressionStatement visitExpressionStatement(ExpressionStatement node) => new
ExpressionStatement(_cloneNode(node.expression), node.semicolon); |
| 14607 | 14607 |
| 14608 ExtendsClause visitExtendsClause(ExtendsClause node) => new ExtendsClause(node
.keyword, cloneNode(node.superclass)); | 14608 ExtendsClause visitExtendsClause(ExtendsClause node) => new ExtendsClause(node
.keyword, _cloneNode(node.superclass)); |
| 14609 | 14609 |
| 14610 FieldDeclaration visitFieldDeclaration(FieldDeclaration node) => new FieldDecl
aration(cloneNode(node.documentationComment), cloneNodeList(node.metadata), node
.staticKeyword, cloneNode(node.fields), node.semicolon); | 14610 FieldDeclaration visitFieldDeclaration(FieldDeclaration node) => new FieldDecl
aration(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), no
de.staticKeyword, _cloneNode(node.fields), node.semicolon); |
| 14611 | 14611 |
| 14612 FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) => n
ew FieldFormalParameter(cloneNode(node.documentationComment), cloneNodeList(node
.metadata), node.keyword, cloneNode(node.type), node.thisToken, node.period, clo
neNode(node.identifier), cloneNode(node.parameters)); | 14612 FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) => n
ew FieldFormalParameter(_cloneNode(node.documentationComment), _cloneNodeList(no
de.metadata), node.keyword, _cloneNode(node.type), node.thisToken, node.period,
_cloneNode(node.identifier), _cloneNode(node.parameters)); |
| 14613 | 14613 |
| 14614 ForEachStatement visitForEachStatement(ForEachStatement node) { | 14614 ForEachStatement visitForEachStatement(ForEachStatement node) { |
| 14615 DeclaredIdentifier loopVariable = node.loopVariable; | 14615 DeclaredIdentifier loopVariable = node.loopVariable; |
| 14616 if (loopVariable == null) { | 14616 if (loopVariable == null) { |
| 14617 return new ForEachStatement.con2(node.forKeyword, node.leftParenthesis, cl
oneNode(node.identifier), node.inKeyword, cloneNode(node.iterator), node.rightPa
renthesis, cloneNode(node.body)); | 14617 return new ForEachStatement.con2(node.forKeyword, node.leftParenthesis, _c
loneNode(node.identifier), node.inKeyword, _cloneNode(node.iterator), node.right
Parenthesis, _cloneNode(node.body)); |
| 14618 } | 14618 } |
| 14619 return new ForEachStatement.con1(node.forKeyword, node.leftParenthesis, clon
eNode(loopVariable), node.inKeyword, cloneNode(node.iterator), node.rightParenth
esis, cloneNode(node.body)); | 14619 return new ForEachStatement.con1(node.forKeyword, node.leftParenthesis, _clo
neNode(loopVariable), node.inKeyword, _cloneNode(node.iterator), node.rightParen
thesis, _cloneNode(node.body)); |
| 14620 } | 14620 } |
| 14621 | 14621 |
| 14622 FormalParameterList visitFormalParameterList(FormalParameterList node) => new
FormalParameterList(node.leftParenthesis, cloneNodeList(node.parameters), node.l
eftDelimiter, node.rightDelimiter, node.rightParenthesis); | 14622 FormalParameterList visitFormalParameterList(FormalParameterList node) => new
FormalParameterList(node.leftParenthesis, _cloneNodeList(node.parameters), node.
leftDelimiter, node.rightDelimiter, node.rightParenthesis); |
| 14623 | 14623 |
| 14624 ForStatement visitForStatement(ForStatement node) => new ForStatement(node.for
Keyword, node.leftParenthesis, cloneNode(node.variables), cloneNode(node.initial
ization), node.leftSeparator, cloneNode(node.condition), node.rightSeparator, cl
oneNodeList(node.updaters), node.rightParenthesis, cloneNode(node.body)); | 14624 ForStatement visitForStatement(ForStatement node) => new ForStatement(node.for
Keyword, node.leftParenthesis, _cloneNode(node.variables), _cloneNode(node.initi
alization), node.leftSeparator, _cloneNode(node.condition), node.rightSeparator,
_cloneNodeList(node.updaters), node.rightParenthesis, _cloneNode(node.body)); |
| 14625 | 14625 |
| 14626 FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) => new
FunctionDeclaration(cloneNode(node.documentationComment), cloneNodeList(node.met
adata), node.externalKeyword, cloneNode(node.returnType), node.propertyKeyword,
cloneNode(node.name), cloneNode(node.functionExpression)); | 14626 FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) => new
FunctionDeclaration(_cloneNode(node.documentationComment), _cloneNodeList(node.m
etadata), node.externalKeyword, _cloneNode(node.returnType), node.propertyKeywor
d, _cloneNode(node.name), _cloneNode(node.functionExpression)); |
| 14627 | 14627 |
| 14628 FunctionDeclarationStatement visitFunctionDeclarationStatement(FunctionDeclara
tionStatement node) => new FunctionDeclarationStatement(cloneNode(node.functionD
eclaration)); | 14628 FunctionDeclarationStatement visitFunctionDeclarationStatement(FunctionDeclara
tionStatement node) => new FunctionDeclarationStatement(_cloneNode(node.function
Declaration)); |
| 14629 | 14629 |
| 14630 FunctionExpression visitFunctionExpression(FunctionExpression node) => new Fun
ctionExpression(cloneNode(node.parameters), cloneNode(node.body)); | 14630 FunctionExpression visitFunctionExpression(FunctionExpression node) => new Fun
ctionExpression(_cloneNode(node.parameters), _cloneNode(node.body)); |
| 14631 | 14631 |
| 14632 FunctionExpressionInvocation visitFunctionExpressionInvocation(FunctionExpress
ionInvocation node) => new FunctionExpressionInvocation(cloneNode(node.function)
, cloneNode(node.argumentList)); | 14632 FunctionExpressionInvocation visitFunctionExpressionInvocation(FunctionExpress
ionInvocation node) => new FunctionExpressionInvocation(_cloneNode(node.function
), _cloneNode(node.argumentList)); |
| 14633 | 14633 |
| 14634 FunctionTypeAlias visitFunctionTypeAlias(FunctionTypeAlias node) => new Functi
onTypeAlias(cloneNode(node.documentationComment), cloneNodeList(node.metadata),
node.keyword, cloneNode(node.returnType), cloneNode(node.name), cloneNode(node.t
ypeParameters), cloneNode(node.parameters), node.semicolon); | 14634 FunctionTypeAlias visitFunctionTypeAlias(FunctionTypeAlias node) => new Functi
onTypeAlias(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata)
, node.keyword, _cloneNode(node.returnType), _cloneNode(node.name), _cloneNode(n
ode.typeParameters), _cloneNode(node.parameters), node.semicolon); |
| 14635 | 14635 |
| 14636 FunctionTypedFormalParameter visitFunctionTypedFormalParameter(FunctionTypedFo
rmalParameter node) => new FunctionTypedFormalParameter(cloneNode(node.documenta
tionComment), cloneNodeList(node.metadata), cloneNode(node.returnType), cloneNod
e(node.identifier), cloneNode(node.parameters)); | 14636 FunctionTypedFormalParameter visitFunctionTypedFormalParameter(FunctionTypedFo
rmalParameter node) => new FunctionTypedFormalParameter(_cloneNode(node.document
ationComment), _cloneNodeList(node.metadata), _cloneNode(node.returnType), _clon
eNode(node.identifier), _cloneNode(node.parameters)); |
| 14637 | 14637 |
| 14638 HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator(
node.keyword, cloneNodeList(node.hiddenNames)); | 14638 HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator(
node.keyword, _cloneNodeList(node.hiddenNames)); |
| 14639 | 14639 |
| 14640 IfStatement visitIfStatement(IfStatement node) => new IfStatement(node.ifKeywo
rd, node.leftParenthesis, cloneNode(node.condition), node.rightParenthesis, clon
eNode(node.thenStatement), node.elseKeyword, cloneNode(node.elseStatement)); | 14640 IfStatement visitIfStatement(IfStatement node) => new IfStatement(node.ifKeywo
rd, node.leftParenthesis, _cloneNode(node.condition), node.rightParenthesis, _cl
oneNode(node.thenStatement), node.elseKeyword, _cloneNode(node.elseStatement)); |
| 14641 | 14641 |
| 14642 ImplementsClause visitImplementsClause(ImplementsClause node) => new Implement
sClause(node.keyword, cloneNodeList(node.interfaces)); | 14642 ImplementsClause visitImplementsClause(ImplementsClause node) => new Implement
sClause(node.keyword, _cloneNodeList(node.interfaces)); |
| 14643 | 14643 |
| 14644 ImportDirective visitImportDirective(ImportDirective node) => new ImportDirect
ive(cloneNode(node.documentationComment), cloneNodeList(node.metadata), node.key
word, cloneNode(node.uri), node.asToken, cloneNode(node.prefix), cloneNodeList(n
ode.combinators), node.semicolon); | 14644 ImportDirective visitImportDirective(ImportDirective node) => new ImportDirect
ive(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), node.k
eyword, _cloneNode(node.uri), node.asToken, _cloneNode(node.prefix), _cloneNodeL
ist(node.combinators), node.semicolon); |
| 14645 | 14645 |
| 14646 IndexExpression visitIndexExpression(IndexExpression node) { | 14646 IndexExpression visitIndexExpression(IndexExpression node) { |
| 14647 Token period = node.period; | 14647 Token period = node.period; |
| 14648 if (period == null) { | 14648 if (period == null) { |
| 14649 return new IndexExpression.forTarget(cloneNode(node.target), node.leftBrac
ket, cloneNode(node.index), node.rightBracket); | 14649 return new IndexExpression.forTarget(_cloneNode(node.target), node.leftBra
cket, _cloneNode(node.index), node.rightBracket); |
| 14650 } else { | 14650 } else { |
| 14651 return new IndexExpression.forCascade(period, node.leftBracket, cloneNode(
node.index), node.rightBracket); | 14651 return new IndexExpression.forCascade(period, node.leftBracket, _cloneNode
(node.index), node.rightBracket); |
| 14652 } | 14652 } |
| 14653 } | 14653 } |
| 14654 | 14654 |
| 14655 InstanceCreationExpression visitInstanceCreationExpression(InstanceCreationExp
ression node) => new InstanceCreationExpression(node.keyword, cloneNode(node.con
structorName), cloneNode(node.argumentList)); | 14655 InstanceCreationExpression visitInstanceCreationExpression(InstanceCreationExp
ression node) => new InstanceCreationExpression(node.keyword, _cloneNode(node.co
nstructorName), _cloneNode(node.argumentList)); |
| 14656 | 14656 |
| 14657 IntegerLiteral visitIntegerLiteral(IntegerLiteral node) => new IntegerLiteral(
node.literal, node.value); | 14657 IntegerLiteral visitIntegerLiteral(IntegerLiteral node) => new IntegerLiteral(
node.literal, node.value); |
| 14658 | 14658 |
| 14659 InterpolationExpression visitInterpolationExpression(InterpolationExpression n
ode) => new InterpolationExpression(node.leftBracket, cloneNode(node.expression)
, node.rightBracket); | 14659 InterpolationExpression visitInterpolationExpression(InterpolationExpression n
ode) => new InterpolationExpression(node.leftBracket, _cloneNode(node.expression
), node.rightBracket); |
| 14660 | 14660 |
| 14661 InterpolationString visitInterpolationString(InterpolationString node) => new
InterpolationString(node.contents, node.value); | 14661 InterpolationString visitInterpolationString(InterpolationString node) => new
InterpolationString(node.contents, node.value); |
| 14662 | 14662 |
| 14663 IsExpression visitIsExpression(IsExpression node) => new IsExpression(cloneNod
e(node.expression), node.isOperator, node.notOperator, cloneNode(node.type)); | 14663 IsExpression visitIsExpression(IsExpression node) => new IsExpression(_cloneNo
de(node.expression), node.isOperator, node.notOperator, _cloneNode(node.type)); |
| 14664 | 14664 |
| 14665 Label visitLabel(Label node) => new Label(cloneNode(node.label), node.colon); | 14665 Label visitLabel(Label node) => new Label(_cloneNode(node.label), node.colon); |
| 14666 | 14666 |
| 14667 LabeledStatement visitLabeledStatement(LabeledStatement node) => new LabeledSt
atement(cloneNodeList(node.labels), cloneNode(node.statement)); | 14667 LabeledStatement visitLabeledStatement(LabeledStatement node) => new LabeledSt
atement(_cloneNodeList(node.labels), _cloneNode(node.statement)); |
| 14668 | 14668 |
| 14669 LibraryDirective visitLibraryDirective(LibraryDirective node) => new LibraryDi
rective(cloneNode(node.documentationComment), cloneNodeList(node.metadata), node
.libraryToken, cloneNode(node.name), node.semicolon); | 14669 LibraryDirective visitLibraryDirective(LibraryDirective node) => new LibraryDi
rective(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), no
de.libraryToken, _cloneNode(node.name), node.semicolon); |
| 14670 | 14670 |
| 14671 LibraryIdentifier visitLibraryIdentifier(LibraryIdentifier node) => new Librar
yIdentifier(cloneNodeList(node.components)); | 14671 LibraryIdentifier visitLibraryIdentifier(LibraryIdentifier node) => new Librar
yIdentifier(_cloneNodeList(node.components)); |
| 14672 | 14672 |
| 14673 ListLiteral visitListLiteral(ListLiteral node) => new ListLiteral(node.constKe
yword, cloneNode(node.typeArguments), node.leftBracket, cloneNodeList(node.eleme
nts), node.rightBracket); | 14673 ListLiteral visitListLiteral(ListLiteral node) => new ListLiteral(node.constKe
yword, _cloneNode(node.typeArguments), node.leftBracket, _cloneNodeList(node.ele
ments), node.rightBracket); |
| 14674 | 14674 |
| 14675 MapLiteral visitMapLiteral(MapLiteral node) => new MapLiteral(node.constKeywor
d, cloneNode(node.typeArguments), node.leftBracket, cloneNodeList(node.entries),
node.rightBracket); | 14675 MapLiteral visitMapLiteral(MapLiteral node) => new MapLiteral(node.constKeywor
d, _cloneNode(node.typeArguments), node.leftBracket, _cloneNodeList(node.entries
), node.rightBracket); |
| 14676 | 14676 |
| 14677 MapLiteralEntry visitMapLiteralEntry(MapLiteralEntry node) => new MapLiteralEn
try(cloneNode(node.key), node.separator, cloneNode(node.value)); | 14677 MapLiteralEntry visitMapLiteralEntry(MapLiteralEntry node) => new MapLiteralEn
try(_cloneNode(node.key), node.separator, _cloneNode(node.value)); |
| 14678 | 14678 |
| 14679 MethodDeclaration visitMethodDeclaration(MethodDeclaration node) => new Method
Declaration(cloneNode(node.documentationComment), cloneNodeList(node.metadata),
node.externalKeyword, node.modifierKeyword, cloneNode(node.returnType), node.pro
pertyKeyword, node.operatorKeyword, cloneNode(node.name), cloneNode(node.paramet
ers), cloneNode(node.body)); | 14679 MethodDeclaration visitMethodDeclaration(MethodDeclaration node) => new Method
Declaration(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata)
, node.externalKeyword, node.modifierKeyword, _cloneNode(node.returnType), node.
propertyKeyword, node.operatorKeyword, _cloneNode(node.name), _cloneNode(node.pa
rameters), _cloneNode(node.body)); |
| 14680 | 14680 |
| 14681 MethodInvocation visitMethodInvocation(MethodInvocation node) => new MethodInv
ocation(cloneNode(node.target), node.period, cloneNode(node.methodName), cloneNo
de(node.argumentList)); | 14681 MethodInvocation visitMethodInvocation(MethodInvocation node) => new MethodInv
ocation(_cloneNode(node.target), node.period, _cloneNode(node.methodName), _clon
eNode(node.argumentList)); |
| 14682 | 14682 |
| 14683 NamedExpression visitNamedExpression(NamedExpression node) => new NamedExpress
ion(cloneNode(node.name), cloneNode(node.expression)); | 14683 NamedExpression visitNamedExpression(NamedExpression node) => new NamedExpress
ion(_cloneNode(node.name), _cloneNode(node.expression)); |
| 14684 | 14684 |
| 14685 AstNode visitNativeClause(NativeClause node) => new NativeClause(node.keyword,
cloneNode(node.name)); | 14685 AstNode visitNativeClause(NativeClause node) => new NativeClause(node.keyword,
_cloneNode(node.name)); |
| 14686 | 14686 |
| 14687 NativeFunctionBody visitNativeFunctionBody(NativeFunctionBody node) => new Nat
iveFunctionBody(node.nativeToken, cloneNode(node.stringLiteral), node.semicolon)
; | 14687 NativeFunctionBody visitNativeFunctionBody(NativeFunctionBody node) => new Nat
iveFunctionBody(node.nativeToken, _cloneNode(node.stringLiteral), node.semicolon
); |
| 14688 | 14688 |
| 14689 NullLiteral visitNullLiteral(NullLiteral node) => new NullLiteral(node.literal
); | 14689 NullLiteral visitNullLiteral(NullLiteral node) => new NullLiteral(node.literal
); |
| 14690 | 14690 |
| 14691 ParenthesizedExpression visitParenthesizedExpression(ParenthesizedExpression n
ode) => new ParenthesizedExpression(node.leftParenthesis, cloneNode(node.express
ion), node.rightParenthesis); | 14691 ParenthesizedExpression visitParenthesizedExpression(ParenthesizedExpression n
ode) => new ParenthesizedExpression(node.leftParenthesis, _cloneNode(node.expres
sion), node.rightParenthesis); |
| 14692 | 14692 |
| 14693 PartDirective visitPartDirective(PartDirective node) => new PartDirective(clon
eNode(node.documentationComment), cloneNodeList(node.metadata), node.partToken,
cloneNode(node.uri), node.semicolon); | 14693 PartDirective visitPartDirective(PartDirective node) => new PartDirective(_clo
neNode(node.documentationComment), _cloneNodeList(node.metadata), node.partToken
, _cloneNode(node.uri), node.semicolon); |
| 14694 | 14694 |
| 14695 PartOfDirective visitPartOfDirective(PartOfDirective node) => new PartOfDirect
ive(cloneNode(node.documentationComment), cloneNodeList(node.metadata), node.par
tToken, node.ofToken, cloneNode(node.libraryName), node.semicolon); | 14695 PartOfDirective visitPartOfDirective(PartOfDirective node) => new PartOfDirect
ive(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), node.p
artToken, node.ofToken, _cloneNode(node.libraryName), node.semicolon); |
| 14696 | 14696 |
| 14697 PostfixExpression visitPostfixExpression(PostfixExpression node) => new Postfi
xExpression(cloneNode(node.operand), node.operator); | 14697 PostfixExpression visitPostfixExpression(PostfixExpression node) => new Postfi
xExpression(_cloneNode(node.operand), node.operator); |
| 14698 | 14698 |
| 14699 PrefixedIdentifier visitPrefixedIdentifier(PrefixedIdentifier node) => new Pre
fixedIdentifier(cloneNode(node.prefix), node.period, cloneNode(node.identifier))
; | 14699 PrefixedIdentifier visitPrefixedIdentifier(PrefixedIdentifier node) => new Pre
fixedIdentifier(_cloneNode(node.prefix), node.period, _cloneNode(node.identifier
)); |
| 14700 | 14700 |
| 14701 PrefixExpression visitPrefixExpression(PrefixExpression node) => new PrefixExp
ression(node.operator, cloneNode(node.operand)); | 14701 PrefixExpression visitPrefixExpression(PrefixExpression node) => new PrefixExp
ression(node.operator, _cloneNode(node.operand)); |
| 14702 | 14702 |
| 14703 PropertyAccess visitPropertyAccess(PropertyAccess node) => new PropertyAccess(
cloneNode(node.target), node.operator, cloneNode(node.propertyName)); | 14703 PropertyAccess visitPropertyAccess(PropertyAccess node) => new PropertyAccess(
_cloneNode(node.target), node.operator, _cloneNode(node.propertyName)); |
| 14704 | 14704 |
| 14705 RedirectingConstructorInvocation visitRedirectingConstructorInvocation(Redirec
tingConstructorInvocation node) => new RedirectingConstructorInvocation(node.key
word, node.period, cloneNode(node.constructorName), cloneNode(node.argumentList)
); | 14705 RedirectingConstructorInvocation visitRedirectingConstructorInvocation(Redirec
tingConstructorInvocation node) => new RedirectingConstructorInvocation(node.key
word, node.period, _cloneNode(node.constructorName), _cloneNode(node.argumentLis
t)); |
| 14706 | 14706 |
| 14707 RethrowExpression visitRethrowExpression(RethrowExpression node) => new Rethro
wExpression(node.keyword); | 14707 RethrowExpression visitRethrowExpression(RethrowExpression node) => new Rethro
wExpression(node.keyword); |
| 14708 | 14708 |
| 14709 ReturnStatement visitReturnStatement(ReturnStatement node) => new ReturnStatem
ent(node.keyword, cloneNode(node.expression), node.semicolon); | 14709 ReturnStatement visitReturnStatement(ReturnStatement node) => new ReturnStatem
ent(node.keyword, _cloneNode(node.expression), node.semicolon); |
| 14710 | 14710 |
| 14711 ScriptTag visitScriptTag(ScriptTag node) => new ScriptTag(node.scriptTag); | 14711 ScriptTag visitScriptTag(ScriptTag node) => new ScriptTag(node.scriptTag); |
| 14712 | 14712 |
| 14713 ShowCombinator visitShowCombinator(ShowCombinator node) => new ShowCombinator(
node.keyword, cloneNodeList(node.shownNames)); | 14713 ShowCombinator visitShowCombinator(ShowCombinator node) => new ShowCombinator(
node.keyword, _cloneNodeList(node.shownNames)); |
| 14714 | 14714 |
| 14715 SimpleFormalParameter visitSimpleFormalParameter(SimpleFormalParameter node) =
> new SimpleFormalParameter(cloneNode(node.documentationComment), cloneNodeList(
node.metadata), node.keyword, cloneNode(node.type), cloneNode(node.identifier)); | 14715 SimpleFormalParameter visitSimpleFormalParameter(SimpleFormalParameter node) =
> new SimpleFormalParameter(_cloneNode(node.documentationComment), _cloneNodeLis
t(node.metadata), node.keyword, _cloneNode(node.type), _cloneNode(node.identifie
r)); |
| 14716 | 14716 |
| 14717 SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) => new SimpleIde
ntifier(node.token); | 14717 SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) => new SimpleIde
ntifier(node.token); |
| 14718 | 14718 |
| 14719 SimpleStringLiteral visitSimpleStringLiteral(SimpleStringLiteral node) => new
SimpleStringLiteral(node.literal, node.value); | 14719 SimpleStringLiteral visitSimpleStringLiteral(SimpleStringLiteral node) => new
SimpleStringLiteral(node.literal, node.value); |
| 14720 | 14720 |
| 14721 StringInterpolation visitStringInterpolation(StringInterpolation node) => new
StringInterpolation(cloneNodeList(node.elements)); | 14721 StringInterpolation visitStringInterpolation(StringInterpolation node) => new
StringInterpolation(_cloneNodeList(node.elements)); |
| 14722 | 14722 |
| 14723 SuperConstructorInvocation visitSuperConstructorInvocation(SuperConstructorInv
ocation node) => new SuperConstructorInvocation(node.keyword, node.period, clone
Node(node.constructorName), cloneNode(node.argumentList)); | 14723 SuperConstructorInvocation visitSuperConstructorInvocation(SuperConstructorInv
ocation node) => new SuperConstructorInvocation(node.keyword, node.period, _clon
eNode(node.constructorName), _cloneNode(node.argumentList)); |
| 14724 | 14724 |
| 14725 SuperExpression visitSuperExpression(SuperExpression node) => new SuperExpress
ion(node.keyword); | 14725 SuperExpression visitSuperExpression(SuperExpression node) => new SuperExpress
ion(node.keyword); |
| 14726 | 14726 |
| 14727 SwitchCase visitSwitchCase(SwitchCase node) => new SwitchCase(cloneNodeList(no
de.labels), node.keyword, cloneNode(node.expression), node.colon, cloneNodeList(
node.statements)); | 14727 SwitchCase visitSwitchCase(SwitchCase node) => new SwitchCase(_cloneNodeList(n
ode.labels), node.keyword, _cloneNode(node.expression), node.colon, _cloneNodeLi
st(node.statements)); |
| 14728 | 14728 |
| 14729 SwitchDefault visitSwitchDefault(SwitchDefault node) => new SwitchDefault(clon
eNodeList(node.labels), node.keyword, node.colon, cloneNodeList(node.statements)
); | 14729 SwitchDefault visitSwitchDefault(SwitchDefault node) => new SwitchDefault(_clo
neNodeList(node.labels), node.keyword, node.colon, _cloneNodeList(node.statement
s)); |
| 14730 | 14730 |
| 14731 SwitchStatement visitSwitchStatement(SwitchStatement node) => new SwitchStatem
ent(node.keyword, node.leftParenthesis, cloneNode(node.expression), node.rightPa
renthesis, node.leftBracket, cloneNodeList(node.members), node.rightBracket); | 14731 SwitchStatement visitSwitchStatement(SwitchStatement node) => new SwitchStatem
ent(node.keyword, node.leftParenthesis, _cloneNode(node.expression), node.rightP
arenthesis, node.leftBracket, _cloneNodeList(node.members), node.rightBracket); |
| 14732 | 14732 |
| 14733 AstNode visitSymbolLiteral(SymbolLiteral node) => new SymbolLiteral(node.pound
Sign, node.components); | 14733 AstNode visitSymbolLiteral(SymbolLiteral node) => new SymbolLiteral(node.pound
Sign, node.components); |
| 14734 | 14734 |
| 14735 ThisExpression visitThisExpression(ThisExpression node) => new ThisExpression(
node.keyword); | 14735 ThisExpression visitThisExpression(ThisExpression node) => new ThisExpression(
node.keyword); |
| 14736 | 14736 |
| 14737 ThrowExpression visitThrowExpression(ThrowExpression node) => new ThrowExpress
ion(node.keyword, cloneNode(node.expression)); | 14737 ThrowExpression visitThrowExpression(ThrowExpression node) => new ThrowExpress
ion(node.keyword, _cloneNode(node.expression)); |
| 14738 | 14738 |
| 14739 TopLevelVariableDeclaration visitTopLevelVariableDeclaration(TopLevelVariableD
eclaration node) => new TopLevelVariableDeclaration(cloneNode(node.documentation
Comment), cloneNodeList(node.metadata), cloneNode(node.variables), node.semicolo
n); | 14739 TopLevelVariableDeclaration visitTopLevelVariableDeclaration(TopLevelVariableD
eclaration node) => new TopLevelVariableDeclaration(_cloneNode(node.documentatio
nComment), _cloneNodeList(node.metadata), _cloneNode(node.variables), node.semic
olon); |
| 14740 | 14740 |
| 14741 TryStatement visitTryStatement(TryStatement node) => new TryStatement(node.try
Keyword, cloneNode(node.body), cloneNodeList(node.catchClauses), node.finallyKey
word, cloneNode(node.finallyBlock)); | 14741 TryStatement visitTryStatement(TryStatement node) => new TryStatement(node.try
Keyword, _cloneNode(node.body), _cloneNodeList(node.catchClauses), node.finallyK
eyword, _cloneNode(node.finallyBlock)); |
| 14742 | 14742 |
| 14743 TypeArgumentList visitTypeArgumentList(TypeArgumentList node) => new TypeArgum
entList(node.leftBracket, cloneNodeList(node.arguments), node.rightBracket); | 14743 TypeArgumentList visitTypeArgumentList(TypeArgumentList node) => new TypeArgum
entList(node.leftBracket, _cloneNodeList(node.arguments), node.rightBracket); |
| 14744 | 14744 |
| 14745 TypeName visitTypeName(TypeName node) => new TypeName(cloneNode(node.name), cl
oneNode(node.typeArguments)); | 14745 TypeName visitTypeName(TypeName node) => new TypeName(_cloneNode(node.name), _
cloneNode(node.typeArguments)); |
| 14746 | 14746 |
| 14747 TypeParameter visitTypeParameter(TypeParameter node) => new TypeParameter(clon
eNode(node.documentationComment), cloneNodeList(node.metadata), cloneNode(node.n
ame), node.keyword, cloneNode(node.bound)); | 14747 TypeParameter visitTypeParameter(TypeParameter node) => new TypeParameter(_clo
neNode(node.documentationComment), _cloneNodeList(node.metadata), _cloneNode(nod
e.name), node.keyword, _cloneNode(node.bound)); |
| 14748 | 14748 |
| 14749 TypeParameterList visitTypeParameterList(TypeParameterList node) => new TypePa
rameterList(node.leftBracket, cloneNodeList(node.typeParameters), node.rightBrac
ket); | 14749 TypeParameterList visitTypeParameterList(TypeParameterList node) => new TypePa
rameterList(node.leftBracket, _cloneNodeList(node.typeParameters), node.rightBra
cket); |
| 14750 | 14750 |
| 14751 VariableDeclaration visitVariableDeclaration(VariableDeclaration node) => new
VariableDeclaration(null, cloneNodeList(node.metadata), cloneNode(node.name), no
de.equals, cloneNode(node.initializer)); | 14751 VariableDeclaration visitVariableDeclaration(VariableDeclaration node) => new
VariableDeclaration(null, _cloneNodeList(node.metadata), _cloneNode(node.name),
node.equals, _cloneNode(node.initializer)); |
| 14752 | 14752 |
| 14753 VariableDeclarationList visitVariableDeclarationList(VariableDeclarationList n
ode) => new VariableDeclarationList(null, cloneNodeList(node.metadata), node.key
word, cloneNode(node.type), cloneNodeList(node.variables)); | 14753 VariableDeclarationList visitVariableDeclarationList(VariableDeclarationList n
ode) => new VariableDeclarationList(null, _cloneNodeList(node.metadata), node.ke
yword, _cloneNode(node.type), _cloneNodeList(node.variables)); |
| 14754 | 14754 |
| 14755 VariableDeclarationStatement visitVariableDeclarationStatement(VariableDeclara
tionStatement node) => new VariableDeclarationStatement(cloneNode(node.variables
), node.semicolon); | 14755 VariableDeclarationStatement visitVariableDeclarationStatement(VariableDeclara
tionStatement node) => new VariableDeclarationStatement(_cloneNode(node.variable
s), node.semicolon); |
| 14756 | 14756 |
| 14757 WhileStatement visitWhileStatement(WhileStatement node) => new WhileStatement(
node.keyword, node.leftParenthesis, cloneNode(node.condition), node.rightParenth
esis, cloneNode(node.body)); | 14757 WhileStatement visitWhileStatement(WhileStatement node) => new WhileStatement(
node.keyword, node.leftParenthesis, _cloneNode(node.condition), node.rightParent
hesis, _cloneNode(node.body)); |
| 14758 | 14758 |
| 14759 WithClause visitWithClause(WithClause node) => new WithClause(node.withKeyword
, cloneNodeList(node.mixinTypes)); | 14759 WithClause visitWithClause(WithClause node) => new WithClause(node.withKeyword
, _cloneNodeList(node.mixinTypes)); |
| 14760 | 14760 |
| 14761 AstNode cloneNode(AstNode node) { | 14761 AstNode _cloneNode(AstNode node) { |
| 14762 if (node == null) { | 14762 if (node == null) { |
| 14763 return null; | 14763 return null; |
| 14764 } | 14764 } |
| 14765 return node.accept(this) as AstNode; | 14765 return node.accept(this) as AstNode; |
| 14766 } | 14766 } |
| 14767 | 14767 |
| 14768 List cloneNodeList(NodeList nodes) { | 14768 List _cloneNodeList(NodeList nodes) { |
| 14769 int count = nodes.length; | 14769 int count = nodes.length; |
| 14770 List clonedNodes = new List(); | 14770 List clonedNodes = new List(); |
| 14771 for (int i = 0; i < count; i++) { | 14771 for (int i = 0; i < count; i++) { |
| 14772 clonedNodes.add((nodes[i]).accept(this) as AstNode); | 14772 clonedNodes.add((nodes[i]).accept(this) as AstNode); |
| 14773 } | 14773 } |
| 14774 return clonedNodes; | 14774 return clonedNodes; |
| 14775 } | 14775 } |
| 14776 } | 14776 } |
| 14777 | 14777 |
| 14778 /** | 14778 /** |
| 14779 * Instances of the class `AstComparator` compare the structure of two ASTNodes
to see whether | 14779 * Instances of the class `AstComparator` compare the structure of two ASTNodes
to see whether |
| 14780 * they are equal. | 14780 * they are equal. |
| 14781 */ | 14781 */ |
| 14782 class AstComparator implements AstVisitor<bool> { | 14782 class AstComparator implements AstVisitor<bool> { |
| 14783 /** | 14783 /** |
| 14784 * Return `true` if the two AST nodes are equal. | 14784 * Return `true` if the two AST nodes are equal. |
| 14785 * | 14785 * |
| 14786 * @param first the first node being compared | 14786 * @param first the first node being compared |
| 14787 * @param second the second node being compared | 14787 * @param second the second node being compared |
| 14788 * @return `true` if the two AST nodes are equal | 14788 * @return `true` if the two AST nodes are equal |
| 14789 */ | 14789 */ |
| 14790 static bool equalUnits(CompilationUnit first, CompilationUnit second) { | 14790 static bool equalUnits(CompilationUnit first, CompilationUnit second) { |
| 14791 AstComparator comparator = new AstComparator(); | 14791 AstComparator comparator = new AstComparator(); |
| 14792 return comparator.isEqualNodes(first, second); | 14792 return comparator._isEqualNodes(first, second); |
| 14793 } | 14793 } |
| 14794 | 14794 |
| 14795 /** | 14795 /** |
| 14796 * The AST node with which the node being visited is to be compared. This is o
nly valid at the | 14796 * The AST node with which the node being visited is to be compared. This is o
nly valid at the |
| 14797 * beginning of each visit method (until [isEqualNodes] is invoked). | 14797 * beginning of each visit method (until [isEqualNodes] is invoked). |
| 14798 */ | 14798 */ |
| 14799 AstNode _other; | 14799 AstNode _other; |
| 14800 | 14800 |
| 14801 bool visitAdjacentStrings(AdjacentStrings node) { | 14801 bool visitAdjacentStrings(AdjacentStrings node) { |
| 14802 AdjacentStrings other = this._other as AdjacentStrings; | 14802 AdjacentStrings other = this._other as AdjacentStrings; |
| 14803 return isEqualNodeLists(node.strings, other.strings); | 14803 return _isEqualNodeLists(node.strings, other.strings); |
| 14804 } | 14804 } |
| 14805 | 14805 |
| 14806 bool visitAnnotation(Annotation node) { | 14806 bool visitAnnotation(Annotation node) { |
| 14807 Annotation other = this._other as Annotation; | 14807 Annotation other = this._other as Annotation; |
| 14808 return isEqualTokens(node.atSign, other.atSign) && isEqualNodes(node.name, o
ther.name) && isEqualTokens(node.period, other.period) && isEqualNodes(node.cons
tructorName, other.constructorName) && isEqualNodes(node.arguments, other.argume
nts); | 14808 return _isEqualTokens(node.atSign, other.atSign) && _isEqualNodes(node.name,
other.name) && _isEqualTokens(node.period, other.period) && _isEqualNodes(node.
constructorName, other.constructorName) && _isEqualNodes(node.arguments, other.a
rguments); |
| 14809 } | 14809 } |
| 14810 | 14810 |
| 14811 bool visitArgumentDefinitionTest(ArgumentDefinitionTest node) { | 14811 bool visitArgumentDefinitionTest(ArgumentDefinitionTest node) { |
| 14812 ArgumentDefinitionTest other = this._other as ArgumentDefinitionTest; | 14812 ArgumentDefinitionTest other = this._other as ArgumentDefinitionTest; |
| 14813 return isEqualTokens(node.question, other.question) && isEqualNodes(node.ide
ntifier, other.identifier); | 14813 return _isEqualTokens(node.question, other.question) && _isEqualNodes(node.i
dentifier, other.identifier); |
| 14814 } | 14814 } |
| 14815 | 14815 |
| 14816 bool visitArgumentList(ArgumentList node) { | 14816 bool visitArgumentList(ArgumentList node) { |
| 14817 ArgumentList other = this._other as ArgumentList; | 14817 ArgumentList other = this._other as ArgumentList; |
| 14818 return isEqualTokens(node.leftParenthesis, other.leftParenthesis) && isEqual
NodeLists(node.arguments, other.arguments) && isEqualTokens(node.rightParenthesi
s, other.rightParenthesis); | 14818 return _isEqualTokens(node.leftParenthesis, other.leftParenthesis) && _isEqu
alNodeLists(node.arguments, other.arguments) && _isEqualTokens(node.rightParenth
esis, other.rightParenthesis); |
| 14819 } | 14819 } |
| 14820 | 14820 |
| 14821 bool visitAsExpression(AsExpression node) { | 14821 bool visitAsExpression(AsExpression node) { |
| 14822 AsExpression other = this._other as AsExpression; | 14822 AsExpression other = this._other as AsExpression; |
| 14823 return isEqualNodes(node.expression, other.expression) && isEqualTokens(node
.asOperator, other.asOperator) && isEqualNodes(node.type, other.type); | 14823 return _isEqualNodes(node.expression, other.expression) && _isEqualTokens(no
de.asOperator, other.asOperator) && _isEqualNodes(node.type, other.type); |
| 14824 } | 14824 } |
| 14825 | 14825 |
| 14826 bool visitAssertStatement(AssertStatement node) { | 14826 bool visitAssertStatement(AssertStatement node) { |
| 14827 AssertStatement other = this._other as AssertStatement; | 14827 AssertStatement other = this._other as AssertStatement; |
| 14828 return isEqualTokens(node.keyword, other.keyword) && isEqualTokens(node.left
Parenthesis, other.leftParenthesis) && isEqualNodes(node.condition, other.condit
ion) && isEqualTokens(node.rightParenthesis, other.rightParenthesis) && isEqualT
okens(node.semicolon, other.semicolon); | 14828 return _isEqualTokens(node.keyword, other.keyword) && _isEqualTokens(node.le
ftParenthesis, other.leftParenthesis) && _isEqualNodes(node.condition, other.con
dition) && _isEqualTokens(node.rightParenthesis, other.rightParenthesis) && _isE
qualTokens(node.semicolon, other.semicolon); |
| 14829 } | 14829 } |
| 14830 | 14830 |
| 14831 bool visitAssignmentExpression(AssignmentExpression node) { | 14831 bool visitAssignmentExpression(AssignmentExpression node) { |
| 14832 AssignmentExpression other = this._other as AssignmentExpression; | 14832 AssignmentExpression other = this._other as AssignmentExpression; |
| 14833 return isEqualNodes(node.leftHandSide, other.leftHandSide) && isEqualTokens(
node.operator, other.operator) && isEqualNodes(node.rightHandSide, other.rightHa
ndSide); | 14833 return _isEqualNodes(node.leftHandSide, other.leftHandSide) && _isEqualToken
s(node.operator, other.operator) && _isEqualNodes(node.rightHandSide, other.righ
tHandSide); |
| 14834 } | 14834 } |
| 14835 | 14835 |
| 14836 bool visitBinaryExpression(BinaryExpression node) { | 14836 bool visitBinaryExpression(BinaryExpression node) { |
| 14837 BinaryExpression other = this._other as BinaryExpression; | 14837 BinaryExpression other = this._other as BinaryExpression; |
| 14838 return isEqualNodes(node.leftOperand, other.leftOperand) && isEqualTokens(no
de.operator, other.operator) && isEqualNodes(node.rightOperand, other.rightOpera
nd); | 14838 return _isEqualNodes(node.leftOperand, other.leftOperand) && _isEqualTokens(
node.operator, other.operator) && _isEqualNodes(node.rightOperand, other.rightOp
erand); |
| 14839 } | 14839 } |
| 14840 | 14840 |
| 14841 bool visitBlock(Block node) { | 14841 bool visitBlock(Block node) { |
| 14842 Block other = this._other as Block; | 14842 Block other = this._other as Block; |
| 14843 return isEqualTokens(node.leftBracket, other.leftBracket) && isEqualNodeList
s(node.statements, other.statements) && isEqualTokens(node.rightBracket, other.r
ightBracket); | 14843 return _isEqualTokens(node.leftBracket, other.leftBracket) && _isEqualNodeLi
sts(node.statements, other.statements) && _isEqualTokens(node.rightBracket, othe
r.rightBracket); |
| 14844 } | 14844 } |
| 14845 | 14845 |
| 14846 bool visitBlockFunctionBody(BlockFunctionBody node) { | 14846 bool visitBlockFunctionBody(BlockFunctionBody node) { |
| 14847 BlockFunctionBody other = this._other as BlockFunctionBody; | 14847 BlockFunctionBody other = this._other as BlockFunctionBody; |
| 14848 return isEqualNodes(node.block, other.block); | 14848 return _isEqualNodes(node.block, other.block); |
| 14849 } | 14849 } |
| 14850 | 14850 |
| 14851 bool visitBooleanLiteral(BooleanLiteral node) { | 14851 bool visitBooleanLiteral(BooleanLiteral node) { |
| 14852 BooleanLiteral other = this._other as BooleanLiteral; | 14852 BooleanLiteral other = this._other as BooleanLiteral; |
| 14853 return isEqualTokens(node.literal, other.literal) && identical(node.value, o
ther.value); | 14853 return _isEqualTokens(node.literal, other.literal) && identical(node.value,
other.value); |
| 14854 } | 14854 } |
| 14855 | 14855 |
| 14856 bool visitBreakStatement(BreakStatement node) { | 14856 bool visitBreakStatement(BreakStatement node) { |
| 14857 BreakStatement other = this._other as BreakStatement; | 14857 BreakStatement other = this._other as BreakStatement; |
| 14858 return isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.label
, other.label) && isEqualTokens(node.semicolon, other.semicolon); | 14858 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node.lab
el, other.label) && _isEqualTokens(node.semicolon, other.semicolon); |
| 14859 } | 14859 } |
| 14860 | 14860 |
| 14861 bool visitCascadeExpression(CascadeExpression node) { | 14861 bool visitCascadeExpression(CascadeExpression node) { |
| 14862 CascadeExpression other = this._other as CascadeExpression; | 14862 CascadeExpression other = this._other as CascadeExpression; |
| 14863 return isEqualNodes(node.target, other.target) && isEqualNodeLists(node.casc
adeSections, other.cascadeSections); | 14863 return _isEqualNodes(node.target, other.target) && _isEqualNodeLists(node.ca
scadeSections, other.cascadeSections); |
| 14864 } | 14864 } |
| 14865 | 14865 |
| 14866 bool visitCatchClause(CatchClause node) { | 14866 bool visitCatchClause(CatchClause node) { |
| 14867 CatchClause other = this._other as CatchClause; | 14867 CatchClause other = this._other as CatchClause; |
| 14868 return isEqualTokens(node.onKeyword, other.onKeyword) && isEqualNodes(node.e
xceptionType, other.exceptionType) && isEqualTokens(node.catchKeyword, other.cat
chKeyword) && isEqualTokens(node.leftParenthesis, other.leftParenthesis) && isEq
ualNodes(node.exceptionParameter, other.exceptionParameter) && isEqualTokens(nod
e.comma, other.comma) && isEqualNodes(node.stackTraceParameter, other.stackTrace
Parameter) && isEqualTokens(node.rightParenthesis, other.rightParenthesis) && is
EqualNodes(node.body, other.body); | 14868 return _isEqualTokens(node.onKeyword, other.onKeyword) && _isEqualNodes(node
.exceptionType, other.exceptionType) && _isEqualTokens(node.catchKeyword, other.
catchKeyword) && _isEqualTokens(node.leftParenthesis, other.leftParenthesis) &&
_isEqualNodes(node.exceptionParameter, other.exceptionParameter) && _isEqualToke
ns(node.comma, other.comma) && _isEqualNodes(node.stackTraceParameter, other.sta
ckTraceParameter) && _isEqualTokens(node.rightParenthesis, other.rightParenthesi
s) && _isEqualNodes(node.body, other.body); |
| 14869 } | 14869 } |
| 14870 | 14870 |
| 14871 bool visitClassDeclaration(ClassDeclaration node) { | 14871 bool visitClassDeclaration(ClassDeclaration node) { |
| 14872 ClassDeclaration other = this._other as ClassDeclaration; | 14872 ClassDeclaration other = this._other as ClassDeclaration; |
| 14873 return isEqualNodes(node.documentationComment, other.documentationComment) &
& isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.abstract
Keyword, other.abstractKeyword) && isEqualTokens(node.classKeyword, other.classK
eyword) && isEqualNodes(node.name, other.name) && isEqualNodes(node.typeParamete
rs, other.typeParameters) && isEqualNodes(node.extendsClause, other.extendsClaus
e) && isEqualNodes(node.withClause, other.withClause) && isEqualNodes(node.imple
mentsClause, other.implementsClause) && isEqualTokens(node.leftBracket, other.le
ftBracket) && isEqualNodeLists(node.members, other.members) && isEqualTokens(nod
e.rightBracket, other.rightBracket); | 14873 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.abstr
actKeyword, other.abstractKeyword) && _isEqualTokens(node.classKeyword, other.cl
assKeyword) && _isEqualNodes(node.name, other.name) && _isEqualNodes(node.typePa
rameters, other.typeParameters) && _isEqualNodes(node.extendsClause, other.exten
dsClause) && _isEqualNodes(node.withClause, other.withClause) && _isEqualNodes(n
ode.implementsClause, other.implementsClause) && _isEqualTokens(node.leftBracket
, other.leftBracket) && _isEqualNodeLists(node.members, other.members) && _isEqu
alTokens(node.rightBracket, other.rightBracket); |
| 14874 } | 14874 } |
| 14875 | 14875 |
| 14876 bool visitClassTypeAlias(ClassTypeAlias node) { | 14876 bool visitClassTypeAlias(ClassTypeAlias node) { |
| 14877 ClassTypeAlias other = this._other as ClassTypeAlias; | 14877 ClassTypeAlias other = this._other as ClassTypeAlias; |
| 14878 return isEqualNodes(node.documentationComment, other.documentationComment) &
& isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.keyword,
other.keyword) && isEqualNodes(node.name, other.name) && isEqualNodes(node.type
Parameters, other.typeParameters) && isEqualTokens(node.equals, other.equals) &&
isEqualTokens(node.abstractKeyword, other.abstractKeyword) && isEqualNodes(node
.superclass, other.superclass) && isEqualNodes(node.withClause, other.withClause
) && isEqualNodes(node.implementsClause, other.implementsClause) && isEqualToken
s(node.semicolon, other.semicolon); | 14878 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.name, other.name) && _isEqualNodes(node
.typeParameters, other.typeParameters) && _isEqualTokens(node.equals, other.equa
ls) && _isEqualTokens(node.abstractKeyword, other.abstractKeyword) && _isEqualNo
des(node.superclass, other.superclass) && _isEqualNodes(node.withClause, other.w
ithClause) && _isEqualNodes(node.implementsClause, other.implementsClause) && _i
sEqualTokens(node.semicolon, other.semicolon); |
| 14879 } | 14879 } |
| 14880 | 14880 |
| 14881 bool visitComment(Comment node) { | 14881 bool visitComment(Comment node) { |
| 14882 Comment other = this._other as Comment; | 14882 Comment other = this._other as Comment; |
| 14883 return isEqualNodeLists(node.references, other.references); | 14883 return _isEqualNodeLists(node.references, other.references); |
| 14884 } | 14884 } |
| 14885 | 14885 |
| 14886 bool visitCommentReference(CommentReference node) { | 14886 bool visitCommentReference(CommentReference node) { |
| 14887 CommentReference other = this._other as CommentReference; | 14887 CommentReference other = this._other as CommentReference; |
| 14888 return isEqualTokens(node.newKeyword, other.newKeyword) && isEqualNodes(node
.identifier, other.identifier); | 14888 return _isEqualTokens(node.newKeyword, other.newKeyword) && _isEqualNodes(no
de.identifier, other.identifier); |
| 14889 } | 14889 } |
| 14890 | 14890 |
| 14891 bool visitCompilationUnit(CompilationUnit node) { | 14891 bool visitCompilationUnit(CompilationUnit node) { |
| 14892 CompilationUnit other = this._other as CompilationUnit; | 14892 CompilationUnit other = this._other as CompilationUnit; |
| 14893 return isEqualTokens(node.beginToken, other.beginToken) && isEqualNodes(node
.scriptTag, other.scriptTag) && isEqualNodeLists(node.directives, other.directiv
es) && isEqualNodeLists(node.declarations, other.declarations) && isEqualTokens(
node.endToken, other.endToken); | 14893 return _isEqualTokens(node.beginToken, other.beginToken) && _isEqualNodes(no
de.scriptTag, other.scriptTag) && _isEqualNodeLists(node.directives, other.direc
tives) && _isEqualNodeLists(node.declarations, other.declarations) && _isEqualTo
kens(node.endToken, other.endToken); |
| 14894 } | 14894 } |
| 14895 | 14895 |
| 14896 bool visitConditionalExpression(ConditionalExpression node) { | 14896 bool visitConditionalExpression(ConditionalExpression node) { |
| 14897 ConditionalExpression other = this._other as ConditionalExpression; | 14897 ConditionalExpression other = this._other as ConditionalExpression; |
| 14898 return isEqualNodes(node.condition, other.condition) && isEqualTokens(node.q
uestion, other.question) && isEqualNodes(node.thenExpression, other.thenExpressi
on) && isEqualTokens(node.colon, other.colon) && isEqualNodes(node.elseExpressio
n, other.elseExpression); | 14898 return _isEqualNodes(node.condition, other.condition) && _isEqualTokens(node
.question, other.question) && _isEqualNodes(node.thenExpression, other.thenExpre
ssion) && _isEqualTokens(node.colon, other.colon) && _isEqualNodes(node.elseExpr
ession, other.elseExpression); |
| 14899 } | 14899 } |
| 14900 | 14900 |
| 14901 bool visitConstructorDeclaration(ConstructorDeclaration node) { | 14901 bool visitConstructorDeclaration(ConstructorDeclaration node) { |
| 14902 ConstructorDeclaration other = this._other as ConstructorDeclaration; | 14902 ConstructorDeclaration other = this._other as ConstructorDeclaration; |
| 14903 return isEqualNodes(node.documentationComment, other.documentationComment) &
& isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.external
Keyword, other.externalKeyword) && isEqualTokens(node.constKeyword, other.constK
eyword) && isEqualTokens(node.factoryKeyword, other.factoryKeyword) && isEqualNo
des(node.returnType, other.returnType) && isEqualTokens(node.period, other.perio
d) && isEqualNodes(node.name, other.name) && isEqualNodes(node.parameters, other
.parameters) && isEqualTokens(node.separator, other.separator) && isEqualNodeLis
ts(node.initializers, other.initializers) && isEqualNodes(node.redirectedConstru
ctor, other.redirectedConstructor) && isEqualNodes(node.body, other.body); | 14903 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.exter
nalKeyword, other.externalKeyword) && _isEqualTokens(node.constKeyword, other.co
nstKeyword) && _isEqualTokens(node.factoryKeyword, other.factoryKeyword) && _isE
qualNodes(node.returnType, other.returnType) && _isEqualTokens(node.period, othe
r.period) && _isEqualNodes(node.name, other.name) && _isEqualNodes(node.paramete
rs, other.parameters) && _isEqualTokens(node.separator, other.separator) && _isE
qualNodeLists(node.initializers, other.initializers) && _isEqualNodes(node.redir
ectedConstructor, other.redirectedConstructor) && _isEqualNodes(node.body, other
.body); |
| 14904 } | 14904 } |
| 14905 | 14905 |
| 14906 bool visitConstructorFieldInitializer(ConstructorFieldInitializer node) { | 14906 bool visitConstructorFieldInitializer(ConstructorFieldInitializer node) { |
| 14907 ConstructorFieldInitializer other = this._other as ConstructorFieldInitializ
er; | 14907 ConstructorFieldInitializer other = this._other as ConstructorFieldInitializ
er; |
| 14908 return isEqualTokens(node.keyword, other.keyword) && isEqualTokens(node.peri
od, other.period) && isEqualNodes(node.fieldName, other.fieldName) && isEqualTok
ens(node.equals, other.equals) && isEqualNodes(node.expression, other.expression
); | 14908 return _isEqualTokens(node.keyword, other.keyword) && _isEqualTokens(node.pe
riod, other.period) && _isEqualNodes(node.fieldName, other.fieldName) && _isEqua
lTokens(node.equals, other.equals) && _isEqualNodes(node.expression, other.expre
ssion); |
| 14909 } | 14909 } |
| 14910 | 14910 |
| 14911 bool visitConstructorName(ConstructorName node) { | 14911 bool visitConstructorName(ConstructorName node) { |
| 14912 ConstructorName other = this._other as ConstructorName; | 14912 ConstructorName other = this._other as ConstructorName; |
| 14913 return isEqualNodes(node.type, other.type) && isEqualTokens(node.period, oth
er.period) && isEqualNodes(node.name, other.name); | 14913 return _isEqualNodes(node.type, other.type) && _isEqualTokens(node.period, o
ther.period) && _isEqualNodes(node.name, other.name); |
| 14914 } | 14914 } |
| 14915 | 14915 |
| 14916 bool visitContinueStatement(ContinueStatement node) { | 14916 bool visitContinueStatement(ContinueStatement node) { |
| 14917 ContinueStatement other = this._other as ContinueStatement; | 14917 ContinueStatement other = this._other as ContinueStatement; |
| 14918 return isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.label
, other.label) && isEqualTokens(node.semicolon, other.semicolon); | 14918 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node.lab
el, other.label) && _isEqualTokens(node.semicolon, other.semicolon); |
| 14919 } | 14919 } |
| 14920 | 14920 |
| 14921 bool visitDeclaredIdentifier(DeclaredIdentifier node) { | 14921 bool visitDeclaredIdentifier(DeclaredIdentifier node) { |
| 14922 DeclaredIdentifier other = this._other as DeclaredIdentifier; | 14922 DeclaredIdentifier other = this._other as DeclaredIdentifier; |
| 14923 return isEqualNodes(node.documentationComment, other.documentationComment) &
& isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.keyword,
other.keyword) && isEqualNodes(node.type, other.type) && isEqualNodes(node.iden
tifier, other.identifier); | 14923 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.type, other.type) && _isEqualNodes(node
.identifier, other.identifier); |
| 14924 } | 14924 } |
| 14925 | 14925 |
| 14926 bool visitDefaultFormalParameter(DefaultFormalParameter node) { | 14926 bool visitDefaultFormalParameter(DefaultFormalParameter node) { |
| 14927 DefaultFormalParameter other = this._other as DefaultFormalParameter; | 14927 DefaultFormalParameter other = this._other as DefaultFormalParameter; |
| 14928 return isEqualNodes(node.parameter, other.parameter) && identical(node.kind,
other.kind) && isEqualTokens(node.separator, other.separator) && isEqualNodes(n
ode.defaultValue, other.defaultValue); | 14928 return _isEqualNodes(node.parameter, other.parameter) && identical(node.kind
, other.kind) && _isEqualTokens(node.separator, other.separator) && _isEqualNode
s(node.defaultValue, other.defaultValue); |
| 14929 } | 14929 } |
| 14930 | 14930 |
| 14931 bool visitDoStatement(DoStatement node) { | 14931 bool visitDoStatement(DoStatement node) { |
| 14932 DoStatement other = this._other as DoStatement; | 14932 DoStatement other = this._other as DoStatement; |
| 14933 return isEqualTokens(node.doKeyword, other.doKeyword) && isEqualNodes(node.b
ody, other.body) && isEqualTokens(node.whileKeyword, other.whileKeyword) && isEq
ualTokens(node.leftParenthesis, other.leftParenthesis) && isEqualNodes(node.cond
ition, other.condition) && isEqualTokens(node.rightParenthesis, other.rightParen
thesis) && isEqualTokens(node.semicolon, other.semicolon); | 14933 return _isEqualTokens(node.doKeyword, other.doKeyword) && _isEqualNodes(node
.body, other.body) && _isEqualTokens(node.whileKeyword, other.whileKeyword) && _
isEqualTokens(node.leftParenthesis, other.leftParenthesis) && _isEqualNodes(node
.condition, other.condition) && _isEqualTokens(node.rightParenthesis, other.righ
tParenthesis) && _isEqualTokens(node.semicolon, other.semicolon); |
| 14934 } | 14934 } |
| 14935 | 14935 |
| 14936 bool visitDoubleLiteral(DoubleLiteral node) { | 14936 bool visitDoubleLiteral(DoubleLiteral node) { |
| 14937 DoubleLiteral other = this._other as DoubleLiteral; | 14937 DoubleLiteral other = this._other as DoubleLiteral; |
| 14938 return isEqualTokens(node.literal, other.literal) && node.value == other.val
ue; | 14938 return _isEqualTokens(node.literal, other.literal) && node.value == other.va
lue; |
| 14939 } | 14939 } |
| 14940 | 14940 |
| 14941 bool visitEmptyFunctionBody(EmptyFunctionBody node) { | 14941 bool visitEmptyFunctionBody(EmptyFunctionBody node) { |
| 14942 EmptyFunctionBody other = this._other as EmptyFunctionBody; | 14942 EmptyFunctionBody other = this._other as EmptyFunctionBody; |
| 14943 return isEqualTokens(node.semicolon, other.semicolon); | 14943 return _isEqualTokens(node.semicolon, other.semicolon); |
| 14944 } | 14944 } |
| 14945 | 14945 |
| 14946 bool visitEmptyStatement(EmptyStatement node) { | 14946 bool visitEmptyStatement(EmptyStatement node) { |
| 14947 EmptyStatement other = this._other as EmptyStatement; | 14947 EmptyStatement other = this._other as EmptyStatement; |
| 14948 return isEqualTokens(node.semicolon, other.semicolon); | 14948 return _isEqualTokens(node.semicolon, other.semicolon); |
| 14949 } | 14949 } |
| 14950 | 14950 |
| 14951 bool visitExportDirective(ExportDirective node) { | 14951 bool visitExportDirective(ExportDirective node) { |
| 14952 ExportDirective other = this._other as ExportDirective; | 14952 ExportDirective other = this._other as ExportDirective; |
| 14953 return isEqualNodes(node.documentationComment, other.documentationComment) &
& isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.keyword,
other.keyword) && isEqualNodes(node.uri, other.uri) && isEqualNodeLists(node.co
mbinators, other.combinators) && isEqualTokens(node.semicolon, other.semicolon); | 14953 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.uri, other.uri) && _isEqualNodeLists(no
de.combinators, other.combinators) && _isEqualTokens(node.semicolon, other.semic
olon); |
| 14954 } | 14954 } |
| 14955 | 14955 |
| 14956 bool visitExpressionFunctionBody(ExpressionFunctionBody node) { | 14956 bool visitExpressionFunctionBody(ExpressionFunctionBody node) { |
| 14957 ExpressionFunctionBody other = this._other as ExpressionFunctionBody; | 14957 ExpressionFunctionBody other = this._other as ExpressionFunctionBody; |
| 14958 return isEqualTokens(node.functionDefinition, other.functionDefinition) && i
sEqualNodes(node.expression, other.expression) && isEqualTokens(node.semicolon,
other.semicolon); | 14958 return _isEqualTokens(node.functionDefinition, other.functionDefinition) &&
_isEqualNodes(node.expression, other.expression) && _isEqualTokens(node.semicolo
n, other.semicolon); |
| 14959 } | 14959 } |
| 14960 | 14960 |
| 14961 bool visitExpressionStatement(ExpressionStatement node) { | 14961 bool visitExpressionStatement(ExpressionStatement node) { |
| 14962 ExpressionStatement other = this._other as ExpressionStatement; | 14962 ExpressionStatement other = this._other as ExpressionStatement; |
| 14963 return isEqualNodes(node.expression, other.expression) && isEqualTokens(node
.semicolon, other.semicolon); | 14963 return _isEqualNodes(node.expression, other.expression) && _isEqualTokens(no
de.semicolon, other.semicolon); |
| 14964 } | 14964 } |
| 14965 | 14965 |
| 14966 bool visitExtendsClause(ExtendsClause node) { | 14966 bool visitExtendsClause(ExtendsClause node) { |
| 14967 ExtendsClause other = this._other as ExtendsClause; | 14967 ExtendsClause other = this._other as ExtendsClause; |
| 14968 return isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.super
class, other.superclass); | 14968 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node.sup
erclass, other.superclass); |
| 14969 } | 14969 } |
| 14970 | 14970 |
| 14971 bool visitFieldDeclaration(FieldDeclaration node) { | 14971 bool visitFieldDeclaration(FieldDeclaration node) { |
| 14972 FieldDeclaration other = this._other as FieldDeclaration; | 14972 FieldDeclaration other = this._other as FieldDeclaration; |
| 14973 return isEqualNodes(node.documentationComment, other.documentationComment) &
& isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.staticKe
yword, other.staticKeyword) && isEqualNodes(node.fields, other.fields) && isEqua
lTokens(node.semicolon, other.semicolon); | 14973 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.stati
cKeyword, other.staticKeyword) && _isEqualNodes(node.fields, other.fields) && _i
sEqualTokens(node.semicolon, other.semicolon); |
| 14974 } | 14974 } |
| 14975 | 14975 |
| 14976 bool visitFieldFormalParameter(FieldFormalParameter node) { | 14976 bool visitFieldFormalParameter(FieldFormalParameter node) { |
| 14977 FieldFormalParameter other = this._other as FieldFormalParameter; | 14977 FieldFormalParameter other = this._other as FieldFormalParameter; |
| 14978 return isEqualNodes(node.documentationComment, other.documentationComment) &
& isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.keyword,
other.keyword) && isEqualNodes(node.type, other.type) && isEqualTokens(node.thi
sToken, other.thisToken) && isEqualTokens(node.period, other.period) && isEqualN
odes(node.identifier, other.identifier); | 14978 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.type, other.type) && _isEqualTokens(nod
e.thisToken, other.thisToken) && _isEqualTokens(node.period, other.period) && _i
sEqualNodes(node.identifier, other.identifier); |
| 14979 } | 14979 } |
| 14980 | 14980 |
| 14981 bool visitForEachStatement(ForEachStatement node) { | 14981 bool visitForEachStatement(ForEachStatement node) { |
| 14982 ForEachStatement other = this._other as ForEachStatement; | 14982 ForEachStatement other = this._other as ForEachStatement; |
| 14983 return isEqualTokens(node.forKeyword, other.forKeyword) && isEqualTokens(nod
e.leftParenthesis, other.leftParenthesis) && isEqualNodes(node.loopVariable, oth
er.loopVariable) && isEqualTokens(node.inKeyword, other.inKeyword) && isEqualNod
es(node.iterator, other.iterator) && isEqualTokens(node.rightParenthesis, other.
rightParenthesis) && isEqualNodes(node.body, other.body); | 14983 return _isEqualTokens(node.forKeyword, other.forKeyword) && _isEqualTokens(n
ode.leftParenthesis, other.leftParenthesis) && _isEqualNodes(node.loopVariable,
other.loopVariable) && _isEqualTokens(node.inKeyword, other.inKeyword) && _isEqu
alNodes(node.iterator, other.iterator) && _isEqualTokens(node.rightParenthesis,
other.rightParenthesis) && _isEqualNodes(node.body, other.body); |
| 14984 } | 14984 } |
| 14985 | 14985 |
| 14986 bool visitFormalParameterList(FormalParameterList node) { | 14986 bool visitFormalParameterList(FormalParameterList node) { |
| 14987 FormalParameterList other = this._other as FormalParameterList; | 14987 FormalParameterList other = this._other as FormalParameterList; |
| 14988 return isEqualTokens(node.leftParenthesis, other.leftParenthesis) && isEqual
NodeLists(node.parameters, other.parameters) && isEqualTokens(node.leftDelimiter
, other.leftDelimiter) && isEqualTokens(node.rightDelimiter, other.rightDelimite
r) && isEqualTokens(node.rightParenthesis, other.rightParenthesis); | 14988 return _isEqualTokens(node.leftParenthesis, other.leftParenthesis) && _isEqu
alNodeLists(node.parameters, other.parameters) && _isEqualTokens(node.leftDelimi
ter, other.leftDelimiter) && _isEqualTokens(node.rightDelimiter, other.rightDeli
miter) && _isEqualTokens(node.rightParenthesis, other.rightParenthesis); |
| 14989 } | 14989 } |
| 14990 | 14990 |
| 14991 bool visitForStatement(ForStatement node) { | 14991 bool visitForStatement(ForStatement node) { |
| 14992 ForStatement other = this._other as ForStatement; | 14992 ForStatement other = this._other as ForStatement; |
| 14993 return isEqualTokens(node.forKeyword, other.forKeyword) && isEqualTokens(nod
e.leftParenthesis, other.leftParenthesis) && isEqualNodes(node.variables, other.
variables) && isEqualNodes(node.initialization, other.initialization) && isEqual
Tokens(node.leftSeparator, other.leftSeparator) && isEqualNodes(node.condition,
other.condition) && isEqualTokens(node.rightSeparator, other.rightSeparator) &&
isEqualNodeLists(node.updaters, other.updaters) && isEqualTokens(node.rightParen
thesis, other.rightParenthesis) && isEqualNodes(node.body, other.body); | 14993 return _isEqualTokens(node.forKeyword, other.forKeyword) && _isEqualTokens(n
ode.leftParenthesis, other.leftParenthesis) && _isEqualNodes(node.variables, oth
er.variables) && _isEqualNodes(node.initialization, other.initialization) && _is
EqualTokens(node.leftSeparator, other.leftSeparator) && _isEqualNodes(node.condi
tion, other.condition) && _isEqualTokens(node.rightSeparator, other.rightSeparat
or) && _isEqualNodeLists(node.updaters, other.updaters) && _isEqualTokens(node.r
ightParenthesis, other.rightParenthesis) && _isEqualNodes(node.body, other.body)
; |
| 14994 } | 14994 } |
| 14995 | 14995 |
| 14996 bool visitFunctionDeclaration(FunctionDeclaration node) { | 14996 bool visitFunctionDeclaration(FunctionDeclaration node) { |
| 14997 FunctionDeclaration other = this._other as FunctionDeclaration; | 14997 FunctionDeclaration other = this._other as FunctionDeclaration; |
| 14998 return isEqualNodes(node.documentationComment, other.documentationComment) &
& isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.external
Keyword, other.externalKeyword) && isEqualNodes(node.returnType, other.returnTyp
e) && isEqualTokens(node.propertyKeyword, other.propertyKeyword) && isEqualNodes
(node.name, other.name) && isEqualNodes(node.functionExpression, other.functionE
xpression); | 14998 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.exter
nalKeyword, other.externalKeyword) && _isEqualNodes(node.returnType, other.retur
nType) && _isEqualTokens(node.propertyKeyword, other.propertyKeyword) && _isEqua
lNodes(node.name, other.name) && _isEqualNodes(node.functionExpression, other.fu
nctionExpression); |
| 14999 } | 14999 } |
| 15000 | 15000 |
| 15001 bool visitFunctionDeclarationStatement(FunctionDeclarationStatement node) { | 15001 bool visitFunctionDeclarationStatement(FunctionDeclarationStatement node) { |
| 15002 FunctionDeclarationStatement other = this._other as FunctionDeclarationState
ment; | 15002 FunctionDeclarationStatement other = this._other as FunctionDeclarationState
ment; |
| 15003 return isEqualNodes(node.functionDeclaration, other.functionDeclaration); | 15003 return _isEqualNodes(node.functionDeclaration, other.functionDeclaration); |
| 15004 } | 15004 } |
| 15005 | 15005 |
| 15006 bool visitFunctionExpression(FunctionExpression node) { | 15006 bool visitFunctionExpression(FunctionExpression node) { |
| 15007 FunctionExpression other = this._other as FunctionExpression; | 15007 FunctionExpression other = this._other as FunctionExpression; |
| 15008 return isEqualNodes(node.parameters, other.parameters) && isEqualNodes(node.
body, other.body); | 15008 return _isEqualNodes(node.parameters, other.parameters) && _isEqualNodes(nod
e.body, other.body); |
| 15009 } | 15009 } |
| 15010 | 15010 |
| 15011 bool visitFunctionExpressionInvocation(FunctionExpressionInvocation node) { | 15011 bool visitFunctionExpressionInvocation(FunctionExpressionInvocation node) { |
| 15012 FunctionExpressionInvocation other = this._other as FunctionExpressionInvoca
tion; | 15012 FunctionExpressionInvocation other = this._other as FunctionExpressionInvoca
tion; |
| 15013 return isEqualNodes(node.function, other.function) && isEqualNodes(node.argu
mentList, other.argumentList); | 15013 return _isEqualNodes(node.function, other.function) && _isEqualNodes(node.ar
gumentList, other.argumentList); |
| 15014 } | 15014 } |
| 15015 | 15015 |
| 15016 bool visitFunctionTypeAlias(FunctionTypeAlias node) { | 15016 bool visitFunctionTypeAlias(FunctionTypeAlias node) { |
| 15017 FunctionTypeAlias other = this._other as FunctionTypeAlias; | 15017 FunctionTypeAlias other = this._other as FunctionTypeAlias; |
| 15018 return isEqualNodes(node.documentationComment, other.documentationComment) &
& isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.keyword,
other.keyword) && isEqualNodes(node.returnType, other.returnType) && isEqualNod
es(node.name, other.name) && isEqualNodes(node.typeParameters, other.typeParamet
ers) && isEqualNodes(node.parameters, other.parameters) && isEqualTokens(node.se
micolon, other.semicolon); | 15018 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.returnType, other.returnType) && _isEqu
alNodes(node.name, other.name) && _isEqualNodes(node.typeParameters, other.typeP
arameters) && _isEqualNodes(node.parameters, other.parameters) && _isEqualTokens
(node.semicolon, other.semicolon); |
| 15019 } | 15019 } |
| 15020 | 15020 |
| 15021 bool visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) { | 15021 bool visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) { |
| 15022 FunctionTypedFormalParameter other = this._other as FunctionTypedFormalParam
eter; | 15022 FunctionTypedFormalParameter other = this._other as FunctionTypedFormalParam
eter; |
| 15023 return isEqualNodes(node.documentationComment, other.documentationComment) &
& isEqualNodeLists(node.metadata, other.metadata) && isEqualNodes(node.returnTyp
e, other.returnType) && isEqualNodes(node.identifier, other.identifier) && isEqu
alNodes(node.parameters, other.parameters); | 15023 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualNodes(node.return
Type, other.returnType) && _isEqualNodes(node.identifier, other.identifier) && _
isEqualNodes(node.parameters, other.parameters); |
| 15024 } | 15024 } |
| 15025 | 15025 |
| 15026 bool visitHideCombinator(HideCombinator node) { | 15026 bool visitHideCombinator(HideCombinator node) { |
| 15027 HideCombinator other = this._other as HideCombinator; | 15027 HideCombinator other = this._other as HideCombinator; |
| 15028 return isEqualTokens(node.keyword, other.keyword) && isEqualNodeLists(node.h
iddenNames, other.hiddenNames); | 15028 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodeLists(node
.hiddenNames, other.hiddenNames); |
| 15029 } | 15029 } |
| 15030 | 15030 |
| 15031 bool visitIfStatement(IfStatement node) { | 15031 bool visitIfStatement(IfStatement node) { |
| 15032 IfStatement other = this._other as IfStatement; | 15032 IfStatement other = this._other as IfStatement; |
| 15033 return isEqualTokens(node.ifKeyword, other.ifKeyword) && isEqualTokens(node.
leftParenthesis, other.leftParenthesis) && isEqualNodes(node.condition, other.co
ndition) && isEqualTokens(node.rightParenthesis, other.rightParenthesis) && isEq
ualNodes(node.thenStatement, other.thenStatement) && isEqualTokens(node.elseKeyw
ord, other.elseKeyword) && isEqualNodes(node.elseStatement, other.elseStatement)
; | 15033 return _isEqualTokens(node.ifKeyword, other.ifKeyword) && _isEqualTokens(nod
e.leftParenthesis, other.leftParenthesis) && _isEqualNodes(node.condition, other
.condition) && _isEqualTokens(node.rightParenthesis, other.rightParenthesis) &&
_isEqualNodes(node.thenStatement, other.thenStatement) && _isEqualTokens(node.el
seKeyword, other.elseKeyword) && _isEqualNodes(node.elseStatement, other.elseSta
tement); |
| 15034 } | 15034 } |
| 15035 | 15035 |
| 15036 bool visitImplementsClause(ImplementsClause node) { | 15036 bool visitImplementsClause(ImplementsClause node) { |
| 15037 ImplementsClause other = this._other as ImplementsClause; | 15037 ImplementsClause other = this._other as ImplementsClause; |
| 15038 return isEqualTokens(node.keyword, other.keyword) && isEqualNodeLists(node.i
nterfaces, other.interfaces); | 15038 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodeLists(node
.interfaces, other.interfaces); |
| 15039 } | 15039 } |
| 15040 | 15040 |
| 15041 bool visitImportDirective(ImportDirective node) { | 15041 bool visitImportDirective(ImportDirective node) { |
| 15042 ImportDirective other = this._other as ImportDirective; | 15042 ImportDirective other = this._other as ImportDirective; |
| 15043 return isEqualNodes(node.documentationComment, other.documentationComment) &
& isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.keyword,
other.keyword) && isEqualNodes(node.uri, other.uri) && isEqualTokens(node.asTok
en, other.asToken) && isEqualNodes(node.prefix, other.prefix) && isEqualNodeList
s(node.combinators, other.combinators) && isEqualTokens(node.semicolon, other.se
micolon); | 15043 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.uri, other.uri) && _isEqualTokens(node.
asToken, other.asToken) && _isEqualNodes(node.prefix, other.prefix) && _isEqualN
odeLists(node.combinators, other.combinators) && _isEqualTokens(node.semicolon,
other.semicolon); |
| 15044 } | 15044 } |
| 15045 | 15045 |
| 15046 bool visitIndexExpression(IndexExpression node) { | 15046 bool visitIndexExpression(IndexExpression node) { |
| 15047 IndexExpression other = this._other as IndexExpression; | 15047 IndexExpression other = this._other as IndexExpression; |
| 15048 return isEqualNodes(node.target, other.target) && isEqualTokens(node.leftBra
cket, other.leftBracket) && isEqualNodes(node.index, other.index) && isEqualToke
ns(node.rightBracket, other.rightBracket); | 15048 return _isEqualNodes(node.target, other.target) && _isEqualTokens(node.leftB
racket, other.leftBracket) && _isEqualNodes(node.index, other.index) && _isEqual
Tokens(node.rightBracket, other.rightBracket); |
| 15049 } | 15049 } |
| 15050 | 15050 |
| 15051 bool visitInstanceCreationExpression(InstanceCreationExpression node) { | 15051 bool visitInstanceCreationExpression(InstanceCreationExpression node) { |
| 15052 InstanceCreationExpression other = this._other as InstanceCreationExpression
; | 15052 InstanceCreationExpression other = this._other as InstanceCreationExpression
; |
| 15053 return isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.const
ructorName, other.constructorName) && isEqualNodes(node.argumentList, other.argu
mentList); | 15053 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node.con
structorName, other.constructorName) && _isEqualNodes(node.argumentList, other.a
rgumentList); |
| 15054 } | 15054 } |
| 15055 | 15055 |
| 15056 bool visitIntegerLiteral(IntegerLiteral node) { | 15056 bool visitIntegerLiteral(IntegerLiteral node) { |
| 15057 IntegerLiteral other = this._other as IntegerLiteral; | 15057 IntegerLiteral other = this._other as IntegerLiteral; |
| 15058 return isEqualTokens(node.literal, other.literal) && (node.value == other.va
lue); | 15058 return _isEqualTokens(node.literal, other.literal) && (node.value == other.v
alue); |
| 15059 } | 15059 } |
| 15060 | 15060 |
| 15061 bool visitInterpolationExpression(InterpolationExpression node) { | 15061 bool visitInterpolationExpression(InterpolationExpression node) { |
| 15062 InterpolationExpression other = this._other as InterpolationExpression; | 15062 InterpolationExpression other = this._other as InterpolationExpression; |
| 15063 return isEqualTokens(node.leftBracket, other.leftBracket) && isEqualNodes(no
de.expression, other.expression) && isEqualTokens(node.rightBracket, other.right
Bracket); | 15063 return _isEqualTokens(node.leftBracket, other.leftBracket) && _isEqualNodes(
node.expression, other.expression) && _isEqualTokens(node.rightBracket, other.ri
ghtBracket); |
| 15064 } | 15064 } |
| 15065 | 15065 |
| 15066 bool visitInterpolationString(InterpolationString node) { | 15066 bool visitInterpolationString(InterpolationString node) { |
| 15067 InterpolationString other = this._other as InterpolationString; | 15067 InterpolationString other = this._other as InterpolationString; |
| 15068 return isEqualTokens(node.contents, other.contents) && node.value == other.v
alue; | 15068 return _isEqualTokens(node.contents, other.contents) && node.value == other.
value; |
| 15069 } | 15069 } |
| 15070 | 15070 |
| 15071 bool visitIsExpression(IsExpression node) { | 15071 bool visitIsExpression(IsExpression node) { |
| 15072 IsExpression other = this._other as IsExpression; | 15072 IsExpression other = this._other as IsExpression; |
| 15073 return isEqualNodes(node.expression, other.expression) && isEqualTokens(node
.isOperator, other.isOperator) && isEqualTokens(node.notOperator, other.notOpera
tor) && isEqualNodes(node.type, other.type); | 15073 return _isEqualNodes(node.expression, other.expression) && _isEqualTokens(no
de.isOperator, other.isOperator) && _isEqualTokens(node.notOperator, other.notOp
erator) && _isEqualNodes(node.type, other.type); |
| 15074 } | 15074 } |
| 15075 | 15075 |
| 15076 bool visitLabel(Label node) { | 15076 bool visitLabel(Label node) { |
| 15077 Label other = this._other as Label; | 15077 Label other = this._other as Label; |
| 15078 return isEqualNodes(node.label, other.label) && isEqualTokens(node.colon, ot
her.colon); | 15078 return _isEqualNodes(node.label, other.label) && _isEqualTokens(node.colon,
other.colon); |
| 15079 } | 15079 } |
| 15080 | 15080 |
| 15081 bool visitLabeledStatement(LabeledStatement node) { | 15081 bool visitLabeledStatement(LabeledStatement node) { |
| 15082 LabeledStatement other = this._other as LabeledStatement; | 15082 LabeledStatement other = this._other as LabeledStatement; |
| 15083 return isEqualNodeLists(node.labels, other.labels) && isEqualNodes(node.stat
ement, other.statement); | 15083 return _isEqualNodeLists(node.labels, other.labels) && _isEqualNodes(node.st
atement, other.statement); |
| 15084 } | 15084 } |
| 15085 | 15085 |
| 15086 bool visitLibraryDirective(LibraryDirective node) { | 15086 bool visitLibraryDirective(LibraryDirective node) { |
| 15087 LibraryDirective other = this._other as LibraryDirective; | 15087 LibraryDirective other = this._other as LibraryDirective; |
| 15088 return isEqualNodes(node.documentationComment, other.documentationComment) &
& isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.libraryT
oken, other.libraryToken) && isEqualNodes(node.name, other.name) && isEqualToken
s(node.semicolon, other.semicolon); | 15088 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.libra
ryToken, other.libraryToken) && _isEqualNodes(node.name, other.name) && _isEqual
Tokens(node.semicolon, other.semicolon); |
| 15089 } | 15089 } |
| 15090 | 15090 |
| 15091 bool visitLibraryIdentifier(LibraryIdentifier node) { | 15091 bool visitLibraryIdentifier(LibraryIdentifier node) { |
| 15092 LibraryIdentifier other = this._other as LibraryIdentifier; | 15092 LibraryIdentifier other = this._other as LibraryIdentifier; |
| 15093 return isEqualNodeLists(node.components, other.components); | 15093 return _isEqualNodeLists(node.components, other.components); |
| 15094 } | 15094 } |
| 15095 | 15095 |
| 15096 bool visitListLiteral(ListLiteral node) { | 15096 bool visitListLiteral(ListLiteral node) { |
| 15097 ListLiteral other = this._other as ListLiteral; | 15097 ListLiteral other = this._other as ListLiteral; |
| 15098 return isEqualTokens(node.constKeyword, other.constKeyword) && isEqualNodes(
node.typeArguments, other.typeArguments) && isEqualTokens(node.leftBracket, othe
r.leftBracket) && isEqualNodeLists(node.elements, other.elements) && isEqualToke
ns(node.rightBracket, other.rightBracket); | 15098 return _isEqualTokens(node.constKeyword, other.constKeyword) && _isEqualNode
s(node.typeArguments, other.typeArguments) && _isEqualTokens(node.leftBracket, o
ther.leftBracket) && _isEqualNodeLists(node.elements, other.elements) && _isEqua
lTokens(node.rightBracket, other.rightBracket); |
| 15099 } | 15099 } |
| 15100 | 15100 |
| 15101 bool visitMapLiteral(MapLiteral node) { | 15101 bool visitMapLiteral(MapLiteral node) { |
| 15102 MapLiteral other = this._other as MapLiteral; | 15102 MapLiteral other = this._other as MapLiteral; |
| 15103 return isEqualTokens(node.constKeyword, other.constKeyword) && isEqualNodes(
node.typeArguments, other.typeArguments) && isEqualTokens(node.leftBracket, othe
r.leftBracket) && isEqualNodeLists(node.entries, other.entries) && isEqualTokens
(node.rightBracket, other.rightBracket); | 15103 return _isEqualTokens(node.constKeyword, other.constKeyword) && _isEqualNode
s(node.typeArguments, other.typeArguments) && _isEqualTokens(node.leftBracket, o
ther.leftBracket) && _isEqualNodeLists(node.entries, other.entries) && _isEqualT
okens(node.rightBracket, other.rightBracket); |
| 15104 } | 15104 } |
| 15105 | 15105 |
| 15106 bool visitMapLiteralEntry(MapLiteralEntry node) { | 15106 bool visitMapLiteralEntry(MapLiteralEntry node) { |
| 15107 MapLiteralEntry other = this._other as MapLiteralEntry; | 15107 MapLiteralEntry other = this._other as MapLiteralEntry; |
| 15108 return isEqualNodes(node.key, other.key) && isEqualTokens(node.separator, ot
her.separator) && isEqualNodes(node.value, other.value); | 15108 return _isEqualNodes(node.key, other.key) && _isEqualTokens(node.separator,
other.separator) && _isEqualNodes(node.value, other.value); |
| 15109 } | 15109 } |
| 15110 | 15110 |
| 15111 bool visitMethodDeclaration(MethodDeclaration node) { | 15111 bool visitMethodDeclaration(MethodDeclaration node) { |
| 15112 MethodDeclaration other = this._other as MethodDeclaration; | 15112 MethodDeclaration other = this._other as MethodDeclaration; |
| 15113 return isEqualNodes(node.documentationComment, other.documentationComment) &
& isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.external
Keyword, other.externalKeyword) && isEqualTokens(node.modifierKeyword, other.mod
ifierKeyword) && isEqualNodes(node.returnType, other.returnType) && isEqualToken
s(node.propertyKeyword, other.propertyKeyword) && isEqualTokens(node.propertyKey
word, other.propertyKeyword) && isEqualNodes(node.name, other.name) && isEqualNo
des(node.parameters, other.parameters) && isEqualNodes(node.body, other.body); | 15113 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.exter
nalKeyword, other.externalKeyword) && _isEqualTokens(node.modifierKeyword, other
.modifierKeyword) && _isEqualNodes(node.returnType, other.returnType) && _isEqua
lTokens(node.propertyKeyword, other.propertyKeyword) && _isEqualTokens(node.prop
ertyKeyword, other.propertyKeyword) && _isEqualNodes(node.name, other.name) && _
isEqualNodes(node.parameters, other.parameters) && _isEqualNodes(node.body, othe
r.body); |
| 15114 } | 15114 } |
| 15115 | 15115 |
| 15116 bool visitMethodInvocation(MethodInvocation node) { | 15116 bool visitMethodInvocation(MethodInvocation node) { |
| 15117 MethodInvocation other = this._other as MethodInvocation; | 15117 MethodInvocation other = this._other as MethodInvocation; |
| 15118 return isEqualNodes(node.target, other.target) && isEqualTokens(node.period,
other.period) && isEqualNodes(node.methodName, other.methodName) && isEqualNode
s(node.argumentList, other.argumentList); | 15118 return _isEqualNodes(node.target, other.target) && _isEqualTokens(node.perio
d, other.period) && _isEqualNodes(node.methodName, other.methodName) && _isEqual
Nodes(node.argumentList, other.argumentList); |
| 15119 } | 15119 } |
| 15120 | 15120 |
| 15121 bool visitNamedExpression(NamedExpression node) { | 15121 bool visitNamedExpression(NamedExpression node) { |
| 15122 NamedExpression other = this._other as NamedExpression; | 15122 NamedExpression other = this._other as NamedExpression; |
| 15123 return isEqualNodes(node.name, other.name) && isEqualNodes(node.expression,
other.expression); | 15123 return _isEqualNodes(node.name, other.name) && _isEqualNodes(node.expression
, other.expression); |
| 15124 } | 15124 } |
| 15125 | 15125 |
| 15126 bool visitNativeClause(NativeClause node) { | 15126 bool visitNativeClause(NativeClause node) { |
| 15127 NativeClause other = this._other as NativeClause; | 15127 NativeClause other = this._other as NativeClause; |
| 15128 return isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.name,
other.name); | 15128 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node.nam
e, other.name); |
| 15129 } | 15129 } |
| 15130 | 15130 |
| 15131 bool visitNativeFunctionBody(NativeFunctionBody node) { | 15131 bool visitNativeFunctionBody(NativeFunctionBody node) { |
| 15132 NativeFunctionBody other = this._other as NativeFunctionBody; | 15132 NativeFunctionBody other = this._other as NativeFunctionBody; |
| 15133 return isEqualTokens(node.nativeToken, other.nativeToken) && isEqualNodes(no
de.stringLiteral, other.stringLiteral) && isEqualTokens(node.semicolon, other.se
micolon); | 15133 return _isEqualTokens(node.nativeToken, other.nativeToken) && _isEqualNodes(
node.stringLiteral, other.stringLiteral) && _isEqualTokens(node.semicolon, other
.semicolon); |
| 15134 } | 15134 } |
| 15135 | 15135 |
| 15136 bool visitNullLiteral(NullLiteral node) { | 15136 bool visitNullLiteral(NullLiteral node) { |
| 15137 NullLiteral other = this._other as NullLiteral; | 15137 NullLiteral other = this._other as NullLiteral; |
| 15138 return isEqualTokens(node.literal, other.literal); | 15138 return _isEqualTokens(node.literal, other.literal); |
| 15139 } | 15139 } |
| 15140 | 15140 |
| 15141 bool visitParenthesizedExpression(ParenthesizedExpression node) { | 15141 bool visitParenthesizedExpression(ParenthesizedExpression node) { |
| 15142 ParenthesizedExpression other = this._other as ParenthesizedExpression; | 15142 ParenthesizedExpression other = this._other as ParenthesizedExpression; |
| 15143 return isEqualTokens(node.leftParenthesis, other.leftParenthesis) && isEqual
Nodes(node.expression, other.expression) && isEqualTokens(node.rightParenthesis,
other.rightParenthesis); | 15143 return _isEqualTokens(node.leftParenthesis, other.leftParenthesis) && _isEqu
alNodes(node.expression, other.expression) && _isEqualTokens(node.rightParenthes
is, other.rightParenthesis); |
| 15144 } | 15144 } |
| 15145 | 15145 |
| 15146 bool visitPartDirective(PartDirective node) { | 15146 bool visitPartDirective(PartDirective node) { |
| 15147 PartDirective other = this._other as PartDirective; | 15147 PartDirective other = this._other as PartDirective; |
| 15148 return isEqualNodes(node.documentationComment, other.documentationComment) &
& isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.partToke
n, other.partToken) && isEqualNodes(node.uri, other.uri) && isEqualTokens(node.s
emicolon, other.semicolon); | 15148 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.partT
oken, other.partToken) && _isEqualNodes(node.uri, other.uri) && _isEqualTokens(n
ode.semicolon, other.semicolon); |
| 15149 } | 15149 } |
| 15150 | 15150 |
| 15151 bool visitPartOfDirective(PartOfDirective node) { | 15151 bool visitPartOfDirective(PartOfDirective node) { |
| 15152 PartOfDirective other = this._other as PartOfDirective; | 15152 PartOfDirective other = this._other as PartOfDirective; |
| 15153 return isEqualNodes(node.documentationComment, other.documentationComment) &
& isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.partToke
n, other.partToken) && isEqualTokens(node.ofToken, other.ofToken) && isEqualNode
s(node.libraryName, other.libraryName) && isEqualTokens(node.semicolon, other.se
micolon); | 15153 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.partT
oken, other.partToken) && _isEqualTokens(node.ofToken, other.ofToken) && _isEqua
lNodes(node.libraryName, other.libraryName) && _isEqualTokens(node.semicolon, ot
her.semicolon); |
| 15154 } | 15154 } |
| 15155 | 15155 |
| 15156 bool visitPostfixExpression(PostfixExpression node) { | 15156 bool visitPostfixExpression(PostfixExpression node) { |
| 15157 PostfixExpression other = this._other as PostfixExpression; | 15157 PostfixExpression other = this._other as PostfixExpression; |
| 15158 return isEqualNodes(node.operand, other.operand) && isEqualTokens(node.opera
tor, other.operator); | 15158 return _isEqualNodes(node.operand, other.operand) && _isEqualTokens(node.ope
rator, other.operator); |
| 15159 } | 15159 } |
| 15160 | 15160 |
| 15161 bool visitPrefixedIdentifier(PrefixedIdentifier node) { | 15161 bool visitPrefixedIdentifier(PrefixedIdentifier node) { |
| 15162 PrefixedIdentifier other = this._other as PrefixedIdentifier; | 15162 PrefixedIdentifier other = this._other as PrefixedIdentifier; |
| 15163 return isEqualNodes(node.prefix, other.prefix) && isEqualTokens(node.period,
other.period) && isEqualNodes(node.identifier, other.identifier); | 15163 return _isEqualNodes(node.prefix, other.prefix) && _isEqualTokens(node.perio
d, other.period) && _isEqualNodes(node.identifier, other.identifier); |
| 15164 } | 15164 } |
| 15165 | 15165 |
| 15166 bool visitPrefixExpression(PrefixExpression node) { | 15166 bool visitPrefixExpression(PrefixExpression node) { |
| 15167 PrefixExpression other = this._other as PrefixExpression; | 15167 PrefixExpression other = this._other as PrefixExpression; |
| 15168 return isEqualTokens(node.operator, other.operator) && isEqualNodes(node.ope
rand, other.operand); | 15168 return _isEqualTokens(node.operator, other.operator) && _isEqualNodes(node.o
perand, other.operand); |
| 15169 } | 15169 } |
| 15170 | 15170 |
| 15171 bool visitPropertyAccess(PropertyAccess node) { | 15171 bool visitPropertyAccess(PropertyAccess node) { |
| 15172 PropertyAccess other = this._other as PropertyAccess; | 15172 PropertyAccess other = this._other as PropertyAccess; |
| 15173 return isEqualNodes(node.target, other.target) && isEqualTokens(node.operato
r, other.operator) && isEqualNodes(node.propertyName, other.propertyName); | 15173 return _isEqualNodes(node.target, other.target) && _isEqualTokens(node.opera
tor, other.operator) && _isEqualNodes(node.propertyName, other.propertyName); |
| 15174 } | 15174 } |
| 15175 | 15175 |
| 15176 bool visitRedirectingConstructorInvocation(RedirectingConstructorInvocation no
de) { | 15176 bool visitRedirectingConstructorInvocation(RedirectingConstructorInvocation no
de) { |
| 15177 RedirectingConstructorInvocation other = this._other as RedirectingConstruct
orInvocation; | 15177 RedirectingConstructorInvocation other = this._other as RedirectingConstruct
orInvocation; |
| 15178 return isEqualTokens(node.keyword, other.keyword) && isEqualTokens(node.peri
od, other.period) && isEqualNodes(node.constructorName, other.constructorName) &
& isEqualNodes(node.argumentList, other.argumentList); | 15178 return _isEqualTokens(node.keyword, other.keyword) && _isEqualTokens(node.pe
riod, other.period) && _isEqualNodes(node.constructorName, other.constructorName
) && _isEqualNodes(node.argumentList, other.argumentList); |
| 15179 } | 15179 } |
| 15180 | 15180 |
| 15181 bool visitRethrowExpression(RethrowExpression node) { | 15181 bool visitRethrowExpression(RethrowExpression node) { |
| 15182 RethrowExpression other = this._other as RethrowExpression; | 15182 RethrowExpression other = this._other as RethrowExpression; |
| 15183 return isEqualTokens(node.keyword, other.keyword); | 15183 return _isEqualTokens(node.keyword, other.keyword); |
| 15184 } | 15184 } |
| 15185 | 15185 |
| 15186 bool visitReturnStatement(ReturnStatement node) { | 15186 bool visitReturnStatement(ReturnStatement node) { |
| 15187 ReturnStatement other = this._other as ReturnStatement; | 15187 ReturnStatement other = this._other as ReturnStatement; |
| 15188 return isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.expre
ssion, other.expression) && isEqualTokens(node.semicolon, other.semicolon); | 15188 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node.exp
ression, other.expression) && _isEqualTokens(node.semicolon, other.semicolon); |
| 15189 } | 15189 } |
| 15190 | 15190 |
| 15191 bool visitScriptTag(ScriptTag node) { | 15191 bool visitScriptTag(ScriptTag node) { |
| 15192 ScriptTag other = this._other as ScriptTag; | 15192 ScriptTag other = this._other as ScriptTag; |
| 15193 return isEqualTokens(node.scriptTag, other.scriptTag); | 15193 return _isEqualTokens(node.scriptTag, other.scriptTag); |
| 15194 } | 15194 } |
| 15195 | 15195 |
| 15196 bool visitShowCombinator(ShowCombinator node) { | 15196 bool visitShowCombinator(ShowCombinator node) { |
| 15197 ShowCombinator other = this._other as ShowCombinator; | 15197 ShowCombinator other = this._other as ShowCombinator; |
| 15198 return isEqualTokens(node.keyword, other.keyword) && isEqualNodeLists(node.s
hownNames, other.shownNames); | 15198 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodeLists(node
.shownNames, other.shownNames); |
| 15199 } | 15199 } |
| 15200 | 15200 |
| 15201 bool visitSimpleFormalParameter(SimpleFormalParameter node) { | 15201 bool visitSimpleFormalParameter(SimpleFormalParameter node) { |
| 15202 SimpleFormalParameter other = this._other as SimpleFormalParameter; | 15202 SimpleFormalParameter other = this._other as SimpleFormalParameter; |
| 15203 return isEqualNodes(node.documentationComment, other.documentationComment) &
& isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.keyword,
other.keyword) && isEqualNodes(node.type, other.type) && isEqualNodes(node.iden
tifier, other.identifier); | 15203 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.type, other.type) && _isEqualNodes(node
.identifier, other.identifier); |
| 15204 } | 15204 } |
| 15205 | 15205 |
| 15206 bool visitSimpleIdentifier(SimpleIdentifier node) { | 15206 bool visitSimpleIdentifier(SimpleIdentifier node) { |
| 15207 SimpleIdentifier other = this._other as SimpleIdentifier; | 15207 SimpleIdentifier other = this._other as SimpleIdentifier; |
| 15208 return isEqualTokens(node.token, other.token); | 15208 return _isEqualTokens(node.token, other.token); |
| 15209 } | 15209 } |
| 15210 | 15210 |
| 15211 bool visitSimpleStringLiteral(SimpleStringLiteral node) { | 15211 bool visitSimpleStringLiteral(SimpleStringLiteral node) { |
| 15212 SimpleStringLiteral other = this._other as SimpleStringLiteral; | 15212 SimpleStringLiteral other = this._other as SimpleStringLiteral; |
| 15213 return isEqualTokens(node.literal, other.literal) && (node.value == other.va
lue); | 15213 return _isEqualTokens(node.literal, other.literal) && (node.value == other.v
alue); |
| 15214 } | 15214 } |
| 15215 | 15215 |
| 15216 bool visitStringInterpolation(StringInterpolation node) { | 15216 bool visitStringInterpolation(StringInterpolation node) { |
| 15217 StringInterpolation other = this._other as StringInterpolation; | 15217 StringInterpolation other = this._other as StringInterpolation; |
| 15218 return isEqualNodeLists(node.elements, other.elements); | 15218 return _isEqualNodeLists(node.elements, other.elements); |
| 15219 } | 15219 } |
| 15220 | 15220 |
| 15221 bool visitSuperConstructorInvocation(SuperConstructorInvocation node) { | 15221 bool visitSuperConstructorInvocation(SuperConstructorInvocation node) { |
| 15222 SuperConstructorInvocation other = this._other as SuperConstructorInvocation
; | 15222 SuperConstructorInvocation other = this._other as SuperConstructorInvocation
; |
| 15223 return isEqualTokens(node.keyword, other.keyword) && isEqualTokens(node.peri
od, other.period) && isEqualNodes(node.constructorName, other.constructorName) &
& isEqualNodes(node.argumentList, other.argumentList); | 15223 return _isEqualTokens(node.keyword, other.keyword) && _isEqualTokens(node.pe
riod, other.period) && _isEqualNodes(node.constructorName, other.constructorName
) && _isEqualNodes(node.argumentList, other.argumentList); |
| 15224 } | 15224 } |
| 15225 | 15225 |
| 15226 bool visitSuperExpression(SuperExpression node) { | 15226 bool visitSuperExpression(SuperExpression node) { |
| 15227 SuperExpression other = this._other as SuperExpression; | 15227 SuperExpression other = this._other as SuperExpression; |
| 15228 return isEqualTokens(node.keyword, other.keyword); | 15228 return _isEqualTokens(node.keyword, other.keyword); |
| 15229 } | 15229 } |
| 15230 | 15230 |
| 15231 bool visitSwitchCase(SwitchCase node) { | 15231 bool visitSwitchCase(SwitchCase node) { |
| 15232 SwitchCase other = this._other as SwitchCase; | 15232 SwitchCase other = this._other as SwitchCase; |
| 15233 return isEqualNodeLists(node.labels, other.labels) && isEqualTokens(node.key
word, other.keyword) && isEqualNodes(node.expression, other.expression) && isEqu
alTokens(node.colon, other.colon) && isEqualNodeLists(node.statements, other.sta
tements); | 15233 return _isEqualNodeLists(node.labels, other.labels) && _isEqualTokens(node.k
eyword, other.keyword) && _isEqualNodes(node.expression, other.expression) && _i
sEqualTokens(node.colon, other.colon) && _isEqualNodeLists(node.statements, othe
r.statements); |
| 15234 } | 15234 } |
| 15235 | 15235 |
| 15236 bool visitSwitchDefault(SwitchDefault node) { | 15236 bool visitSwitchDefault(SwitchDefault node) { |
| 15237 SwitchDefault other = this._other as SwitchDefault; | 15237 SwitchDefault other = this._other as SwitchDefault; |
| 15238 return isEqualNodeLists(node.labels, other.labels) && isEqualTokens(node.key
word, other.keyword) && isEqualTokens(node.colon, other.colon) && isEqualNodeLis
ts(node.statements, other.statements); | 15238 return _isEqualNodeLists(node.labels, other.labels) && _isEqualTokens(node.k
eyword, other.keyword) && _isEqualTokens(node.colon, other.colon) && _isEqualNod
eLists(node.statements, other.statements); |
| 15239 } | 15239 } |
| 15240 | 15240 |
| 15241 bool visitSwitchStatement(SwitchStatement node) { | 15241 bool visitSwitchStatement(SwitchStatement node) { |
| 15242 SwitchStatement other = this._other as SwitchStatement; | 15242 SwitchStatement other = this._other as SwitchStatement; |
| 15243 return isEqualTokens(node.keyword, other.keyword) && isEqualTokens(node.left
Parenthesis, other.leftParenthesis) && isEqualNodes(node.expression, other.expre
ssion) && isEqualTokens(node.rightParenthesis, other.rightParenthesis) && isEqua
lTokens(node.leftBracket, other.leftBracket) && isEqualNodeLists(node.members, o
ther.members) && isEqualTokens(node.rightBracket, other.rightBracket); | 15243 return _isEqualTokens(node.keyword, other.keyword) && _isEqualTokens(node.le
ftParenthesis, other.leftParenthesis) && _isEqualNodes(node.expression, other.ex
pression) && _isEqualTokens(node.rightParenthesis, other.rightParenthesis) && _i
sEqualTokens(node.leftBracket, other.leftBracket) && _isEqualNodeLists(node.memb
ers, other.members) && _isEqualTokens(node.rightBracket, other.rightBracket); |
| 15244 } | 15244 } |
| 15245 | 15245 |
| 15246 bool visitSymbolLiteral(SymbolLiteral node) { | 15246 bool visitSymbolLiteral(SymbolLiteral node) { |
| 15247 SymbolLiteral other = this._other as SymbolLiteral; | 15247 SymbolLiteral other = this._other as SymbolLiteral; |
| 15248 return isEqualTokens(node.poundSign, other.poundSign) && isEqualTokenLists(n
ode.components, other.components); | 15248 return _isEqualTokens(node.poundSign, other.poundSign) && _isEqualTokenLists
(node.components, other.components); |
| 15249 } | 15249 } |
| 15250 | 15250 |
| 15251 bool visitThisExpression(ThisExpression node) { | 15251 bool visitThisExpression(ThisExpression node) { |
| 15252 ThisExpression other = this._other as ThisExpression; | 15252 ThisExpression other = this._other as ThisExpression; |
| 15253 return isEqualTokens(node.keyword, other.keyword); | 15253 return _isEqualTokens(node.keyword, other.keyword); |
| 15254 } | 15254 } |
| 15255 | 15255 |
| 15256 bool visitThrowExpression(ThrowExpression node) { | 15256 bool visitThrowExpression(ThrowExpression node) { |
| 15257 ThrowExpression other = this._other as ThrowExpression; | 15257 ThrowExpression other = this._other as ThrowExpression; |
| 15258 return isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.expre
ssion, other.expression); | 15258 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node.exp
ression, other.expression); |
| 15259 } | 15259 } |
| 15260 | 15260 |
| 15261 bool visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) { | 15261 bool visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) { |
| 15262 TopLevelVariableDeclaration other = this._other as TopLevelVariableDeclarati
on; | 15262 TopLevelVariableDeclaration other = this._other as TopLevelVariableDeclarati
on; |
| 15263 return isEqualNodes(node.documentationComment, other.documentationComment) &
& isEqualNodeLists(node.metadata, other.metadata) && isEqualNodes(node.variables
, other.variables) && isEqualTokens(node.semicolon, other.semicolon); | 15263 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualNodes(node.variab
les, other.variables) && _isEqualTokens(node.semicolon, other.semicolon); |
| 15264 } | 15264 } |
| 15265 | 15265 |
| 15266 bool visitTryStatement(TryStatement node) { | 15266 bool visitTryStatement(TryStatement node) { |
| 15267 TryStatement other = this._other as TryStatement; | 15267 TryStatement other = this._other as TryStatement; |
| 15268 return isEqualTokens(node.tryKeyword, other.tryKeyword) && isEqualNodes(node
.body, other.body) && isEqualNodeLists(node.catchClauses, other.catchClauses) &&
isEqualTokens(node.finallyKeyword, other.finallyKeyword) && isEqualNodes(node.f
inallyBlock, other.finallyBlock); | 15268 return _isEqualTokens(node.tryKeyword, other.tryKeyword) && _isEqualNodes(no
de.body, other.body) && _isEqualNodeLists(node.catchClauses, other.catchClauses)
&& _isEqualTokens(node.finallyKeyword, other.finallyKeyword) && _isEqualNodes(n
ode.finallyBlock, other.finallyBlock); |
| 15269 } | 15269 } |
| 15270 | 15270 |
| 15271 bool visitTypeArgumentList(TypeArgumentList node) { | 15271 bool visitTypeArgumentList(TypeArgumentList node) { |
| 15272 TypeArgumentList other = this._other as TypeArgumentList; | 15272 TypeArgumentList other = this._other as TypeArgumentList; |
| 15273 return isEqualTokens(node.leftBracket, other.leftBracket) && isEqualNodeList
s(node.arguments, other.arguments) && isEqualTokens(node.rightBracket, other.rig
htBracket); | 15273 return _isEqualTokens(node.leftBracket, other.leftBracket) && _isEqualNodeLi
sts(node.arguments, other.arguments) && _isEqualTokens(node.rightBracket, other.
rightBracket); |
| 15274 } | 15274 } |
| 15275 | 15275 |
| 15276 bool visitTypeName(TypeName node) { | 15276 bool visitTypeName(TypeName node) { |
| 15277 TypeName other = this._other as TypeName; | 15277 TypeName other = this._other as TypeName; |
| 15278 return isEqualNodes(node.name, other.name) && isEqualNodes(node.typeArgument
s, other.typeArguments); | 15278 return _isEqualNodes(node.name, other.name) && _isEqualNodes(node.typeArgume
nts, other.typeArguments); |
| 15279 } | 15279 } |
| 15280 | 15280 |
| 15281 bool visitTypeParameter(TypeParameter node) { | 15281 bool visitTypeParameter(TypeParameter node) { |
| 15282 TypeParameter other = this._other as TypeParameter; | 15282 TypeParameter other = this._other as TypeParameter; |
| 15283 return isEqualNodes(node.documentationComment, other.documentationComment) &
& isEqualNodeLists(node.metadata, other.metadata) && isEqualNodes(node.name, oth
er.name) && isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.boun
d, other.bound); | 15283 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualNodes(node.name,
other.name) && _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node
.bound, other.bound); |
| 15284 } | 15284 } |
| 15285 | 15285 |
| 15286 bool visitTypeParameterList(TypeParameterList node) { | 15286 bool visitTypeParameterList(TypeParameterList node) { |
| 15287 TypeParameterList other = this._other as TypeParameterList; | 15287 TypeParameterList other = this._other as TypeParameterList; |
| 15288 return isEqualTokens(node.leftBracket, other.leftBracket) && isEqualNodeList
s(node.typeParameters, other.typeParameters) && isEqualTokens(node.rightBracket,
other.rightBracket); | 15288 return _isEqualTokens(node.leftBracket, other.leftBracket) && _isEqualNodeLi
sts(node.typeParameters, other.typeParameters) && _isEqualTokens(node.rightBrack
et, other.rightBracket); |
| 15289 } | 15289 } |
| 15290 | 15290 |
| 15291 bool visitVariableDeclaration(VariableDeclaration node) { | 15291 bool visitVariableDeclaration(VariableDeclaration node) { |
| 15292 VariableDeclaration other = this._other as VariableDeclaration; | 15292 VariableDeclaration other = this._other as VariableDeclaration; |
| 15293 return isEqualNodes(node.documentationComment, other.documentationComment) &
& isEqualNodeLists(node.metadata, other.metadata) && isEqualNodes(node.name, oth
er.name) && isEqualTokens(node.equals, other.equals) && isEqualNodes(node.initia
lizer, other.initializer); | 15293 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualNodes(node.name,
other.name) && _isEqualTokens(node.equals, other.equals) && _isEqualNodes(node.i
nitializer, other.initializer); |
| 15294 } | 15294 } |
| 15295 | 15295 |
| 15296 bool visitVariableDeclarationList(VariableDeclarationList node) { | 15296 bool visitVariableDeclarationList(VariableDeclarationList node) { |
| 15297 VariableDeclarationList other = this._other as VariableDeclarationList; | 15297 VariableDeclarationList other = this._other as VariableDeclarationList; |
| 15298 return isEqualNodes(node.documentationComment, other.documentationComment) &
& isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.keyword,
other.keyword) && isEqualNodes(node.type, other.type) && isEqualNodeLists(node.
variables, other.variables); | 15298 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.type, other.type) && _isEqualNodeLists(
node.variables, other.variables); |
| 15299 } | 15299 } |
| 15300 | 15300 |
| 15301 bool visitVariableDeclarationStatement(VariableDeclarationStatement node) { | 15301 bool visitVariableDeclarationStatement(VariableDeclarationStatement node) { |
| 15302 VariableDeclarationStatement other = this._other as VariableDeclarationState
ment; | 15302 VariableDeclarationStatement other = this._other as VariableDeclarationState
ment; |
| 15303 return isEqualNodes(node.variables, other.variables) && isEqualTokens(node.s
emicolon, other.semicolon); | 15303 return _isEqualNodes(node.variables, other.variables) && _isEqualTokens(node
.semicolon, other.semicolon); |
| 15304 } | 15304 } |
| 15305 | 15305 |
| 15306 bool visitWhileStatement(WhileStatement node) { | 15306 bool visitWhileStatement(WhileStatement node) { |
| 15307 WhileStatement other = this._other as WhileStatement; | 15307 WhileStatement other = this._other as WhileStatement; |
| 15308 return isEqualTokens(node.keyword, other.keyword) && isEqualTokens(node.left
Parenthesis, other.leftParenthesis) && isEqualNodes(node.condition, other.condit
ion) && isEqualTokens(node.rightParenthesis, other.rightParenthesis) && isEqualN
odes(node.body, other.body); | 15308 return _isEqualTokens(node.keyword, other.keyword) && _isEqualTokens(node.le
ftParenthesis, other.leftParenthesis) && _isEqualNodes(node.condition, other.con
dition) && _isEqualTokens(node.rightParenthesis, other.rightParenthesis) && _isE
qualNodes(node.body, other.body); |
| 15309 } | 15309 } |
| 15310 | 15310 |
| 15311 bool visitWithClause(WithClause node) { | 15311 bool visitWithClause(WithClause node) { |
| 15312 WithClause other = this._other as WithClause; | 15312 WithClause other = this._other as WithClause; |
| 15313 return isEqualTokens(node.withKeyword, other.withKeyword) && isEqualNodeList
s(node.mixinTypes, other.mixinTypes); | 15313 return _isEqualTokens(node.withKeyword, other.withKeyword) && _isEqualNodeLi
sts(node.mixinTypes, other.mixinTypes); |
| 15314 } | 15314 } |
| 15315 | 15315 |
| 15316 /** | 15316 /** |
| 15317 * Return `true` if the given lists of AST nodes have the same size and corres
ponding | 15317 * Return `true` if the given lists of AST nodes have the same size and corres
ponding |
| 15318 * elements are equal. | 15318 * elements are equal. |
| 15319 * | 15319 * |
| 15320 * @param first the first node being compared | 15320 * @param first the first node being compared |
| 15321 * @param second the second node being compared | 15321 * @param second the second node being compared |
| 15322 * @return `true` if the given AST nodes have the same size and corresponding
elements are | 15322 * @return `true` if the given AST nodes have the same size and corresponding
elements are |
| 15323 * equal | 15323 * equal |
| 15324 */ | 15324 */ |
| 15325 bool isEqualNodeLists(NodeList first, NodeList second) { | 15325 bool _isEqualNodeLists(NodeList first, NodeList second) { |
| 15326 if (first == null) { | 15326 if (first == null) { |
| 15327 return second == null; | 15327 return second == null; |
| 15328 } else if (second == null) { | 15328 } else if (second == null) { |
| 15329 return false; | 15329 return false; |
| 15330 } | 15330 } |
| 15331 int size = first.length; | 15331 int size = first.length; |
| 15332 if (second.length != size) { | 15332 if (second.length != size) { |
| 15333 return false; | 15333 return false; |
| 15334 } | 15334 } |
| 15335 for (int i = 0; i < size; i++) { | 15335 for (int i = 0; i < size; i++) { |
| 15336 if (!isEqualNodes(first[i], second[i])) { | 15336 if (!_isEqualNodes(first[i], second[i])) { |
| 15337 return false; | 15337 return false; |
| 15338 } | 15338 } |
| 15339 } | 15339 } |
| 15340 return true; | 15340 return true; |
| 15341 } | 15341 } |
| 15342 | 15342 |
| 15343 /** | 15343 /** |
| 15344 * Return `true` if the given AST nodes have the same structure. | 15344 * Return `true` if the given AST nodes have the same structure. |
| 15345 * | 15345 * |
| 15346 * @param first the first node being compared | 15346 * @param first the first node being compared |
| 15347 * @param second the second node being compared | 15347 * @param second the second node being compared |
| 15348 * @return `true` if the given AST nodes have the same structure | 15348 * @return `true` if the given AST nodes have the same structure |
| 15349 */ | 15349 */ |
| 15350 bool isEqualNodes(AstNode first, AstNode second) { | 15350 bool _isEqualNodes(AstNode first, AstNode second) { |
| 15351 if (first == null) { | 15351 if (first == null) { |
| 15352 return second == null; | 15352 return second == null; |
| 15353 } else if (second == null) { | 15353 } else if (second == null) { |
| 15354 return false; | 15354 return false; |
| 15355 } else if (first.runtimeType != second.runtimeType) { | 15355 } else if (first.runtimeType != second.runtimeType) { |
| 15356 return false; | 15356 return false; |
| 15357 } | 15357 } |
| 15358 _other = second; | 15358 _other = second; |
| 15359 return first.accept(this); | 15359 return first.accept(this); |
| 15360 } | 15360 } |
| 15361 | 15361 |
| 15362 /** | 15362 /** |
| 15363 * Return `true` if the given arrays of tokens have the same length and corres
ponding | 15363 * Return `true` if the given arrays of tokens have the same length and corres
ponding |
| 15364 * elements are equal. | 15364 * elements are equal. |
| 15365 * | 15365 * |
| 15366 * @param first the first node being compared | 15366 * @param first the first node being compared |
| 15367 * @param second the second node being compared | 15367 * @param second the second node being compared |
| 15368 * @return `true` if the given arrays of tokens have the same length and corre
sponding | 15368 * @return `true` if the given arrays of tokens have the same length and corre
sponding |
| 15369 * elements are equal | 15369 * elements are equal |
| 15370 */ | 15370 */ |
| 15371 bool isEqualTokenLists(List<Token> first, List<Token> second) { | 15371 bool _isEqualTokenLists(List<Token> first, List<Token> second) { |
| 15372 int length = first.length; | 15372 int length = first.length; |
| 15373 if (second.length != length) { | 15373 if (second.length != length) { |
| 15374 return false; | 15374 return false; |
| 15375 } | 15375 } |
| 15376 for (int i = 0; i < length; i++) { | 15376 for (int i = 0; i < length; i++) { |
| 15377 if (isEqualTokens(first[i], second[i])) { | 15377 if (_isEqualTokens(first[i], second[i])) { |
| 15378 return false; | 15378 return false; |
| 15379 } | 15379 } |
| 15380 } | 15380 } |
| 15381 return true; | 15381 return true; |
| 15382 } | 15382 } |
| 15383 | 15383 |
| 15384 /** | 15384 /** |
| 15385 * Return `true` if the given tokens have the same structure. | 15385 * Return `true` if the given tokens have the same structure. |
| 15386 * | 15386 * |
| 15387 * @param first the first node being compared | 15387 * @param first the first node being compared |
| 15388 * @param second the second node being compared | 15388 * @param second the second node being compared |
| 15389 * @return `true` if the given tokens have the same structure | 15389 * @return `true` if the given tokens have the same structure |
| 15390 */ | 15390 */ |
| 15391 bool isEqualTokens(Token first, Token second) { | 15391 bool _isEqualTokens(Token first, Token second) { |
| 15392 if (first == null) { | 15392 if (first == null) { |
| 15393 return second == null; | 15393 return second == null; |
| 15394 } else if (second == null) { | 15394 } else if (second == null) { |
| 15395 return false; | 15395 return false; |
| 15396 } | 15396 } |
| 15397 return first.offset == second.offset && first.length == second.length && fir
st.lexeme == second.lexeme; | 15397 return first.offset == second.offset && first.length == second.length && fir
st.lexeme == second.lexeme; |
| 15398 } | 15398 } |
| 15399 } | 15399 } |
| 15400 | 15400 |
| 15401 /** | 15401 /** |
| (...skipping 25 matching lines...) Expand all Loading... |
| 15427 * @param oldNode the node to be replaced | 15427 * @param oldNode the node to be replaced |
| 15428 * @param newNode the replacement node | 15428 * @param newNode the replacement node |
| 15429 * @param tokenMap a mapping of old tokens to new tokens (not `null`) | 15429 * @param tokenMap a mapping of old tokens to new tokens (not `null`) |
| 15430 */ | 15430 */ |
| 15431 IncrementalAstCloner(AstNode oldNode, AstNode newNode, TokenMap tokenMap) { | 15431 IncrementalAstCloner(AstNode oldNode, AstNode newNode, TokenMap tokenMap) { |
| 15432 this._oldNode = oldNode; | 15432 this._oldNode = oldNode; |
| 15433 this._newNode = newNode; | 15433 this._newNode = newNode; |
| 15434 this._tokenMap = tokenMap; | 15434 this._tokenMap = tokenMap; |
| 15435 } | 15435 } |
| 15436 | 15436 |
| 15437 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => new AdjacentStri
ngs(cloneNodeList(node.strings)); | 15437 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => new AdjacentStri
ngs(_cloneNodeList(node.strings)); |
| 15438 | 15438 |
| 15439 Annotation visitAnnotation(Annotation node) { | 15439 Annotation visitAnnotation(Annotation node) { |
| 15440 Annotation copy = new Annotation(mapToken(node.atSign), cloneNode(node.name)
, mapToken(node.period), cloneNode(node.constructorName), cloneNode(node.argumen
ts)); | 15440 Annotation copy = new Annotation(_mapToken(node.atSign), _cloneNode(node.nam
e), _mapToken(node.period), _cloneNode(node.constructorName), _cloneNode(node.ar
guments)); |
| 15441 copy.element = node.element; | 15441 copy.element = node.element; |
| 15442 return copy; | 15442 return copy; |
| 15443 } | 15443 } |
| 15444 | 15444 |
| 15445 ArgumentDefinitionTest visitArgumentDefinitionTest(ArgumentDefinitionTest node
) { | 15445 ArgumentDefinitionTest visitArgumentDefinitionTest(ArgumentDefinitionTest node
) { |
| 15446 ArgumentDefinitionTest copy = new ArgumentDefinitionTest(mapToken(node.quest
ion), cloneNode(node.identifier)); | 15446 ArgumentDefinitionTest copy = new ArgumentDefinitionTest(_mapToken(node.ques
tion), _cloneNode(node.identifier)); |
| 15447 copy.propagatedType = node.propagatedType; | 15447 copy.propagatedType = node.propagatedType; |
| 15448 copy.staticType = node.staticType; | 15448 copy.staticType = node.staticType; |
| 15449 return copy; | 15449 return copy; |
| 15450 } | 15450 } |
| 15451 | 15451 |
| 15452 ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList(mapToken
(node.leftParenthesis), cloneNodeList(node.arguments), mapToken(node.rightParent
hesis)); | 15452 ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList(_mapToke
n(node.leftParenthesis), _cloneNodeList(node.arguments), _mapToken(node.rightPar
enthesis)); |
| 15453 | 15453 |
| 15454 AsExpression visitAsExpression(AsExpression node) { | 15454 AsExpression visitAsExpression(AsExpression node) { |
| 15455 AsExpression copy = new AsExpression(cloneNode(node.expression), mapToken(no
de.asOperator), cloneNode(node.type)); | 15455 AsExpression copy = new AsExpression(_cloneNode(node.expression), _mapToken(
node.asOperator), _cloneNode(node.type)); |
| 15456 copy.propagatedType = node.propagatedType; | 15456 copy.propagatedType = node.propagatedType; |
| 15457 copy.staticType = node.staticType; | 15457 copy.staticType = node.staticType; |
| 15458 return copy; | 15458 return copy; |
| 15459 } | 15459 } |
| 15460 | 15460 |
| 15461 AstNode visitAssertStatement(AssertStatement node) => new AssertStatement(mapT
oken(node.keyword), mapToken(node.leftParenthesis), cloneNode(node.condition), m
apToken(node.rightParenthesis), mapToken(node.semicolon)); | 15461 AstNode visitAssertStatement(AssertStatement node) => new AssertStatement(_map
Token(node.keyword), _mapToken(node.leftParenthesis), _cloneNode(node.condition)
, _mapToken(node.rightParenthesis), _mapToken(node.semicolon)); |
| 15462 | 15462 |
| 15463 AssignmentExpression visitAssignmentExpression(AssignmentExpression node) { | 15463 AssignmentExpression visitAssignmentExpression(AssignmentExpression node) { |
| 15464 AssignmentExpression copy = new AssignmentExpression(cloneNode(node.leftHand
Side), mapToken(node.operator), cloneNode(node.rightHandSide)); | 15464 AssignmentExpression copy = new AssignmentExpression(_cloneNode(node.leftHan
dSide), _mapToken(node.operator), _cloneNode(node.rightHandSide)); |
| 15465 copy.propagatedElement = node.propagatedElement; | 15465 copy.propagatedElement = node.propagatedElement; |
| 15466 copy.propagatedType = node.propagatedType; | 15466 copy.propagatedType = node.propagatedType; |
| 15467 copy.staticElement = node.staticElement; | 15467 copy.staticElement = node.staticElement; |
| 15468 copy.staticType = node.staticType; | 15468 copy.staticType = node.staticType; |
| 15469 return copy; | 15469 return copy; |
| 15470 } | 15470 } |
| 15471 | 15471 |
| 15472 BinaryExpression visitBinaryExpression(BinaryExpression node) { | 15472 BinaryExpression visitBinaryExpression(BinaryExpression node) { |
| 15473 BinaryExpression copy = new BinaryExpression(cloneNode(node.leftOperand), ma
pToken(node.operator), cloneNode(node.rightOperand)); | 15473 BinaryExpression copy = new BinaryExpression(_cloneNode(node.leftOperand), _
mapToken(node.operator), _cloneNode(node.rightOperand)); |
| 15474 copy.propagatedElement = node.propagatedElement; | 15474 copy.propagatedElement = node.propagatedElement; |
| 15475 copy.propagatedType = node.propagatedType; | 15475 copy.propagatedType = node.propagatedType; |
| 15476 copy.staticElement = node.staticElement; | 15476 copy.staticElement = node.staticElement; |
| 15477 copy.staticType = node.staticType; | 15477 copy.staticType = node.staticType; |
| 15478 return copy; | 15478 return copy; |
| 15479 } | 15479 } |
| 15480 | 15480 |
| 15481 Block visitBlock(Block node) => new Block(mapToken(node.leftBracket), cloneNod
eList(node.statements), mapToken(node.rightBracket)); | 15481 Block visitBlock(Block node) => new Block(_mapToken(node.leftBracket), _cloneN
odeList(node.statements), _mapToken(node.rightBracket)); |
| 15482 | 15482 |
| 15483 BlockFunctionBody visitBlockFunctionBody(BlockFunctionBody node) => new BlockF
unctionBody(cloneNode(node.block)); | 15483 BlockFunctionBody visitBlockFunctionBody(BlockFunctionBody node) => new BlockF
unctionBody(_cloneNode(node.block)); |
| 15484 | 15484 |
| 15485 BooleanLiteral visitBooleanLiteral(BooleanLiteral node) { | 15485 BooleanLiteral visitBooleanLiteral(BooleanLiteral node) { |
| 15486 BooleanLiteral copy = new BooleanLiteral(mapToken(node.literal), node.value)
; | 15486 BooleanLiteral copy = new BooleanLiteral(_mapToken(node.literal), node.value
); |
| 15487 copy.propagatedType = node.propagatedType; | 15487 copy.propagatedType = node.propagatedType; |
| 15488 copy.staticType = node.staticType; | 15488 copy.staticType = node.staticType; |
| 15489 return copy; | 15489 return copy; |
| 15490 } | 15490 } |
| 15491 | 15491 |
| 15492 BreakStatement visitBreakStatement(BreakStatement node) => new BreakStatement(
mapToken(node.keyword), cloneNode(node.label), mapToken(node.semicolon)); | 15492 BreakStatement visitBreakStatement(BreakStatement node) => new BreakStatement(
_mapToken(node.keyword), _cloneNode(node.label), _mapToken(node.semicolon)); |
| 15493 | 15493 |
| 15494 CascadeExpression visitCascadeExpression(CascadeExpression node) { | 15494 CascadeExpression visitCascadeExpression(CascadeExpression node) { |
| 15495 CascadeExpression copy = new CascadeExpression(cloneNode(node.target), clone
NodeList(node.cascadeSections)); | 15495 CascadeExpression copy = new CascadeExpression(_cloneNode(node.target), _clo
neNodeList(node.cascadeSections)); |
| 15496 copy.propagatedType = node.propagatedType; | 15496 copy.propagatedType = node.propagatedType; |
| 15497 copy.staticType = node.staticType; | 15497 copy.staticType = node.staticType; |
| 15498 return copy; | 15498 return copy; |
| 15499 } | 15499 } |
| 15500 | 15500 |
| 15501 CatchClause visitCatchClause(CatchClause node) => new CatchClause(mapToken(nod
e.onKeyword), cloneNode(node.exceptionType), mapToken(node.catchKeyword), mapTok
en(node.leftParenthesis), cloneNode(node.exceptionParameter), mapToken(node.comm
a), cloneNode(node.stackTraceParameter), mapToken(node.rightParenthesis), cloneN
ode(node.body)); | 15501 CatchClause visitCatchClause(CatchClause node) => new CatchClause(_mapToken(no
de.onKeyword), _cloneNode(node.exceptionType), _mapToken(node.catchKeyword), _ma
pToken(node.leftParenthesis), _cloneNode(node.exceptionParameter), _mapToken(nod
e.comma), _cloneNode(node.stackTraceParameter), _mapToken(node.rightParenthesis)
, _cloneNode(node.body)); |
| 15502 | 15502 |
| 15503 ClassDeclaration visitClassDeclaration(ClassDeclaration node) { | 15503 ClassDeclaration visitClassDeclaration(ClassDeclaration node) { |
| 15504 ClassDeclaration copy = new ClassDeclaration(cloneNode(node.documentationCom
ment), cloneNodeList(node.metadata), mapToken(node.abstractKeyword), mapToken(no
de.classKeyword), cloneNode(node.name), cloneNode(node.typeParameters), cloneNod
e(node.extendsClause), cloneNode(node.withClause), cloneNode(node.implementsClau
se), mapToken(node.leftBracket), cloneNodeList(node.members), mapToken(node.righ
tBracket)); | 15504 ClassDeclaration copy = new ClassDeclaration(_cloneNode(node.documentationCo
mment), _cloneNodeList(node.metadata), _mapToken(node.abstractKeyword), _mapToke
n(node.classKeyword), _cloneNode(node.name), _cloneNode(node.typeParameters), _c
loneNode(node.extendsClause), _cloneNode(node.withClause), _cloneNode(node.imple
mentsClause), _mapToken(node.leftBracket), _cloneNodeList(node.members), _mapTok
en(node.rightBracket)); |
| 15505 copy.nativeClause = cloneNode(node.nativeClause); | 15505 copy.nativeClause = _cloneNode(node.nativeClause); |
| 15506 return copy; | 15506 return copy; |
| 15507 } | 15507 } |
| 15508 | 15508 |
| 15509 ClassTypeAlias visitClassTypeAlias(ClassTypeAlias node) => new ClassTypeAlias(
cloneNode(node.documentationComment), cloneNodeList(node.metadata), mapToken(nod
e.keyword), cloneNode(node.name), cloneNode(node.typeParameters), mapToken(node.
equals), mapToken(node.abstractKeyword), cloneNode(node.superclass), cloneNode(n
ode.withClause), cloneNode(node.implementsClause), mapToken(node.semicolon)); | 15509 ClassTypeAlias visitClassTypeAlias(ClassTypeAlias node) => new ClassTypeAlias(
_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), _mapToken(
node.keyword), _cloneNode(node.name), _cloneNode(node.typeParameters), _mapToken
(node.equals), _mapToken(node.abstractKeyword), _cloneNode(node.superclass), _cl
oneNode(node.withClause), _cloneNode(node.implementsClause), _mapToken(node.semi
colon)); |
| 15510 | 15510 |
| 15511 Comment visitComment(Comment node) { | 15511 Comment visitComment(Comment node) { |
| 15512 if (node.isDocumentation) { | 15512 if (node.isDocumentation) { |
| 15513 return Comment.createDocumentationCommentWithReferences(mapTokens(node.tok
ens), cloneNodeList(node.references)); | 15513 return Comment.createDocumentationCommentWithReferences(_mapTokens(node.to
kens), _cloneNodeList(node.references)); |
| 15514 } else if (node.isBlock) { | 15514 } else if (node.isBlock) { |
| 15515 return Comment.createBlockComment(mapTokens(node.tokens)); | 15515 return Comment.createBlockComment(_mapTokens(node.tokens)); |
| 15516 } | 15516 } |
| 15517 return Comment.createEndOfLineComment(mapTokens(node.tokens)); | 15517 return Comment.createEndOfLineComment(_mapTokens(node.tokens)); |
| 15518 } | 15518 } |
| 15519 | 15519 |
| 15520 CommentReference visitCommentReference(CommentReference node) => new CommentRe
ference(mapToken(node.newKeyword), cloneNode(node.identifier)); | 15520 CommentReference visitCommentReference(CommentReference node) => new CommentRe
ference(_mapToken(node.newKeyword), _cloneNode(node.identifier)); |
| 15521 | 15521 |
| 15522 CompilationUnit visitCompilationUnit(CompilationUnit node) { | 15522 CompilationUnit visitCompilationUnit(CompilationUnit node) { |
| 15523 CompilationUnit copy = new CompilationUnit(mapToken(node.beginToken), cloneN
ode(node.scriptTag), cloneNodeList(node.directives), cloneNodeList(node.declarat
ions), mapToken(node.endToken)); | 15523 CompilationUnit copy = new CompilationUnit(_mapToken(node.beginToken), _clon
eNode(node.scriptTag), _cloneNodeList(node.directives), _cloneNodeList(node.decl
arations), _mapToken(node.endToken)); |
| 15524 copy.lineInfo = node.lineInfo; | 15524 copy.lineInfo = node.lineInfo; |
| 15525 copy.element = node.element; | 15525 copy.element = node.element; |
| 15526 return copy; | 15526 return copy; |
| 15527 } | 15527 } |
| 15528 | 15528 |
| 15529 ConditionalExpression visitConditionalExpression(ConditionalExpression node) { | 15529 ConditionalExpression visitConditionalExpression(ConditionalExpression node) { |
| 15530 ConditionalExpression copy = new ConditionalExpression(cloneNode(node.condit
ion), mapToken(node.question), cloneNode(node.thenExpression), mapToken(node.col
on), cloneNode(node.elseExpression)); | 15530 ConditionalExpression copy = new ConditionalExpression(_cloneNode(node.condi
tion), _mapToken(node.question), _cloneNode(node.thenExpression), _mapToken(node
.colon), _cloneNode(node.elseExpression)); |
| 15531 copy.propagatedType = node.propagatedType; | 15531 copy.propagatedType = node.propagatedType; |
| 15532 copy.staticType = node.staticType; | 15532 copy.staticType = node.staticType; |
| 15533 return copy; | 15533 return copy; |
| 15534 } | 15534 } |
| 15535 | 15535 |
| 15536 ConstructorDeclaration visitConstructorDeclaration(ConstructorDeclaration node
) { | 15536 ConstructorDeclaration visitConstructorDeclaration(ConstructorDeclaration node
) { |
| 15537 ConstructorDeclaration copy = new ConstructorDeclaration(cloneNode(node.docu
mentationComment), cloneNodeList(node.metadata), mapToken(node.externalKeyword),
mapToken(node.constKeyword), mapToken(node.factoryKeyword), cloneNode(node.retu
rnType), mapToken(node.period), cloneNode(node.name), cloneNode(node.parameters)
, mapToken(node.separator), cloneNodeList(node.initializers), cloneNode(node.red
irectedConstructor), cloneNode(node.body)); | 15537 ConstructorDeclaration copy = new ConstructorDeclaration(_cloneNode(node.doc
umentationComment), _cloneNodeList(node.metadata), _mapToken(node.externalKeywor
d), _mapToken(node.constKeyword), _mapToken(node.factoryKeyword), _cloneNode(nod
e.returnType), _mapToken(node.period), _cloneNode(node.name), _cloneNode(node.pa
rameters), _mapToken(node.separator), _cloneNodeList(node.initializers), _cloneN
ode(node.redirectedConstructor), _cloneNode(node.body)); |
| 15538 copy.element = node.element; | 15538 copy.element = node.element; |
| 15539 return copy; | 15539 return copy; |
| 15540 } | 15540 } |
| 15541 | 15541 |
| 15542 ConstructorFieldInitializer visitConstructorFieldInitializer(ConstructorFieldI
nitializer node) => new ConstructorFieldInitializer(mapToken(node.keyword), mapT
oken(node.period), cloneNode(node.fieldName), mapToken(node.equals), cloneNode(n
ode.expression)); | 15542 ConstructorFieldInitializer visitConstructorFieldInitializer(ConstructorFieldI
nitializer node) => new ConstructorFieldInitializer(_mapToken(node.keyword), _ma
pToken(node.period), _cloneNode(node.fieldName), _mapToken(node.equals), _cloneN
ode(node.expression)); |
| 15543 | 15543 |
| 15544 ConstructorName visitConstructorName(ConstructorName node) { | 15544 ConstructorName visitConstructorName(ConstructorName node) { |
| 15545 ConstructorName copy = new ConstructorName(cloneNode(node.type), mapToken(no
de.period), cloneNode(node.name)); | 15545 ConstructorName copy = new ConstructorName(_cloneNode(node.type), _mapToken(
node.period), _cloneNode(node.name)); |
| 15546 copy.staticElement = node.staticElement; | 15546 copy.staticElement = node.staticElement; |
| 15547 return copy; | 15547 return copy; |
| 15548 } | 15548 } |
| 15549 | 15549 |
| 15550 ContinueStatement visitContinueStatement(ContinueStatement node) => new Contin
ueStatement(mapToken(node.keyword), cloneNode(node.label), mapToken(node.semicol
on)); | 15550 ContinueStatement visitContinueStatement(ContinueStatement node) => new Contin
ueStatement(_mapToken(node.keyword), _cloneNode(node.label), _mapToken(node.semi
colon)); |
| 15551 | 15551 |
| 15552 DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) => new Dec
laredIdentifier(cloneNode(node.documentationComment), cloneNodeList(node.metadat
a), mapToken(node.keyword), cloneNode(node.type), cloneNode(node.identifier)); | 15552 DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) => new Dec
laredIdentifier(_cloneNode(node.documentationComment), _cloneNodeList(node.metad
ata), _mapToken(node.keyword), _cloneNode(node.type), _cloneNode(node.identifier
)); |
| 15553 | 15553 |
| 15554 DefaultFormalParameter visitDefaultFormalParameter(DefaultFormalParameter node
) => new DefaultFormalParameter(cloneNode(node.parameter), node.kind, mapToken(n
ode.separator), cloneNode(node.defaultValue)); | 15554 DefaultFormalParameter visitDefaultFormalParameter(DefaultFormalParameter node
) => new DefaultFormalParameter(_cloneNode(node.parameter), node.kind, _mapToken
(node.separator), _cloneNode(node.defaultValue)); |
| 15555 | 15555 |
| 15556 DoStatement visitDoStatement(DoStatement node) => new DoStatement(mapToken(nod
e.doKeyword), cloneNode(node.body), mapToken(node.whileKeyword), mapToken(node.l
eftParenthesis), cloneNode(node.condition), mapToken(node.rightParenthesis), map
Token(node.semicolon)); | 15556 DoStatement visitDoStatement(DoStatement node) => new DoStatement(_mapToken(no
de.doKeyword), _cloneNode(node.body), _mapToken(node.whileKeyword), _mapToken(no
de.leftParenthesis), _cloneNode(node.condition), _mapToken(node.rightParenthesis
), _mapToken(node.semicolon)); |
| 15557 | 15557 |
| 15558 DoubleLiteral visitDoubleLiteral(DoubleLiteral node) { | 15558 DoubleLiteral visitDoubleLiteral(DoubleLiteral node) { |
| 15559 DoubleLiteral copy = new DoubleLiteral(mapToken(node.literal), node.value); | 15559 DoubleLiteral copy = new DoubleLiteral(_mapToken(node.literal), node.value); |
| 15560 copy.propagatedType = node.propagatedType; | 15560 copy.propagatedType = node.propagatedType; |
| 15561 copy.staticType = node.staticType; | 15561 copy.staticType = node.staticType; |
| 15562 return copy; | 15562 return copy; |
| 15563 } | 15563 } |
| 15564 | 15564 |
| 15565 EmptyFunctionBody visitEmptyFunctionBody(EmptyFunctionBody node) => new EmptyF
unctionBody(mapToken(node.semicolon)); | 15565 EmptyFunctionBody visitEmptyFunctionBody(EmptyFunctionBody node) => new EmptyF
unctionBody(_mapToken(node.semicolon)); |
| 15566 | 15566 |
| 15567 EmptyStatement visitEmptyStatement(EmptyStatement node) => new EmptyStatement(
mapToken(node.semicolon)); | 15567 EmptyStatement visitEmptyStatement(EmptyStatement node) => new EmptyStatement(
_mapToken(node.semicolon)); |
| 15568 | 15568 |
| 15569 ExportDirective visitExportDirective(ExportDirective node) { | 15569 ExportDirective visitExportDirective(ExportDirective node) { |
| 15570 ExportDirective copy = new ExportDirective(cloneNode(node.documentationComme
nt), cloneNodeList(node.metadata), mapToken(node.keyword), cloneNode(node.uri),
cloneNodeList(node.combinators), mapToken(node.semicolon)); | 15570 ExportDirective copy = new ExportDirective(_cloneNode(node.documentationComm
ent), _cloneNodeList(node.metadata), _mapToken(node.keyword), _cloneNode(node.ur
i), _cloneNodeList(node.combinators), _mapToken(node.semicolon)); |
| 15571 copy.element = node.element; | 15571 copy.element = node.element; |
| 15572 return copy; | 15572 return copy; |
| 15573 } | 15573 } |
| 15574 | 15574 |
| 15575 ExpressionFunctionBody visitExpressionFunctionBody(ExpressionFunctionBody node
) => new ExpressionFunctionBody(mapToken(node.functionDefinition), cloneNode(nod
e.expression), mapToken(node.semicolon)); | 15575 ExpressionFunctionBody visitExpressionFunctionBody(ExpressionFunctionBody node
) => new ExpressionFunctionBody(_mapToken(node.functionDefinition), _cloneNode(n
ode.expression), _mapToken(node.semicolon)); |
| 15576 | 15576 |
| 15577 ExpressionStatement visitExpressionStatement(ExpressionStatement node) => new
ExpressionStatement(cloneNode(node.expression), mapToken(node.semicolon)); | 15577 ExpressionStatement visitExpressionStatement(ExpressionStatement node) => new
ExpressionStatement(_cloneNode(node.expression), _mapToken(node.semicolon)); |
| 15578 | 15578 |
| 15579 ExtendsClause visitExtendsClause(ExtendsClause node) => new ExtendsClause(mapT
oken(node.keyword), cloneNode(node.superclass)); | 15579 ExtendsClause visitExtendsClause(ExtendsClause node) => new ExtendsClause(_map
Token(node.keyword), _cloneNode(node.superclass)); |
| 15580 | 15580 |
| 15581 FieldDeclaration visitFieldDeclaration(FieldDeclaration node) => new FieldDecl
aration(cloneNode(node.documentationComment), cloneNodeList(node.metadata), mapT
oken(node.staticKeyword), cloneNode(node.fields), mapToken(node.semicolon)); | 15581 FieldDeclaration visitFieldDeclaration(FieldDeclaration node) => new FieldDecl
aration(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), _m
apToken(node.staticKeyword), _cloneNode(node.fields), _mapToken(node.semicolon))
; |
| 15582 | 15582 |
| 15583 FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) => n
ew FieldFormalParameter(cloneNode(node.documentationComment), cloneNodeList(node
.metadata), mapToken(node.keyword), cloneNode(node.type), mapToken(node.thisToke
n), mapToken(node.period), cloneNode(node.identifier), cloneNode(node.parameters
)); | 15583 FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) => n
ew FieldFormalParameter(_cloneNode(node.documentationComment), _cloneNodeList(no
de.metadata), _mapToken(node.keyword), _cloneNode(node.type), _mapToken(node.thi
sToken), _mapToken(node.period), _cloneNode(node.identifier), _cloneNode(node.pa
rameters)); |
| 15584 | 15584 |
| 15585 ForEachStatement visitForEachStatement(ForEachStatement node) { | 15585 ForEachStatement visitForEachStatement(ForEachStatement node) { |
| 15586 DeclaredIdentifier loopVariable = node.loopVariable; | 15586 DeclaredIdentifier loopVariable = node.loopVariable; |
| 15587 if (loopVariable == null) { | 15587 if (loopVariable == null) { |
| 15588 return new ForEachStatement.con2(mapToken(node.forKeyword), mapToken(node.
leftParenthesis), cloneNode(node.identifier), mapToken(node.inKeyword), cloneNod
e(node.iterator), mapToken(node.rightParenthesis), cloneNode(node.body)); | 15588 return new ForEachStatement.con2(_mapToken(node.forKeyword), _mapToken(nod
e.leftParenthesis), _cloneNode(node.identifier), _mapToken(node.inKeyword), _clo
neNode(node.iterator), _mapToken(node.rightParenthesis), _cloneNode(node.body)); |
| 15589 } | 15589 } |
| 15590 return new ForEachStatement.con1(mapToken(node.forKeyword), mapToken(node.le
ftParenthesis), cloneNode(loopVariable), mapToken(node.inKeyword), cloneNode(nod
e.iterator), mapToken(node.rightParenthesis), cloneNode(node.body)); | 15590 return new ForEachStatement.con1(_mapToken(node.forKeyword), _mapToken(node.
leftParenthesis), _cloneNode(loopVariable), _mapToken(node.inKeyword), _cloneNod
e(node.iterator), _mapToken(node.rightParenthesis), _cloneNode(node.body)); |
| 15591 } | 15591 } |
| 15592 | 15592 |
| 15593 FormalParameterList visitFormalParameterList(FormalParameterList node) => new
FormalParameterList(mapToken(node.leftParenthesis), cloneNodeList(node.parameter
s), mapToken(node.leftDelimiter), mapToken(node.rightDelimiter), mapToken(node.r
ightParenthesis)); | 15593 FormalParameterList visitFormalParameterList(FormalParameterList node) => new
FormalParameterList(_mapToken(node.leftParenthesis), _cloneNodeList(node.paramet
ers), _mapToken(node.leftDelimiter), _mapToken(node.rightDelimiter), _mapToken(n
ode.rightParenthesis)); |
| 15594 | 15594 |
| 15595 ForStatement visitForStatement(ForStatement node) => new ForStatement(mapToken
(node.forKeyword), mapToken(node.leftParenthesis), cloneNode(node.variables), cl
oneNode(node.initialization), mapToken(node.leftSeparator), cloneNode(node.condi
tion), mapToken(node.rightSeparator), cloneNodeList(node.updaters), mapToken(nod
e.rightParenthesis), cloneNode(node.body)); | 15595 ForStatement visitForStatement(ForStatement node) => new ForStatement(_mapToke
n(node.forKeyword), _mapToken(node.leftParenthesis), _cloneNode(node.variables),
_cloneNode(node.initialization), _mapToken(node.leftSeparator), _cloneNode(node
.condition), _mapToken(node.rightSeparator), _cloneNodeList(node.updaters), _map
Token(node.rightParenthesis), _cloneNode(node.body)); |
| 15596 | 15596 |
| 15597 FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) => new
FunctionDeclaration(cloneNode(node.documentationComment), cloneNodeList(node.met
adata), mapToken(node.externalKeyword), cloneNode(node.returnType), mapToken(nod
e.propertyKeyword), cloneNode(node.name), cloneNode(node.functionExpression)); | 15597 FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) => new
FunctionDeclaration(_cloneNode(node.documentationComment), _cloneNodeList(node.m
etadata), _mapToken(node.externalKeyword), _cloneNode(node.returnType), _mapToke
n(node.propertyKeyword), _cloneNode(node.name), _cloneNode(node.functionExpressi
on)); |
| 15598 | 15598 |
| 15599 FunctionDeclarationStatement visitFunctionDeclarationStatement(FunctionDeclara
tionStatement node) => new FunctionDeclarationStatement(cloneNode(node.functionD
eclaration)); | 15599 FunctionDeclarationStatement visitFunctionDeclarationStatement(FunctionDeclara
tionStatement node) => new FunctionDeclarationStatement(_cloneNode(node.function
Declaration)); |
| 15600 | 15600 |
| 15601 FunctionExpression visitFunctionExpression(FunctionExpression node) { | 15601 FunctionExpression visitFunctionExpression(FunctionExpression node) { |
| 15602 FunctionExpression copy = new FunctionExpression(cloneNode(node.parameters),
cloneNode(node.body)); | 15602 FunctionExpression copy = new FunctionExpression(_cloneNode(node.parameters)
, _cloneNode(node.body)); |
| 15603 copy.element = node.element; | 15603 copy.element = node.element; |
| 15604 copy.propagatedType = node.propagatedType; | 15604 copy.propagatedType = node.propagatedType; |
| 15605 copy.staticType = node.staticType; | 15605 copy.staticType = node.staticType; |
| 15606 return copy; | 15606 return copy; |
| 15607 } | 15607 } |
| 15608 | 15608 |
| 15609 FunctionExpressionInvocation visitFunctionExpressionInvocation(FunctionExpress
ionInvocation node) { | 15609 FunctionExpressionInvocation visitFunctionExpressionInvocation(FunctionExpress
ionInvocation node) { |
| 15610 FunctionExpressionInvocation copy = new FunctionExpressionInvocation(cloneNo
de(node.function), cloneNode(node.argumentList)); | 15610 FunctionExpressionInvocation copy = new FunctionExpressionInvocation(_cloneN
ode(node.function), _cloneNode(node.argumentList)); |
| 15611 copy.propagatedElement = node.propagatedElement; | 15611 copy.propagatedElement = node.propagatedElement; |
| 15612 copy.propagatedType = node.propagatedType; | 15612 copy.propagatedType = node.propagatedType; |
| 15613 copy.staticElement = node.staticElement; | 15613 copy.staticElement = node.staticElement; |
| 15614 copy.staticType = node.staticType; | 15614 copy.staticType = node.staticType; |
| 15615 return copy; | 15615 return copy; |
| 15616 } | 15616 } |
| 15617 | 15617 |
| 15618 FunctionTypeAlias visitFunctionTypeAlias(FunctionTypeAlias node) => new Functi
onTypeAlias(cloneNode(node.documentationComment), cloneNodeList(node.metadata),
mapToken(node.keyword), cloneNode(node.returnType), cloneNode(node.name), cloneN
ode(node.typeParameters), cloneNode(node.parameters), mapToken(node.semicolon)); | 15618 FunctionTypeAlias visitFunctionTypeAlias(FunctionTypeAlias node) => new Functi
onTypeAlias(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata)
, _mapToken(node.keyword), _cloneNode(node.returnType), _cloneNode(node.name), _
cloneNode(node.typeParameters), _cloneNode(node.parameters), _mapToken(node.semi
colon)); |
| 15619 | 15619 |
| 15620 FunctionTypedFormalParameter visitFunctionTypedFormalParameter(FunctionTypedFo
rmalParameter node) => new FunctionTypedFormalParameter(cloneNode(node.documenta
tionComment), cloneNodeList(node.metadata), cloneNode(node.returnType), cloneNod
e(node.identifier), cloneNode(node.parameters)); | 15620 FunctionTypedFormalParameter visitFunctionTypedFormalParameter(FunctionTypedFo
rmalParameter node) => new FunctionTypedFormalParameter(_cloneNode(node.document
ationComment), _cloneNodeList(node.metadata), _cloneNode(node.returnType), _clon
eNode(node.identifier), _cloneNode(node.parameters)); |
| 15621 | 15621 |
| 15622 HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator(
mapToken(node.keyword), cloneNodeList(node.hiddenNames)); | 15622 HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator(
_mapToken(node.keyword), _cloneNodeList(node.hiddenNames)); |
| 15623 | 15623 |
| 15624 IfStatement visitIfStatement(IfStatement node) => new IfStatement(mapToken(nod
e.ifKeyword), mapToken(node.leftParenthesis), cloneNode(node.condition), mapToke
n(node.rightParenthesis), cloneNode(node.thenStatement), mapToken(node.elseKeywo
rd), cloneNode(node.elseStatement)); | 15624 IfStatement visitIfStatement(IfStatement node) => new IfStatement(_mapToken(no
de.ifKeyword), _mapToken(node.leftParenthesis), _cloneNode(node.condition), _map
Token(node.rightParenthesis), _cloneNode(node.thenStatement), _mapToken(node.els
eKeyword), _cloneNode(node.elseStatement)); |
| 15625 | 15625 |
| 15626 ImplementsClause visitImplementsClause(ImplementsClause node) => new Implement
sClause(mapToken(node.keyword), cloneNodeList(node.interfaces)); | 15626 ImplementsClause visitImplementsClause(ImplementsClause node) => new Implement
sClause(_mapToken(node.keyword), _cloneNodeList(node.interfaces)); |
| 15627 | 15627 |
| 15628 ImportDirective visitImportDirective(ImportDirective node) => new ImportDirect
ive(cloneNode(node.documentationComment), cloneNodeList(node.metadata), mapToken
(node.keyword), cloneNode(node.uri), mapToken(node.asToken), cloneNode(node.pref
ix), cloneNodeList(node.combinators), mapToken(node.semicolon)); | 15628 ImportDirective visitImportDirective(ImportDirective node) => new ImportDirect
ive(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), _mapTo
ken(node.keyword), _cloneNode(node.uri), _mapToken(node.asToken), _cloneNode(nod
e.prefix), _cloneNodeList(node.combinators), _mapToken(node.semicolon)); |
| 15629 | 15629 |
| 15630 IndexExpression visitIndexExpression(IndexExpression node) { | 15630 IndexExpression visitIndexExpression(IndexExpression node) { |
| 15631 Token period = mapToken(node.period); | 15631 Token period = _mapToken(node.period); |
| 15632 IndexExpression copy; | 15632 IndexExpression copy; |
| 15633 if (period == null) { | 15633 if (period == null) { |
| 15634 copy = new IndexExpression.forTarget(cloneNode(node.target), mapToken(node
.leftBracket), cloneNode(node.index), mapToken(node.rightBracket)); | 15634 copy = new IndexExpression.forTarget(_cloneNode(node.target), _mapToken(no
de.leftBracket), _cloneNode(node.index), _mapToken(node.rightBracket)); |
| 15635 } else { | 15635 } else { |
| 15636 copy = new IndexExpression.forCascade(period, mapToken(node.leftBracket),
cloneNode(node.index), mapToken(node.rightBracket)); | 15636 copy = new IndexExpression.forCascade(period, _mapToken(node.leftBracket),
_cloneNode(node.index), _mapToken(node.rightBracket)); |
| 15637 } | 15637 } |
| 15638 copy.auxiliaryElements = node.auxiliaryElements; | 15638 copy.auxiliaryElements = node.auxiliaryElements; |
| 15639 copy.propagatedElement = node.propagatedElement; | 15639 copy.propagatedElement = node.propagatedElement; |
| 15640 copy.propagatedType = node.propagatedType; | 15640 copy.propagatedType = node.propagatedType; |
| 15641 copy.staticElement = node.staticElement; | 15641 copy.staticElement = node.staticElement; |
| 15642 copy.staticType = node.staticType; | 15642 copy.staticType = node.staticType; |
| 15643 return copy; | 15643 return copy; |
| 15644 } | 15644 } |
| 15645 | 15645 |
| 15646 InstanceCreationExpression visitInstanceCreationExpression(InstanceCreationExp
ression node) { | 15646 InstanceCreationExpression visitInstanceCreationExpression(InstanceCreationExp
ression node) { |
| 15647 InstanceCreationExpression copy = new InstanceCreationExpression(mapToken(no
de.keyword), cloneNode(node.constructorName), cloneNode(node.argumentList)); | 15647 InstanceCreationExpression copy = new InstanceCreationExpression(_mapToken(n
ode.keyword), _cloneNode(node.constructorName), _cloneNode(node.argumentList)); |
| 15648 copy.propagatedType = node.propagatedType; | 15648 copy.propagatedType = node.propagatedType; |
| 15649 copy.staticElement = node.staticElement; | 15649 copy.staticElement = node.staticElement; |
| 15650 copy.staticType = node.staticType; | 15650 copy.staticType = node.staticType; |
| 15651 return copy; | 15651 return copy; |
| 15652 } | 15652 } |
| 15653 | 15653 |
| 15654 IntegerLiteral visitIntegerLiteral(IntegerLiteral node) { | 15654 IntegerLiteral visitIntegerLiteral(IntegerLiteral node) { |
| 15655 IntegerLiteral copy = new IntegerLiteral(mapToken(node.literal), node.value)
; | 15655 IntegerLiteral copy = new IntegerLiteral(_mapToken(node.literal), node.value
); |
| 15656 copy.propagatedType = node.propagatedType; | 15656 copy.propagatedType = node.propagatedType; |
| 15657 copy.staticType = node.staticType; | 15657 copy.staticType = node.staticType; |
| 15658 return copy; | 15658 return copy; |
| 15659 } | 15659 } |
| 15660 | 15660 |
| 15661 InterpolationExpression visitInterpolationExpression(InterpolationExpression n
ode) => new InterpolationExpression(mapToken(node.leftBracket), cloneNode(node.e
xpression), mapToken(node.rightBracket)); | 15661 InterpolationExpression visitInterpolationExpression(InterpolationExpression n
ode) => new InterpolationExpression(_mapToken(node.leftBracket), _cloneNode(node
.expression), _mapToken(node.rightBracket)); |
| 15662 | 15662 |
| 15663 InterpolationString visitInterpolationString(InterpolationString node) => new
InterpolationString(mapToken(node.contents), node.value); | 15663 InterpolationString visitInterpolationString(InterpolationString node) => new
InterpolationString(_mapToken(node.contents), node.value); |
| 15664 | 15664 |
| 15665 IsExpression visitIsExpression(IsExpression node) { | 15665 IsExpression visitIsExpression(IsExpression node) { |
| 15666 IsExpression copy = new IsExpression(cloneNode(node.expression), mapToken(no
de.isOperator), mapToken(node.notOperator), cloneNode(node.type)); | 15666 IsExpression copy = new IsExpression(_cloneNode(node.expression), _mapToken(
node.isOperator), _mapToken(node.notOperator), _cloneNode(node.type)); |
| 15667 copy.propagatedType = node.propagatedType; | 15667 copy.propagatedType = node.propagatedType; |
| 15668 copy.staticType = node.staticType; | 15668 copy.staticType = node.staticType; |
| 15669 return copy; | 15669 return copy; |
| 15670 } | 15670 } |
| 15671 | 15671 |
| 15672 Label visitLabel(Label node) => new Label(cloneNode(node.label), mapToken(node
.colon)); | 15672 Label visitLabel(Label node) => new Label(_cloneNode(node.label), _mapToken(no
de.colon)); |
| 15673 | 15673 |
| 15674 LabeledStatement visitLabeledStatement(LabeledStatement node) => new LabeledSt
atement(cloneNodeList(node.labels), cloneNode(node.statement)); | 15674 LabeledStatement visitLabeledStatement(LabeledStatement node) => new LabeledSt
atement(_cloneNodeList(node.labels), _cloneNode(node.statement)); |
| 15675 | 15675 |
| 15676 LibraryDirective visitLibraryDirective(LibraryDirective node) => new LibraryDi
rective(cloneNode(node.documentationComment), cloneNodeList(node.metadata), mapT
oken(node.libraryToken), cloneNode(node.name), mapToken(node.semicolon)); | 15676 LibraryDirective visitLibraryDirective(LibraryDirective node) => new LibraryDi
rective(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), _m
apToken(node.libraryToken), _cloneNode(node.name), _mapToken(node.semicolon)); |
| 15677 | 15677 |
| 15678 LibraryIdentifier visitLibraryIdentifier(LibraryIdentifier node) { | 15678 LibraryIdentifier visitLibraryIdentifier(LibraryIdentifier node) { |
| 15679 LibraryIdentifier copy = new LibraryIdentifier(cloneNodeList(node.components
)); | 15679 LibraryIdentifier copy = new LibraryIdentifier(_cloneNodeList(node.component
s)); |
| 15680 copy.propagatedType = node.propagatedType; | 15680 copy.propagatedType = node.propagatedType; |
| 15681 copy.staticType = node.staticType; | 15681 copy.staticType = node.staticType; |
| 15682 return copy; | 15682 return copy; |
| 15683 } | 15683 } |
| 15684 | 15684 |
| 15685 ListLiteral visitListLiteral(ListLiteral node) { | 15685 ListLiteral visitListLiteral(ListLiteral node) { |
| 15686 ListLiteral copy = new ListLiteral(mapToken(node.constKeyword), cloneNode(no
de.typeArguments), mapToken(node.leftBracket), cloneNodeList(node.elements), map
Token(node.rightBracket)); | 15686 ListLiteral copy = new ListLiteral(_mapToken(node.constKeyword), _cloneNode(
node.typeArguments), _mapToken(node.leftBracket), _cloneNodeList(node.elements),
_mapToken(node.rightBracket)); |
| 15687 copy.propagatedType = node.propagatedType; | 15687 copy.propagatedType = node.propagatedType; |
| 15688 copy.staticType = node.staticType; | 15688 copy.staticType = node.staticType; |
| 15689 return copy; | 15689 return copy; |
| 15690 } | 15690 } |
| 15691 | 15691 |
| 15692 MapLiteral visitMapLiteral(MapLiteral node) { | 15692 MapLiteral visitMapLiteral(MapLiteral node) { |
| 15693 MapLiteral copy = new MapLiteral(mapToken(node.constKeyword), cloneNode(node
.typeArguments), mapToken(node.leftBracket), cloneNodeList(node.entries), mapTok
en(node.rightBracket)); | 15693 MapLiteral copy = new MapLiteral(_mapToken(node.constKeyword), _cloneNode(no
de.typeArguments), _mapToken(node.leftBracket), _cloneNodeList(node.entries), _m
apToken(node.rightBracket)); |
| 15694 copy.propagatedType = node.propagatedType; | 15694 copy.propagatedType = node.propagatedType; |
| 15695 copy.staticType = node.staticType; | 15695 copy.staticType = node.staticType; |
| 15696 return copy; | 15696 return copy; |
| 15697 } | 15697 } |
| 15698 | 15698 |
| 15699 MapLiteralEntry visitMapLiteralEntry(MapLiteralEntry node) => new MapLiteralEn
try(cloneNode(node.key), mapToken(node.separator), cloneNode(node.value)); | 15699 MapLiteralEntry visitMapLiteralEntry(MapLiteralEntry node) => new MapLiteralEn
try(_cloneNode(node.key), _mapToken(node.separator), _cloneNode(node.value)); |
| 15700 | 15700 |
| 15701 MethodDeclaration visitMethodDeclaration(MethodDeclaration node) => new Method
Declaration(cloneNode(node.documentationComment), cloneNodeList(node.metadata),
mapToken(node.externalKeyword), mapToken(node.modifierKeyword), cloneNode(node.r
eturnType), mapToken(node.propertyKeyword), mapToken(node.operatorKeyword), clon
eNode(node.name), cloneNode(node.parameters), cloneNode(node.body)); | 15701 MethodDeclaration visitMethodDeclaration(MethodDeclaration node) => new Method
Declaration(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata)
, _mapToken(node.externalKeyword), _mapToken(node.modifierKeyword), _cloneNode(n
ode.returnType), _mapToken(node.propertyKeyword), _mapToken(node.operatorKeyword
), _cloneNode(node.name), _cloneNode(node.parameters), _cloneNode(node.body)); |
| 15702 | 15702 |
| 15703 MethodInvocation visitMethodInvocation(MethodInvocation node) { | 15703 MethodInvocation visitMethodInvocation(MethodInvocation node) { |
| 15704 MethodInvocation copy = new MethodInvocation(cloneNode(node.target), mapToke
n(node.period), cloneNode(node.methodName), cloneNode(node.argumentList)); | 15704 MethodInvocation copy = new MethodInvocation(_cloneNode(node.target), _mapTo
ken(node.period), _cloneNode(node.methodName), _cloneNode(node.argumentList)); |
| 15705 copy.propagatedType = node.propagatedType; | 15705 copy.propagatedType = node.propagatedType; |
| 15706 copy.staticType = node.staticType; | 15706 copy.staticType = node.staticType; |
| 15707 return copy; | 15707 return copy; |
| 15708 } | 15708 } |
| 15709 | 15709 |
| 15710 NamedExpression visitNamedExpression(NamedExpression node) { | 15710 NamedExpression visitNamedExpression(NamedExpression node) { |
| 15711 NamedExpression copy = new NamedExpression(cloneNode(node.name), cloneNode(n
ode.expression)); | 15711 NamedExpression copy = new NamedExpression(_cloneNode(node.name), _cloneNode
(node.expression)); |
| 15712 copy.propagatedType = node.propagatedType; | 15712 copy.propagatedType = node.propagatedType; |
| 15713 copy.staticType = node.staticType; | 15713 copy.staticType = node.staticType; |
| 15714 return copy; | 15714 return copy; |
| 15715 } | 15715 } |
| 15716 | 15716 |
| 15717 AstNode visitNativeClause(NativeClause node) => new NativeClause(mapToken(node
.keyword), cloneNode(node.name)); | 15717 AstNode visitNativeClause(NativeClause node) => new NativeClause(_mapToken(nod
e.keyword), _cloneNode(node.name)); |
| 15718 | 15718 |
| 15719 NativeFunctionBody visitNativeFunctionBody(NativeFunctionBody node) => new Nat
iveFunctionBody(mapToken(node.nativeToken), cloneNode(node.stringLiteral), mapTo
ken(node.semicolon)); | 15719 NativeFunctionBody visitNativeFunctionBody(NativeFunctionBody node) => new Nat
iveFunctionBody(_mapToken(node.nativeToken), _cloneNode(node.stringLiteral), _ma
pToken(node.semicolon)); |
| 15720 | 15720 |
| 15721 NullLiteral visitNullLiteral(NullLiteral node) { | 15721 NullLiteral visitNullLiteral(NullLiteral node) { |
| 15722 NullLiteral copy = new NullLiteral(mapToken(node.literal)); | 15722 NullLiteral copy = new NullLiteral(_mapToken(node.literal)); |
| 15723 copy.propagatedType = node.propagatedType; | 15723 copy.propagatedType = node.propagatedType; |
| 15724 copy.staticType = node.staticType; | 15724 copy.staticType = node.staticType; |
| 15725 return copy; | 15725 return copy; |
| 15726 } | 15726 } |
| 15727 | 15727 |
| 15728 ParenthesizedExpression visitParenthesizedExpression(ParenthesizedExpression n
ode) { | 15728 ParenthesizedExpression visitParenthesizedExpression(ParenthesizedExpression n
ode) { |
| 15729 ParenthesizedExpression copy = new ParenthesizedExpression(mapToken(node.lef
tParenthesis), cloneNode(node.expression), mapToken(node.rightParenthesis)); | 15729 ParenthesizedExpression copy = new ParenthesizedExpression(_mapToken(node.le
ftParenthesis), _cloneNode(node.expression), _mapToken(node.rightParenthesis)); |
| 15730 copy.propagatedType = node.propagatedType; | 15730 copy.propagatedType = node.propagatedType; |
| 15731 copy.staticType = node.staticType; | 15731 copy.staticType = node.staticType; |
| 15732 return copy; | 15732 return copy; |
| 15733 } | 15733 } |
| 15734 | 15734 |
| 15735 PartDirective visitPartDirective(PartDirective node) { | 15735 PartDirective visitPartDirective(PartDirective node) { |
| 15736 PartDirective copy = new PartDirective(cloneNode(node.documentationComment),
cloneNodeList(node.metadata), mapToken(node.partToken), cloneNode(node.uri), ma
pToken(node.semicolon)); | 15736 PartDirective copy = new PartDirective(_cloneNode(node.documentationComment)
, _cloneNodeList(node.metadata), _mapToken(node.partToken), _cloneNode(node.uri)
, _mapToken(node.semicolon)); |
| 15737 copy.element = node.element; | 15737 copy.element = node.element; |
| 15738 return copy; | 15738 return copy; |
| 15739 } | 15739 } |
| 15740 | 15740 |
| 15741 PartOfDirective visitPartOfDirective(PartOfDirective node) { | 15741 PartOfDirective visitPartOfDirective(PartOfDirective node) { |
| 15742 PartOfDirective copy = new PartOfDirective(cloneNode(node.documentationComme
nt), cloneNodeList(node.metadata), mapToken(node.partToken), mapToken(node.ofTok
en), cloneNode(node.libraryName), mapToken(node.semicolon)); | 15742 PartOfDirective copy = new PartOfDirective(_cloneNode(node.documentationComm
ent), _cloneNodeList(node.metadata), _mapToken(node.partToken), _mapToken(node.o
fToken), _cloneNode(node.libraryName), _mapToken(node.semicolon)); |
| 15743 copy.element = node.element; | 15743 copy.element = node.element; |
| 15744 return copy; | 15744 return copy; |
| 15745 } | 15745 } |
| 15746 | 15746 |
| 15747 PostfixExpression visitPostfixExpression(PostfixExpression node) { | 15747 PostfixExpression visitPostfixExpression(PostfixExpression node) { |
| 15748 PostfixExpression copy = new PostfixExpression(cloneNode(node.operand), mapT
oken(node.operator)); | 15748 PostfixExpression copy = new PostfixExpression(_cloneNode(node.operand), _ma
pToken(node.operator)); |
| 15749 copy.propagatedElement = node.propagatedElement; | 15749 copy.propagatedElement = node.propagatedElement; |
| 15750 copy.propagatedType = node.propagatedType; | 15750 copy.propagatedType = node.propagatedType; |
| 15751 copy.staticElement = node.staticElement; | 15751 copy.staticElement = node.staticElement; |
| 15752 copy.staticType = node.staticType; | 15752 copy.staticType = node.staticType; |
| 15753 return copy; | 15753 return copy; |
| 15754 } | 15754 } |
| 15755 | 15755 |
| 15756 PrefixedIdentifier visitPrefixedIdentifier(PrefixedIdentifier node) { | 15756 PrefixedIdentifier visitPrefixedIdentifier(PrefixedIdentifier node) { |
| 15757 PrefixedIdentifier copy = new PrefixedIdentifier(cloneNode(node.prefix), map
Token(node.period), cloneNode(node.identifier)); | 15757 PrefixedIdentifier copy = new PrefixedIdentifier(_cloneNode(node.prefix), _m
apToken(node.period), _cloneNode(node.identifier)); |
| 15758 copy.propagatedType = node.propagatedType; | 15758 copy.propagatedType = node.propagatedType; |
| 15759 copy.staticType = node.staticType; | 15759 copy.staticType = node.staticType; |
| 15760 return copy; | 15760 return copy; |
| 15761 } | 15761 } |
| 15762 | 15762 |
| 15763 PrefixExpression visitPrefixExpression(PrefixExpression node) { | 15763 PrefixExpression visitPrefixExpression(PrefixExpression node) { |
| 15764 PrefixExpression copy = new PrefixExpression(mapToken(node.operator), cloneN
ode(node.operand)); | 15764 PrefixExpression copy = new PrefixExpression(_mapToken(node.operator), _clon
eNode(node.operand)); |
| 15765 copy.propagatedElement = node.propagatedElement; | 15765 copy.propagatedElement = node.propagatedElement; |
| 15766 copy.propagatedType = node.propagatedType; | 15766 copy.propagatedType = node.propagatedType; |
| 15767 copy.staticElement = node.staticElement; | 15767 copy.staticElement = node.staticElement; |
| 15768 copy.staticType = node.staticType; | 15768 copy.staticType = node.staticType; |
| 15769 return copy; | 15769 return copy; |
| 15770 } | 15770 } |
| 15771 | 15771 |
| 15772 PropertyAccess visitPropertyAccess(PropertyAccess node) { | 15772 PropertyAccess visitPropertyAccess(PropertyAccess node) { |
| 15773 PropertyAccess copy = new PropertyAccess(cloneNode(node.target), mapToken(no
de.operator), cloneNode(node.propertyName)); | 15773 PropertyAccess copy = new PropertyAccess(_cloneNode(node.target), _mapToken(
node.operator), _cloneNode(node.propertyName)); |
| 15774 copy.propagatedType = node.propagatedType; | 15774 copy.propagatedType = node.propagatedType; |
| 15775 copy.staticType = node.staticType; | 15775 copy.staticType = node.staticType; |
| 15776 return copy; | 15776 return copy; |
| 15777 } | 15777 } |
| 15778 | 15778 |
| 15779 RedirectingConstructorInvocation visitRedirectingConstructorInvocation(Redirec
tingConstructorInvocation node) { | 15779 RedirectingConstructorInvocation visitRedirectingConstructorInvocation(Redirec
tingConstructorInvocation node) { |
| 15780 RedirectingConstructorInvocation copy = new RedirectingConstructorInvocation
(mapToken(node.keyword), mapToken(node.period), cloneNode(node.constructorName),
cloneNode(node.argumentList)); | 15780 RedirectingConstructorInvocation copy = new RedirectingConstructorInvocation
(_mapToken(node.keyword), _mapToken(node.period), _cloneNode(node.constructorNam
e), _cloneNode(node.argumentList)); |
| 15781 copy.staticElement = node.staticElement; | 15781 copy.staticElement = node.staticElement; |
| 15782 return copy; | 15782 return copy; |
| 15783 } | 15783 } |
| 15784 | 15784 |
| 15785 RethrowExpression visitRethrowExpression(RethrowExpression node) { | 15785 RethrowExpression visitRethrowExpression(RethrowExpression node) { |
| 15786 RethrowExpression copy = new RethrowExpression(mapToken(node.keyword)); | 15786 RethrowExpression copy = new RethrowExpression(_mapToken(node.keyword)); |
| 15787 copy.propagatedType = node.propagatedType; | 15787 copy.propagatedType = node.propagatedType; |
| 15788 copy.staticType = node.staticType; | 15788 copy.staticType = node.staticType; |
| 15789 return copy; | 15789 return copy; |
| 15790 } | 15790 } |
| 15791 | 15791 |
| 15792 ReturnStatement visitReturnStatement(ReturnStatement node) => new ReturnStatem
ent(mapToken(node.keyword), cloneNode(node.expression), mapToken(node.semicolon)
); | 15792 ReturnStatement visitReturnStatement(ReturnStatement node) => new ReturnStatem
ent(_mapToken(node.keyword), _cloneNode(node.expression), _mapToken(node.semicol
on)); |
| 15793 | 15793 |
| 15794 ScriptTag visitScriptTag(ScriptTag node) => new ScriptTag(mapToken(node.script
Tag)); | 15794 ScriptTag visitScriptTag(ScriptTag node) => new ScriptTag(_mapToken(node.scrip
tTag)); |
| 15795 | 15795 |
| 15796 ShowCombinator visitShowCombinator(ShowCombinator node) => new ShowCombinator(
mapToken(node.keyword), cloneNodeList(node.shownNames)); | 15796 ShowCombinator visitShowCombinator(ShowCombinator node) => new ShowCombinator(
_mapToken(node.keyword), _cloneNodeList(node.shownNames)); |
| 15797 | 15797 |
| 15798 SimpleFormalParameter visitSimpleFormalParameter(SimpleFormalParameter node) =
> new SimpleFormalParameter(cloneNode(node.documentationComment), cloneNodeList(
node.metadata), mapToken(node.keyword), cloneNode(node.type), cloneNode(node.ide
ntifier)); | 15798 SimpleFormalParameter visitSimpleFormalParameter(SimpleFormalParameter node) =
> new SimpleFormalParameter(_cloneNode(node.documentationComment), _cloneNodeLis
t(node.metadata), _mapToken(node.keyword), _cloneNode(node.type), _cloneNode(nod
e.identifier)); |
| 15799 | 15799 |
| 15800 SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) { | 15800 SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) { |
| 15801 Token mappedToken = mapToken(node.token); | 15801 Token mappedToken = _mapToken(node.token); |
| 15802 if (mappedToken == null) { | 15802 if (mappedToken == null) { |
| 15803 // This only happens for SimpleIdentifiers created by the parser as part o
f scanning | 15803 // This only happens for SimpleIdentifiers created by the parser as part o
f scanning |
| 15804 // documentation comments (the tokens for those identifiers are not in the
original token | 15804 // documentation comments (the tokens for those identifiers are not in the
original token |
| 15805 // stream and hence do not get copied). This extra check can be removed if
the scanner is | 15805 // stream and hence do not get copied). This extra check can be removed if
the scanner is |
| 15806 // changed to scan documentation comments for the parser. | 15806 // changed to scan documentation comments for the parser. |
| 15807 mappedToken = node.token; | 15807 mappedToken = node.token; |
| 15808 } | 15808 } |
| 15809 SimpleIdentifier copy = new SimpleIdentifier(mappedToken); | 15809 SimpleIdentifier copy = new SimpleIdentifier(mappedToken); |
| 15810 copy.auxiliaryElements = node.auxiliaryElements; | 15810 copy.auxiliaryElements = node.auxiliaryElements; |
| 15811 copy.propagatedElement = node.propagatedElement; | 15811 copy.propagatedElement = node.propagatedElement; |
| 15812 copy.propagatedType = node.propagatedType; | 15812 copy.propagatedType = node.propagatedType; |
| 15813 copy.staticElement = node.staticElement; | 15813 copy.staticElement = node.staticElement; |
| 15814 copy.staticType = node.staticType; | 15814 copy.staticType = node.staticType; |
| 15815 return copy; | 15815 return copy; |
| 15816 } | 15816 } |
| 15817 | 15817 |
| 15818 SimpleStringLiteral visitSimpleStringLiteral(SimpleStringLiteral node) { | 15818 SimpleStringLiteral visitSimpleStringLiteral(SimpleStringLiteral node) { |
| 15819 SimpleStringLiteral copy = new SimpleStringLiteral(mapToken(node.literal), n
ode.value); | 15819 SimpleStringLiteral copy = new SimpleStringLiteral(_mapToken(node.literal),
node.value); |
| 15820 copy.propagatedType = node.propagatedType; | 15820 copy.propagatedType = node.propagatedType; |
| 15821 copy.staticType = node.staticType; | 15821 copy.staticType = node.staticType; |
| 15822 return copy; | 15822 return copy; |
| 15823 } | 15823 } |
| 15824 | 15824 |
| 15825 StringInterpolation visitStringInterpolation(StringInterpolation node) { | 15825 StringInterpolation visitStringInterpolation(StringInterpolation node) { |
| 15826 StringInterpolation copy = new StringInterpolation(cloneNodeList(node.elemen
ts)); | 15826 StringInterpolation copy = new StringInterpolation(_cloneNodeList(node.eleme
nts)); |
| 15827 copy.propagatedType = node.propagatedType; | 15827 copy.propagatedType = node.propagatedType; |
| 15828 copy.staticType = node.staticType; | 15828 copy.staticType = node.staticType; |
| 15829 return copy; | 15829 return copy; |
| 15830 } | 15830 } |
| 15831 | 15831 |
| 15832 SuperConstructorInvocation visitSuperConstructorInvocation(SuperConstructorInv
ocation node) { | 15832 SuperConstructorInvocation visitSuperConstructorInvocation(SuperConstructorInv
ocation node) { |
| 15833 SuperConstructorInvocation copy = new SuperConstructorInvocation(mapToken(no
de.keyword), mapToken(node.period), cloneNode(node.constructorName), cloneNode(n
ode.argumentList)); | 15833 SuperConstructorInvocation copy = new SuperConstructorInvocation(_mapToken(n
ode.keyword), _mapToken(node.period), _cloneNode(node.constructorName), _cloneNo
de(node.argumentList)); |
| 15834 copy.staticElement = node.staticElement; | 15834 copy.staticElement = node.staticElement; |
| 15835 return copy; | 15835 return copy; |
| 15836 } | 15836 } |
| 15837 | 15837 |
| 15838 SuperExpression visitSuperExpression(SuperExpression node) { | 15838 SuperExpression visitSuperExpression(SuperExpression node) { |
| 15839 SuperExpression copy = new SuperExpression(mapToken(node.keyword)); | 15839 SuperExpression copy = new SuperExpression(_mapToken(node.keyword)); |
| 15840 copy.propagatedType = node.propagatedType; | 15840 copy.propagatedType = node.propagatedType; |
| 15841 copy.staticType = node.staticType; | 15841 copy.staticType = node.staticType; |
| 15842 return copy; | 15842 return copy; |
| 15843 } | 15843 } |
| 15844 | 15844 |
| 15845 SwitchCase visitSwitchCase(SwitchCase node) => new SwitchCase(cloneNodeList(no
de.labels), mapToken(node.keyword), cloneNode(node.expression), mapToken(node.co
lon), cloneNodeList(node.statements)); | 15845 SwitchCase visitSwitchCase(SwitchCase node) => new SwitchCase(_cloneNodeList(n
ode.labels), _mapToken(node.keyword), _cloneNode(node.expression), _mapToken(nod
e.colon), _cloneNodeList(node.statements)); |
| 15846 | 15846 |
| 15847 SwitchDefault visitSwitchDefault(SwitchDefault node) => new SwitchDefault(clon
eNodeList(node.labels), mapToken(node.keyword), mapToken(node.colon), cloneNodeL
ist(node.statements)); | 15847 SwitchDefault visitSwitchDefault(SwitchDefault node) => new SwitchDefault(_clo
neNodeList(node.labels), _mapToken(node.keyword), _mapToken(node.colon), _cloneN
odeList(node.statements)); |
| 15848 | 15848 |
| 15849 SwitchStatement visitSwitchStatement(SwitchStatement node) => new SwitchStatem
ent(mapToken(node.keyword), mapToken(node.leftParenthesis), cloneNode(node.expre
ssion), mapToken(node.rightParenthesis), mapToken(node.leftBracket), cloneNodeLi
st(node.members), mapToken(node.rightBracket)); | 15849 SwitchStatement visitSwitchStatement(SwitchStatement node) => new SwitchStatem
ent(_mapToken(node.keyword), _mapToken(node.leftParenthesis), _cloneNode(node.ex
pression), _mapToken(node.rightParenthesis), _mapToken(node.leftBracket), _clone
NodeList(node.members), _mapToken(node.rightBracket)); |
| 15850 | 15850 |
| 15851 AstNode visitSymbolLiteral(SymbolLiteral node) { | 15851 AstNode visitSymbolLiteral(SymbolLiteral node) { |
| 15852 SymbolLiteral copy = new SymbolLiteral(mapToken(node.poundSign), mapTokens(n
ode.components)); | 15852 SymbolLiteral copy = new SymbolLiteral(_mapToken(node.poundSign), _mapTokens
(node.components)); |
| 15853 copy.propagatedType = node.propagatedType; | 15853 copy.propagatedType = node.propagatedType; |
| 15854 copy.staticType = node.staticType; | 15854 copy.staticType = node.staticType; |
| 15855 return copy; | 15855 return copy; |
| 15856 } | 15856 } |
| 15857 | 15857 |
| 15858 ThisExpression visitThisExpression(ThisExpression node) { | 15858 ThisExpression visitThisExpression(ThisExpression node) { |
| 15859 ThisExpression copy = new ThisExpression(mapToken(node.keyword)); | 15859 ThisExpression copy = new ThisExpression(_mapToken(node.keyword)); |
| 15860 copy.propagatedType = node.propagatedType; | 15860 copy.propagatedType = node.propagatedType; |
| 15861 copy.staticType = node.staticType; | 15861 copy.staticType = node.staticType; |
| 15862 return copy; | 15862 return copy; |
| 15863 } | 15863 } |
| 15864 | 15864 |
| 15865 ThrowExpression visitThrowExpression(ThrowExpression node) { | 15865 ThrowExpression visitThrowExpression(ThrowExpression node) { |
| 15866 ThrowExpression copy = new ThrowExpression(mapToken(node.keyword), cloneNode
(node.expression)); | 15866 ThrowExpression copy = new ThrowExpression(_mapToken(node.keyword), _cloneNo
de(node.expression)); |
| 15867 copy.propagatedType = node.propagatedType; | 15867 copy.propagatedType = node.propagatedType; |
| 15868 copy.staticType = node.staticType; | 15868 copy.staticType = node.staticType; |
| 15869 return copy; | 15869 return copy; |
| 15870 } | 15870 } |
| 15871 | 15871 |
| 15872 TopLevelVariableDeclaration visitTopLevelVariableDeclaration(TopLevelVariableD
eclaration node) => new TopLevelVariableDeclaration(cloneNode(node.documentation
Comment), cloneNodeList(node.metadata), cloneNode(node.variables), mapToken(node
.semicolon)); | 15872 TopLevelVariableDeclaration visitTopLevelVariableDeclaration(TopLevelVariableD
eclaration node) => new TopLevelVariableDeclaration(_cloneNode(node.documentatio
nComment), _cloneNodeList(node.metadata), _cloneNode(node.variables), _mapToken(
node.semicolon)); |
| 15873 | 15873 |
| 15874 TryStatement visitTryStatement(TryStatement node) => new TryStatement(mapToken
(node.tryKeyword), cloneNode(node.body), cloneNodeList(node.catchClauses), mapTo
ken(node.finallyKeyword), cloneNode(node.finallyBlock)); | 15874 TryStatement visitTryStatement(TryStatement node) => new TryStatement(_mapToke
n(node.tryKeyword), _cloneNode(node.body), _cloneNodeList(node.catchClauses), _m
apToken(node.finallyKeyword), _cloneNode(node.finallyBlock)); |
| 15875 | 15875 |
| 15876 TypeArgumentList visitTypeArgumentList(TypeArgumentList node) => new TypeArgum
entList(mapToken(node.leftBracket), cloneNodeList(node.arguments), mapToken(node
.rightBracket)); | 15876 TypeArgumentList visitTypeArgumentList(TypeArgumentList node) => new TypeArgum
entList(_mapToken(node.leftBracket), _cloneNodeList(node.arguments), _mapToken(n
ode.rightBracket)); |
| 15877 | 15877 |
| 15878 TypeName visitTypeName(TypeName node) { | 15878 TypeName visitTypeName(TypeName node) { |
| 15879 TypeName copy = new TypeName(cloneNode(node.name), cloneNode(node.typeArgume
nts)); | 15879 TypeName copy = new TypeName(_cloneNode(node.name), _cloneNode(node.typeArgu
ments)); |
| 15880 copy.type = node.type; | 15880 copy.type = node.type; |
| 15881 return copy; | 15881 return copy; |
| 15882 } | 15882 } |
| 15883 | 15883 |
| 15884 TypeParameter visitTypeParameter(TypeParameter node) => new TypeParameter(clon
eNode(node.documentationComment), cloneNodeList(node.metadata), cloneNode(node.n
ame), mapToken(node.keyword), cloneNode(node.bound)); | 15884 TypeParameter visitTypeParameter(TypeParameter node) => new TypeParameter(_clo
neNode(node.documentationComment), _cloneNodeList(node.metadata), _cloneNode(nod
e.name), _mapToken(node.keyword), _cloneNode(node.bound)); |
| 15885 | 15885 |
| 15886 TypeParameterList visitTypeParameterList(TypeParameterList node) => new TypePa
rameterList(mapToken(node.leftBracket), cloneNodeList(node.typeParameters), mapT
oken(node.rightBracket)); | 15886 TypeParameterList visitTypeParameterList(TypeParameterList node) => new TypePa
rameterList(_mapToken(node.leftBracket), _cloneNodeList(node.typeParameters), _m
apToken(node.rightBracket)); |
| 15887 | 15887 |
| 15888 VariableDeclaration visitVariableDeclaration(VariableDeclaration node) => new
VariableDeclaration(null, cloneNodeList(node.metadata), cloneNode(node.name), ma
pToken(node.equals), cloneNode(node.initializer)); | 15888 VariableDeclaration visitVariableDeclaration(VariableDeclaration node) => new
VariableDeclaration(null, _cloneNodeList(node.metadata), _cloneNode(node.name),
_mapToken(node.equals), _cloneNode(node.initializer)); |
| 15889 | 15889 |
| 15890 VariableDeclarationList visitVariableDeclarationList(VariableDeclarationList n
ode) => new VariableDeclarationList(null, cloneNodeList(node.metadata), mapToken
(node.keyword), cloneNode(node.type), cloneNodeList(node.variables)); | 15890 VariableDeclarationList visitVariableDeclarationList(VariableDeclarationList n
ode) => new VariableDeclarationList(null, _cloneNodeList(node.metadata), _mapTok
en(node.keyword), _cloneNode(node.type), _cloneNodeList(node.variables)); |
| 15891 | 15891 |
| 15892 VariableDeclarationStatement visitVariableDeclarationStatement(VariableDeclara
tionStatement node) => new VariableDeclarationStatement(cloneNode(node.variables
), mapToken(node.semicolon)); | 15892 VariableDeclarationStatement visitVariableDeclarationStatement(VariableDeclara
tionStatement node) => new VariableDeclarationStatement(_cloneNode(node.variable
s), _mapToken(node.semicolon)); |
| 15893 | 15893 |
| 15894 WhileStatement visitWhileStatement(WhileStatement node) => new WhileStatement(
mapToken(node.keyword), mapToken(node.leftParenthesis), cloneNode(node.condition
), mapToken(node.rightParenthesis), cloneNode(node.body)); | 15894 WhileStatement visitWhileStatement(WhileStatement node) => new WhileStatement(
_mapToken(node.keyword), _mapToken(node.leftParenthesis), _cloneNode(node.condit
ion), _mapToken(node.rightParenthesis), _cloneNode(node.body)); |
| 15895 | 15895 |
| 15896 WithClause visitWithClause(WithClause node) => new WithClause(mapToken(node.wi
thKeyword), cloneNodeList(node.mixinTypes)); | 15896 WithClause visitWithClause(WithClause node) => new WithClause(_mapToken(node.w
ithKeyword), _cloneNodeList(node.mixinTypes)); |
| 15897 | 15897 |
| 15898 AstNode cloneNode(AstNode node) { | 15898 AstNode _cloneNode(AstNode node) { |
| 15899 if (node == null) { | 15899 if (node == null) { |
| 15900 return null; | 15900 return null; |
| 15901 } | 15901 } |
| 15902 if (identical(node, _oldNode)) { | 15902 if (identical(node, _oldNode)) { |
| 15903 return _newNode; | 15903 return _newNode; |
| 15904 } | 15904 } |
| 15905 return node.accept(this) as AstNode; | 15905 return node.accept(this) as AstNode; |
| 15906 } | 15906 } |
| 15907 | 15907 |
| 15908 List cloneNodeList(NodeList nodes) { | 15908 List _cloneNodeList(NodeList nodes) { |
| 15909 List clonedNodes = new List(); | 15909 List clonedNodes = new List(); |
| 15910 for (AstNode node in nodes) { | 15910 for (AstNode node in nodes) { |
| 15911 clonedNodes.add(cloneNode(node)); | 15911 clonedNodes.add(_cloneNode(node)); |
| 15912 } | 15912 } |
| 15913 return clonedNodes; | 15913 return clonedNodes; |
| 15914 } | 15914 } |
| 15915 | 15915 |
| 15916 Token mapToken(Token oldToken) { | 15916 Token _mapToken(Token oldToken) { |
| 15917 if (oldToken == null) { | 15917 if (oldToken == null) { |
| 15918 return null; | 15918 return null; |
| 15919 } | 15919 } |
| 15920 return _tokenMap.get(oldToken); | 15920 return _tokenMap.get(oldToken); |
| 15921 } | 15921 } |
| 15922 | 15922 |
| 15923 List<Token> mapTokens(List<Token> oldTokens) { | 15923 List<Token> _mapTokens(List<Token> oldTokens) { |
| 15924 List<Token> newTokens = new List<Token>(oldTokens.length); | 15924 List<Token> newTokens = new List<Token>(oldTokens.length); |
| 15925 for (int index = 0; index < newTokens.length; index++) { | 15925 for (int index = 0; index < newTokens.length; index++) { |
| 15926 newTokens[index] = mapToken(oldTokens[index]); | 15926 newTokens[index] = _mapToken(oldTokens[index]); |
| 15927 } | 15927 } |
| 15928 return newTokens; | 15928 return newTokens; |
| 15929 } | 15929 } |
| 15930 } | 15930 } |
| 15931 | 15931 |
| 15932 /** | 15932 /** |
| 15933 * Traverse the AST from initial child node to successive parents, building a co
llection of local | 15933 * Traverse the AST from initial child node to successive parents, building a co
llection of local |
| 15934 * variable and parameter names visible to the initial child node. In case of na
me shadowing, the | 15934 * variable and parameter names visible to the initial child node. In case of na
me shadowing, the |
| 15935 * first name seen is the most specific one so names are not redefined. | 15935 * first name seen is the most specific one so names are not redefined. |
| 15936 * | 15936 * |
| (...skipping 13 matching lines...) Expand all Loading... |
| 15950 | 15950 |
| 15951 ScopedNameFinder(int position) { | 15951 ScopedNameFinder(int position) { |
| 15952 this._position = position; | 15952 this._position = position; |
| 15953 } | 15953 } |
| 15954 | 15954 |
| 15955 Declaration get declaration => _declarationNode; | 15955 Declaration get declaration => _declarationNode; |
| 15956 | 15956 |
| 15957 Map<String, SimpleIdentifier> get locals => _locals; | 15957 Map<String, SimpleIdentifier> get locals => _locals; |
| 15958 | 15958 |
| 15959 Object visitBlock(Block node) { | 15959 Object visitBlock(Block node) { |
| 15960 checkStatements(node.statements); | 15960 _checkStatements(node.statements); |
| 15961 return super.visitBlock(node); | 15961 return super.visitBlock(node); |
| 15962 } | 15962 } |
| 15963 | 15963 |
| 15964 Object visitCatchClause(CatchClause node) { | 15964 Object visitCatchClause(CatchClause node) { |
| 15965 addToScope(node.exceptionParameter); | 15965 _addToScope(node.exceptionParameter); |
| 15966 addToScope(node.stackTraceParameter); | 15966 _addToScope(node.stackTraceParameter); |
| 15967 return super.visitCatchClause(node); | 15967 return super.visitCatchClause(node); |
| 15968 } | 15968 } |
| 15969 | 15969 |
| 15970 Object visitConstructorDeclaration(ConstructorDeclaration node) { | 15970 Object visitConstructorDeclaration(ConstructorDeclaration node) { |
| 15971 if (_immediateChild != node.parameters) { | 15971 if (_immediateChild != node.parameters) { |
| 15972 addParameters(node.parameters.parameters); | 15972 _addParameters(node.parameters.parameters); |
| 15973 } | 15973 } |
| 15974 _declarationNode = node; | 15974 _declarationNode = node; |
| 15975 return null; | 15975 return null; |
| 15976 } | 15976 } |
| 15977 | 15977 |
| 15978 Object visitFieldDeclaration(FieldDeclaration node) { | 15978 Object visitFieldDeclaration(FieldDeclaration node) { |
| 15979 _declarationNode = node; | 15979 _declarationNode = node; |
| 15980 return null; | 15980 return null; |
| 15981 } | 15981 } |
| 15982 | 15982 |
| 15983 Object visitForEachStatement(ForEachStatement node) { | 15983 Object visitForEachStatement(ForEachStatement node) { |
| 15984 DeclaredIdentifier loopVariable = node.loopVariable; | 15984 DeclaredIdentifier loopVariable = node.loopVariable; |
| 15985 if (loopVariable != null) { | 15985 if (loopVariable != null) { |
| 15986 addToScope(loopVariable.identifier); | 15986 _addToScope(loopVariable.identifier); |
| 15987 } | 15987 } |
| 15988 return super.visitForEachStatement(node); | 15988 return super.visitForEachStatement(node); |
| 15989 } | 15989 } |
| 15990 | 15990 |
| 15991 Object visitForStatement(ForStatement node) { | 15991 Object visitForStatement(ForStatement node) { |
| 15992 if (_immediateChild != node.variables && node.variables != null) { | 15992 if (_immediateChild != node.variables && node.variables != null) { |
| 15993 addVariables(node.variables.variables); | 15993 _addVariables(node.variables.variables); |
| 15994 } | 15994 } |
| 15995 return super.visitForStatement(node); | 15995 return super.visitForStatement(node); |
| 15996 } | 15996 } |
| 15997 | 15997 |
| 15998 Object visitFunctionDeclaration(FunctionDeclaration node) { | 15998 Object visitFunctionDeclaration(FunctionDeclaration node) { |
| 15999 if (node.parent is! FunctionDeclarationStatement) { | 15999 if (node.parent is! FunctionDeclarationStatement) { |
| 16000 _declarationNode = node; | 16000 _declarationNode = node; |
| 16001 return null; | 16001 return null; |
| 16002 } | 16002 } |
| 16003 return super.visitFunctionDeclaration(node); | 16003 return super.visitFunctionDeclaration(node); |
| 16004 } | 16004 } |
| 16005 | 16005 |
| 16006 Object visitFunctionDeclarationStatement(FunctionDeclarationStatement node) { | 16006 Object visitFunctionDeclarationStatement(FunctionDeclarationStatement node) { |
| 16007 _referenceIsWithinLocalFunction = true; | 16007 _referenceIsWithinLocalFunction = true; |
| 16008 return super.visitFunctionDeclarationStatement(node); | 16008 return super.visitFunctionDeclarationStatement(node); |
| 16009 } | 16009 } |
| 16010 | 16010 |
| 16011 Object visitFunctionExpression(FunctionExpression node) { | 16011 Object visitFunctionExpression(FunctionExpression node) { |
| 16012 if (node.parameters != null && _immediateChild != node.parameters) { | 16012 if (node.parameters != null && _immediateChild != node.parameters) { |
| 16013 addParameters(node.parameters.parameters); | 16013 _addParameters(node.parameters.parameters); |
| 16014 } | 16014 } |
| 16015 return super.visitFunctionExpression(node); | 16015 return super.visitFunctionExpression(node); |
| 16016 } | 16016 } |
| 16017 | 16017 |
| 16018 Object visitMethodDeclaration(MethodDeclaration node) { | 16018 Object visitMethodDeclaration(MethodDeclaration node) { |
| 16019 _declarationNode = node; | 16019 _declarationNode = node; |
| 16020 if (node.parameters == null) { | 16020 if (node.parameters == null) { |
| 16021 return null; | 16021 return null; |
| 16022 } | 16022 } |
| 16023 if (_immediateChild != node.parameters) { | 16023 if (_immediateChild != node.parameters) { |
| 16024 addParameters(node.parameters.parameters); | 16024 _addParameters(node.parameters.parameters); |
| 16025 } | 16025 } |
| 16026 return null; | 16026 return null; |
| 16027 } | 16027 } |
| 16028 | 16028 |
| 16029 Object visitNode(AstNode node) { | 16029 Object visitNode(AstNode node) { |
| 16030 _immediateChild = node; | 16030 _immediateChild = node; |
| 16031 AstNode parent = node.parent; | 16031 AstNode parent = node.parent; |
| 16032 if (parent != null) { | 16032 if (parent != null) { |
| 16033 parent.accept(this); | 16033 parent.accept(this); |
| 16034 } | 16034 } |
| 16035 return null; | 16035 return null; |
| 16036 } | 16036 } |
| 16037 | 16037 |
| 16038 Object visitSwitchMember(SwitchMember node) { | 16038 Object visitSwitchMember(SwitchMember node) { |
| 16039 checkStatements(node.statements); | 16039 _checkStatements(node.statements); |
| 16040 return super.visitSwitchMember(node); | 16040 return super.visitSwitchMember(node); |
| 16041 } | 16041 } |
| 16042 | 16042 |
| 16043 Object visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) { | 16043 Object visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) { |
| 16044 _declarationNode = node; | 16044 _declarationNode = node; |
| 16045 return null; | 16045 return null; |
| 16046 } | 16046 } |
| 16047 | 16047 |
| 16048 Object visitTypeAlias(TypeAlias node) { | 16048 Object visitTypeAlias(TypeAlias node) { |
| 16049 _declarationNode = node; | 16049 _declarationNode = node; |
| 16050 return null; | 16050 return null; |
| 16051 } | 16051 } |
| 16052 | 16052 |
| 16053 void addParameters(NodeList<FormalParameter> vars) { | 16053 void _addParameters(NodeList<FormalParameter> vars) { |
| 16054 for (FormalParameter var2 in vars) { | 16054 for (FormalParameter var2 in vars) { |
| 16055 addToScope(var2.identifier); | 16055 _addToScope(var2.identifier); |
| 16056 } | 16056 } |
| 16057 } | 16057 } |
| 16058 | 16058 |
| 16059 void addToScope(SimpleIdentifier identifier) { | 16059 void _addToScope(SimpleIdentifier identifier) { |
| 16060 if (identifier != null && isInRange(identifier)) { | 16060 if (identifier != null && _isInRange(identifier)) { |
| 16061 String name = identifier.name; | 16061 String name = identifier.name; |
| 16062 if (!_locals.containsKey(name)) { | 16062 if (!_locals.containsKey(name)) { |
| 16063 _locals[name] = identifier; | 16063 _locals[name] = identifier; |
| 16064 } | 16064 } |
| 16065 } | 16065 } |
| 16066 } | 16066 } |
| 16067 | 16067 |
| 16068 void addVariables(NodeList<VariableDeclaration> vars) { | 16068 void _addVariables(NodeList<VariableDeclaration> vars) { |
| 16069 for (VariableDeclaration var2 in vars) { | 16069 for (VariableDeclaration var2 in vars) { |
| 16070 addToScope(var2.name); | 16070 _addToScope(var2.name); |
| 16071 } | 16071 } |
| 16072 } | 16072 } |
| 16073 | 16073 |
| 16074 /** | 16074 /** |
| 16075 * Some statements define names that are visible downstream. There aren't many
of these. | 16075 * Some statements define names that are visible downstream. There aren't many
of these. |
| 16076 * | 16076 * |
| 16077 * @param statements the list of statements to check for name definitions | 16077 * @param statements the list of statements to check for name definitions |
| 16078 */ | 16078 */ |
| 16079 void checkStatements(List<Statement> statements) { | 16079 void _checkStatements(List<Statement> statements) { |
| 16080 for (Statement stmt in statements) { | 16080 for (Statement stmt in statements) { |
| 16081 if (identical(stmt, _immediateChild)) { | 16081 if (identical(stmt, _immediateChild)) { |
| 16082 return; | 16082 return; |
| 16083 } | 16083 } |
| 16084 if (stmt is VariableDeclarationStatement) { | 16084 if (stmt is VariableDeclarationStatement) { |
| 16085 addVariables(stmt.variables.variables); | 16085 _addVariables(stmt.variables.variables); |
| 16086 } else if (stmt is FunctionDeclarationStatement && !_referenceIsWithinLoca
lFunction) { | 16086 } else if (stmt is FunctionDeclarationStatement && !_referenceIsWithinLoca
lFunction) { |
| 16087 addToScope(stmt.functionDeclaration.name); | 16087 _addToScope(stmt.functionDeclaration.name); |
| 16088 } | 16088 } |
| 16089 } | 16089 } |
| 16090 } | 16090 } |
| 16091 | 16091 |
| 16092 bool isInRange(AstNode node) { | 16092 bool _isInRange(AstNode node) { |
| 16093 if (_position < 0) { | 16093 if (_position < 0) { |
| 16094 // if source position is not set then all nodes are in range | 16094 // if source position is not set then all nodes are in range |
| 16095 return true; | 16095 return true; |
| 16096 } | 16096 } |
| 16097 return node.end < _position; | 16097 return node.end < _position; |
| 16098 } | 16098 } |
| 16099 } | 16099 } |
| 16100 /** | 16100 /** |
| 16101 * Instances of the class {@code NodeList} represent a list of AST nodes that ha
ve a common parent. | 16101 * Instances of the class {@code NodeList} represent a list of AST nodes that ha
ve a common parent. |
| 16102 */ | 16102 */ |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16212 throw new RangeError("Index: ${index}, Size: ${_elements.length}"); | 16212 throw new RangeError("Index: ${index}, Size: ${_elements.length}"); |
| 16213 } | 16213 } |
| 16214 owner.becomeParentOf(node); | 16214 owner.becomeParentOf(node); |
| 16215 _elements[index] = node; | 16215 _elements[index] = node; |
| 16216 } | 16216 } |
| 16217 int get length => _elements.length; | 16217 int get length => _elements.length; |
| 16218 void set length(int value) { | 16218 void set length(int value) { |
| 16219 throw new UnsupportedError("Cannot resize NodeList."); | 16219 throw new UnsupportedError("Cannot resize NodeList."); |
| 16220 } | 16220 } |
| 16221 } | 16221 } |
| OLD | NEW |