OLD | NEW |
1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
3 library engine.ast; | 3 library engine.ast; |
4 import 'dart:collection'; | 4 import 'dart:collection'; |
5 import 'java_core.dart'; | 5 import 'java_core.dart'; |
6 import 'java_engine.dart'; | 6 import 'java_engine.dart'; |
7 import 'source.dart' show LineInfo; | 7 import 'source.dart' show LineInfo; |
8 import 'scanner.dart'; | 8 import 'scanner.dart'; |
9 import 'engine.dart' show AnalysisEngine; | 9 import 'engine.dart' show AnalysisEngine; |
10 import 'utilities_dart.dart'; | 10 import 'utilities_dart.dart'; |
(...skipping 14608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14619 } | 14619 } |
14620 List clone3(NodeList nodes) { | 14620 List clone3(NodeList nodes) { |
14621 List clonedNodes = new List(); | 14621 List clonedNodes = new List(); |
14622 for (ASTNode node in nodes) { | 14622 for (ASTNode node in nodes) { |
14623 clonedNodes.add(node.accept(this) as ASTNode); | 14623 clonedNodes.add(node.accept(this) as ASTNode); |
14624 } | 14624 } |
14625 return clonedNodes; | 14625 return clonedNodes; |
14626 } | 14626 } |
14627 } | 14627 } |
14628 /** | 14628 /** |
| 14629 * Instances of the class `ASTComparator` compare the structure of two ASTNodes
to see whether |
| 14630 * they are equal. |
| 14631 */ |
| 14632 class ASTComparator implements ASTVisitor<bool> { |
| 14633 |
| 14634 /** |
| 14635 * Return `true` if the two AST nodes are equal. |
| 14636 * |
| 14637 * @param first the first node being compared |
| 14638 * @param second the second node being compared |
| 14639 * @return `true` if the two AST nodes are equal |
| 14640 */ |
| 14641 static bool equals3(CompilationUnit first, CompilationUnit second) { |
| 14642 ASTComparator comparator = new ASTComparator(); |
| 14643 return comparator.isEqual(first, second); |
| 14644 } |
| 14645 |
| 14646 /** |
| 14647 * The AST node with which the node being visited is to be compared. This is o
nly valid at the |
| 14648 * beginning of each visit method (until [isEqual] is invoked). |
| 14649 */ |
| 14650 ASTNode _other; |
| 14651 bool visitAdjacentStrings(AdjacentStrings node) { |
| 14652 AdjacentStrings other = this._other as AdjacentStrings; |
| 14653 return isEqual5(node.strings, other.strings); |
| 14654 } |
| 14655 bool visitAnnotation(Annotation node) { |
| 14656 Annotation other = this._other as Annotation; |
| 14657 return isEqual6(node.atSign, other.atSign) && isEqual(node.name, other.name)
&& isEqual6(node.period, other.period) && isEqual(node.constructorName, other.c
onstructorName) && isEqual(node.arguments, other.arguments); |
| 14658 } |
| 14659 bool visitArgumentDefinitionTest(ArgumentDefinitionTest node) { |
| 14660 ArgumentDefinitionTest other = this._other as ArgumentDefinitionTest; |
| 14661 return isEqual6(node.question, other.question) && isEqual(node.identifier, o
ther.identifier); |
| 14662 } |
| 14663 bool visitArgumentList(ArgumentList node) { |
| 14664 ArgumentList other = this._other as ArgumentList; |
| 14665 return isEqual6(node.leftParenthesis, other.leftParenthesis) && isEqual5(nod
e.arguments, other.arguments) && isEqual6(node.rightParenthesis, other.rightPare
nthesis); |
| 14666 } |
| 14667 bool visitAsExpression(AsExpression node) { |
| 14668 AsExpression other = this._other as AsExpression; |
| 14669 return isEqual(node.expression, other.expression) && isEqual6(node.asOperato
r, other.asOperator) && isEqual(node.type, other.type); |
| 14670 } |
| 14671 bool visitAssertStatement(AssertStatement node) { |
| 14672 AssertStatement other = this._other as AssertStatement; |
| 14673 return isEqual6(node.keyword, other.keyword) && isEqual6(node.leftParenthesi
s, other.leftParenthesis) && isEqual(node.condition, other.condition) && isEqual
6(node.rightParenthesis, other.rightParenthesis) && isEqual6(node.semicolon, oth
er.semicolon); |
| 14674 } |
| 14675 bool visitAssignmentExpression(AssignmentExpression node) { |
| 14676 AssignmentExpression other = this._other as AssignmentExpression; |
| 14677 return isEqual(node.leftHandSide, other.leftHandSide) && isEqual6(node.opera
tor, other.operator) && isEqual(node.rightHandSide, other.rightHandSide); |
| 14678 } |
| 14679 bool visitBinaryExpression(BinaryExpression node) { |
| 14680 BinaryExpression other = this._other as BinaryExpression; |
| 14681 return isEqual(node.leftOperand, other.leftOperand) && isEqual6(node.operato
r, other.operator) && isEqual(node.rightOperand, other.rightOperand); |
| 14682 } |
| 14683 bool visitBlock(Block node) { |
| 14684 Block other = this._other as Block; |
| 14685 return isEqual6(node.leftBracket, other.leftBracket) && isEqual5(node.statem
ents, other.statements) && isEqual6(node.rightBracket, other.rightBracket); |
| 14686 } |
| 14687 bool visitBlockFunctionBody(BlockFunctionBody node) { |
| 14688 BlockFunctionBody other = this._other as BlockFunctionBody; |
| 14689 return isEqual(node.block, other.block); |
| 14690 } |
| 14691 bool visitBooleanLiteral(BooleanLiteral node) { |
| 14692 BooleanLiteral other = this._other as BooleanLiteral; |
| 14693 return isEqual6(node.literal, other.literal) && identical(node.value, other.
value); |
| 14694 } |
| 14695 bool visitBreakStatement(BreakStatement node) { |
| 14696 BreakStatement other = this._other as BreakStatement; |
| 14697 return isEqual6(node.keyword, other.keyword) && isEqual(node.label, other.la
bel) && isEqual6(node.semicolon, other.semicolon); |
| 14698 } |
| 14699 bool visitCascadeExpression(CascadeExpression node) { |
| 14700 CascadeExpression other = this._other as CascadeExpression; |
| 14701 return isEqual(node.target, other.target) && isEqual5(node.cascadeSections,
other.cascadeSections); |
| 14702 } |
| 14703 bool visitCatchClause(CatchClause node) { |
| 14704 CatchClause other = this._other as CatchClause; |
| 14705 return isEqual6(node.onKeyword, other.onKeyword) && isEqual(node.exceptionTy
pe, other.exceptionType) && isEqual6(node.catchKeyword, other.catchKeyword) && i
sEqual6(node.leftParenthesis, other.leftParenthesis) && isEqual(node.exceptionPa
rameter, other.exceptionParameter) && isEqual6(node.comma, other.comma) && isEqu
al(node.stackTraceParameter, other.stackTraceParameter) && isEqual6(node.rightPa
renthesis, other.rightParenthesis) && isEqual(node.body, other.body); |
| 14706 } |
| 14707 bool visitClassDeclaration(ClassDeclaration node) { |
| 14708 ClassDeclaration other = this._other as ClassDeclaration; |
| 14709 return isEqual(node.documentationComment, other.documentationComment) && isE
qual5(node.metadata, other.metadata) && isEqual6(node.abstractKeyword, other.abs
tractKeyword) && isEqual6(node.classKeyword, other.classKeyword) && isEqual(node
.name, other.name) && isEqual(node.typeParameters, other.typeParameters) && isEq
ual(node.extendsClause, other.extendsClause) && isEqual(node.withClause, other.w
ithClause) && isEqual(node.implementsClause, other.implementsClause) && isEqual6
(node.leftBracket, other.leftBracket) && isEqual5(node.members, other.members) &
& isEqual6(node.rightBracket, other.rightBracket); |
| 14710 } |
| 14711 bool visitClassTypeAlias(ClassTypeAlias node) { |
| 14712 ClassTypeAlias other = this._other as ClassTypeAlias; |
| 14713 return isEqual(node.documentationComment, other.documentationComment) && isE
qual5(node.metadata, other.metadata) && isEqual6(node.keyword, other.keyword) &&
isEqual(node.name, other.name) && isEqual(node.typeParameters, other.typeParame
ters) && isEqual6(node.equals, other.equals) && isEqual6(node.abstractKeyword, o
ther.abstractKeyword) && isEqual(node.superclass, other.superclass) && isEqual(n
ode.withClause, other.withClause) && isEqual(node.implementsClause, other.implem
entsClause) && isEqual6(node.semicolon, other.semicolon); |
| 14714 } |
| 14715 bool visitComment(Comment node) { |
| 14716 Comment other = this._other as Comment; |
| 14717 return isEqual5(node.references, other.references); |
| 14718 } |
| 14719 bool visitCommentReference(CommentReference node) { |
| 14720 CommentReference other = this._other as CommentReference; |
| 14721 return isEqual6(node.newKeyword, other.newKeyword) && isEqual(node.identifie
r, other.identifier); |
| 14722 } |
| 14723 bool visitCompilationUnit(CompilationUnit node) { |
| 14724 CompilationUnit other = this._other as CompilationUnit; |
| 14725 return isEqual6(node.beginToken, other.beginToken) && isEqual(node.scriptTag
, other.scriptTag) && isEqual5(node.directives, other.directives) && isEqual5(no
de.declarations, other.declarations) && isEqual6(node.endToken, other.endToken); |
| 14726 } |
| 14727 bool visitConditionalExpression(ConditionalExpression node) { |
| 14728 ConditionalExpression other = this._other as ConditionalExpression; |
| 14729 return isEqual(node.condition, other.condition) && isEqual6(node.question, o
ther.question) && isEqual(node.thenExpression, other.thenExpression) && isEqual6
(node.colon, other.colon) && isEqual(node.elseExpression, other.elseExpression); |
| 14730 } |
| 14731 bool visitConstructorDeclaration(ConstructorDeclaration node) { |
| 14732 ConstructorDeclaration other = this._other as ConstructorDeclaration; |
| 14733 return isEqual(node.documentationComment, other.documentationComment) && isE
qual5(node.metadata, other.metadata) && isEqual6(node.externalKeyword, other.ext
ernalKeyword) && isEqual6(node.constKeyword, other.constKeyword) && isEqual6(nod
e.factoryKeyword, other.factoryKeyword) && isEqual(node.returnType, other.return
Type) && isEqual6(node.period, other.period) && isEqual(node.name, other.name) &
& isEqual(node.parameters, other.parameters) && isEqual6(node.separator, other.s
eparator) && isEqual5(node.initializers, other.initializers) && isEqual(node.red
irectedConstructor, other.redirectedConstructor) && isEqual(node.body, other.bod
y); |
| 14734 } |
| 14735 bool visitConstructorFieldInitializer(ConstructorFieldInitializer node) { |
| 14736 ConstructorFieldInitializer other = this._other as ConstructorFieldInitializ
er; |
| 14737 return isEqual6(node.keyword, other.keyword) && isEqual6(node.period, other.
period) && isEqual(node.fieldName, other.fieldName) && isEqual6(node.equals, oth
er.equals) && isEqual(node.expression, other.expression); |
| 14738 } |
| 14739 bool visitConstructorName(ConstructorName node) { |
| 14740 ConstructorName other = this._other as ConstructorName; |
| 14741 return isEqual(node.type, other.type) && isEqual6(node.period, other.period)
&& isEqual(node.name, other.name); |
| 14742 } |
| 14743 bool visitContinueStatement(ContinueStatement node) { |
| 14744 ContinueStatement other = this._other as ContinueStatement; |
| 14745 return isEqual6(node.keyword, other.keyword) && isEqual(node.label, other.la
bel) && isEqual6(node.semicolon, other.semicolon); |
| 14746 } |
| 14747 bool visitDeclaredIdentifier(DeclaredIdentifier node) { |
| 14748 DeclaredIdentifier other = this._other as DeclaredIdentifier; |
| 14749 return isEqual(node.documentationComment, other.documentationComment) && isE
qual5(node.metadata, other.metadata) && isEqual6(node.keyword, other.keyword) &&
isEqual(node.type, other.type) && isEqual(node.identifier, other.identifier); |
| 14750 } |
| 14751 bool visitDefaultFormalParameter(DefaultFormalParameter node) { |
| 14752 DefaultFormalParameter other = this._other as DefaultFormalParameter; |
| 14753 return isEqual(node.parameter, other.parameter) && identical(node.kind, othe
r.kind) && isEqual6(node.separator, other.separator) && isEqual(node.defaultValu
e, other.defaultValue); |
| 14754 } |
| 14755 bool visitDoStatement(DoStatement node) { |
| 14756 DoStatement other = this._other as DoStatement; |
| 14757 return isEqual6(node.doKeyword, other.doKeyword) && isEqual(node.body, other
.body) && isEqual6(node.whileKeyword, other.whileKeyword) && isEqual6(node.leftP
arenthesis, other.leftParenthesis) && isEqual(node.condition, other.condition) &
& isEqual6(node.rightParenthesis, other.rightParenthesis) && isEqual6(node.semic
olon, other.semicolon); |
| 14758 } |
| 14759 bool visitDoubleLiteral(DoubleLiteral node) { |
| 14760 DoubleLiteral other = this._other as DoubleLiteral; |
| 14761 return isEqual6(node.literal, other.literal) && node.value == other.value; |
| 14762 } |
| 14763 bool visitEmptyFunctionBody(EmptyFunctionBody node) { |
| 14764 EmptyFunctionBody other = this._other as EmptyFunctionBody; |
| 14765 return isEqual6(node.semicolon, other.semicolon); |
| 14766 } |
| 14767 bool visitEmptyStatement(EmptyStatement node) { |
| 14768 EmptyStatement other = this._other as EmptyStatement; |
| 14769 return isEqual6(node.semicolon, other.semicolon); |
| 14770 } |
| 14771 bool visitExportDirective(ExportDirective node) { |
| 14772 ExportDirective other = this._other as ExportDirective; |
| 14773 return isEqual(node.documentationComment, other.documentationComment) && isE
qual5(node.metadata, other.metadata) && isEqual6(node.keyword, other.keyword) &&
isEqual(node.uri, other.uri) && isEqual5(node.combinators, other.combinators) &
& isEqual6(node.semicolon, other.semicolon); |
| 14774 } |
| 14775 bool visitExpressionFunctionBody(ExpressionFunctionBody node) { |
| 14776 ExpressionFunctionBody other = this._other as ExpressionFunctionBody; |
| 14777 return isEqual6(node.functionDefinition, other.functionDefinition) && isEqua
l(node.expression, other.expression) && isEqual6(node.semicolon, other.semicolon
); |
| 14778 } |
| 14779 bool visitExpressionStatement(ExpressionStatement node) { |
| 14780 ExpressionStatement other = this._other as ExpressionStatement; |
| 14781 return isEqual(node.expression, other.expression) && isEqual6(node.semicolon
, other.semicolon); |
| 14782 } |
| 14783 bool visitExtendsClause(ExtendsClause node) { |
| 14784 ExtendsClause other = this._other as ExtendsClause; |
| 14785 return isEqual6(node.keyword, other.keyword) && isEqual(node.superclass, oth
er.superclass); |
| 14786 } |
| 14787 bool visitFieldDeclaration(FieldDeclaration node) { |
| 14788 FieldDeclaration other = this._other as FieldDeclaration; |
| 14789 return isEqual(node.documentationComment, other.documentationComment) && isE
qual5(node.metadata, other.metadata) && isEqual6(node.staticKeyword, other.stati
cKeyword) && isEqual(node.fields, other.fields) && isEqual6(node.semicolon, othe
r.semicolon); |
| 14790 } |
| 14791 bool visitFieldFormalParameter(FieldFormalParameter node) { |
| 14792 FieldFormalParameter other = this._other as FieldFormalParameter; |
| 14793 return isEqual(node.documentationComment, other.documentationComment) && isE
qual5(node.metadata, other.metadata) && isEqual6(node.keyword, other.keyword) &&
isEqual(node.type, other.type) && isEqual6(node.thisToken, other.thisToken) &&
isEqual6(node.period, other.period) && isEqual(node.identifier, other.identifier
); |
| 14794 } |
| 14795 bool visitForEachStatement(ForEachStatement node) { |
| 14796 ForEachStatement other = this._other as ForEachStatement; |
| 14797 return isEqual6(node.forKeyword, other.forKeyword) && isEqual6(node.leftPare
nthesis, other.leftParenthesis) && isEqual(node.loopVariable, other.loopVariable
) && isEqual6(node.inKeyword, other.inKeyword) && isEqual(node.iterator, other.i
terator) && isEqual6(node.rightParenthesis, other.rightParenthesis) && isEqual(n
ode.body, other.body); |
| 14798 } |
| 14799 bool visitFormalParameterList(FormalParameterList node) { |
| 14800 FormalParameterList other = this._other as FormalParameterList; |
| 14801 return isEqual6(node.leftParenthesis, other.leftParenthesis) && isEqual5(nod
e.parameters, other.parameters) && isEqual6(node.leftDelimiter, other.leftDelimi
ter) && isEqual6(node.rightDelimiter, other.rightDelimiter) && isEqual6(node.rig
htParenthesis, other.rightParenthesis); |
| 14802 } |
| 14803 bool visitForStatement(ForStatement node) { |
| 14804 ForStatement other = this._other as ForStatement; |
| 14805 return isEqual6(node.forKeyword, other.forKeyword) && isEqual6(node.leftPare
nthesis, other.leftParenthesis) && isEqual(node.variables, other.variables) && i
sEqual(node.initialization, other.initialization) && isEqual6(node.leftSeparator
, other.leftSeparator) && isEqual(node.condition, other.condition) && isEqual6(n
ode.rightSeparator, other.rightSeparator) && isEqual5(node.updaters, other.updat
ers) && isEqual6(node.rightParenthesis, other.rightParenthesis) && isEqual(node.
body, other.body); |
| 14806 } |
| 14807 bool visitFunctionDeclaration(FunctionDeclaration node) { |
| 14808 FunctionDeclaration other = this._other as FunctionDeclaration; |
| 14809 return isEqual(node.documentationComment, other.documentationComment) && isE
qual5(node.metadata, other.metadata) && isEqual6(node.externalKeyword, other.ext
ernalKeyword) && isEqual(node.returnType, other.returnType) && isEqual6(node.pro
pertyKeyword, other.propertyKeyword) && isEqual(node.name, other.name) && isEqua
l(node.functionExpression, other.functionExpression); |
| 14810 } |
| 14811 bool visitFunctionDeclarationStatement(FunctionDeclarationStatement node) { |
| 14812 FunctionDeclarationStatement other = this._other as FunctionDeclarationState
ment; |
| 14813 return isEqual(node.functionDeclaration, other.functionDeclaration); |
| 14814 } |
| 14815 bool visitFunctionExpression(FunctionExpression node) { |
| 14816 FunctionExpression other = this._other as FunctionExpression; |
| 14817 return isEqual(node.parameters, other.parameters) && isEqual(node.body, othe
r.body); |
| 14818 } |
| 14819 bool visitFunctionExpressionInvocation(FunctionExpressionInvocation node) { |
| 14820 FunctionExpressionInvocation other = this._other as FunctionExpressionInvoca
tion; |
| 14821 return isEqual(node.function, other.function) && isEqual(node.argumentList,
other.argumentList); |
| 14822 } |
| 14823 bool visitFunctionTypeAlias(FunctionTypeAlias node) { |
| 14824 FunctionTypeAlias other = this._other as FunctionTypeAlias; |
| 14825 return isEqual(node.documentationComment, other.documentationComment) && isE
qual5(node.metadata, other.metadata) && isEqual6(node.keyword, other.keyword) &&
isEqual(node.returnType, other.returnType) && isEqual(node.name, other.name) &&
isEqual(node.typeParameters, other.typeParameters) && isEqual(node.parameters,
other.parameters) && isEqual6(node.semicolon, other.semicolon); |
| 14826 } |
| 14827 bool visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) { |
| 14828 FunctionTypedFormalParameter other = this._other as FunctionTypedFormalParam
eter; |
| 14829 return isEqual(node.documentationComment, other.documentationComment) && isE
qual5(node.metadata, other.metadata) && isEqual(node.returnType, other.returnTyp
e) && isEqual(node.identifier, other.identifier) && isEqual(node.parameters, oth
er.parameters); |
| 14830 } |
| 14831 bool visitHideCombinator(HideCombinator node) { |
| 14832 HideCombinator other = this._other as HideCombinator; |
| 14833 return isEqual6(node.keyword, other.keyword) && isEqual5(node.hiddenNames, o
ther.hiddenNames); |
| 14834 } |
| 14835 bool visitIfStatement(IfStatement node) { |
| 14836 IfStatement other = this._other as IfStatement; |
| 14837 return isEqual6(node.ifKeyword, other.ifKeyword) && isEqual6(node.leftParent
hesis, other.leftParenthesis) && isEqual(node.condition, other.condition) && isE
qual6(node.rightParenthesis, other.rightParenthesis) && isEqual(node.thenStateme
nt, other.thenStatement) && isEqual6(node.elseKeyword, other.elseKeyword) && isE
qual(node.elseStatement, other.elseStatement); |
| 14838 } |
| 14839 bool visitImplementsClause(ImplementsClause node) { |
| 14840 ImplementsClause other = this._other as ImplementsClause; |
| 14841 return isEqual6(node.keyword, other.keyword) && isEqual5(node.interfaces, ot
her.interfaces); |
| 14842 } |
| 14843 bool visitImportDirective(ImportDirective node) { |
| 14844 ImportDirective other = this._other as ImportDirective; |
| 14845 return isEqual(node.documentationComment, other.documentationComment) && isE
qual5(node.metadata, other.metadata) && isEqual6(node.keyword, other.keyword) &&
isEqual(node.uri, other.uri) && isEqual6(node.asToken, other.asToken) && isEqua
l(node.prefix, other.prefix) && isEqual5(node.combinators, other.combinators) &&
isEqual6(node.semicolon, other.semicolon); |
| 14846 } |
| 14847 bool visitIndexExpression(IndexExpression node) { |
| 14848 IndexExpression other = this._other as IndexExpression; |
| 14849 return isEqual(node.target, other.target) && isEqual6(node.leftBracket, othe
r.leftBracket) && isEqual(node.index, other.index) && isEqual6(node.rightBracket
, other.rightBracket); |
| 14850 } |
| 14851 bool visitInstanceCreationExpression(InstanceCreationExpression node) { |
| 14852 InstanceCreationExpression other = this._other as InstanceCreationExpression
; |
| 14853 return isEqual6(node.keyword, other.keyword) && isEqual(node.constructorName
, other.constructorName) && isEqual(node.argumentList, other.argumentList); |
| 14854 } |
| 14855 bool visitIntegerLiteral(IntegerLiteral node) { |
| 14856 IntegerLiteral other = this._other as IntegerLiteral; |
| 14857 return isEqual6(node.literal, other.literal) && identical(node.value, other.
value); |
| 14858 } |
| 14859 bool visitInterpolationExpression(InterpolationExpression node) { |
| 14860 InterpolationExpression other = this._other as InterpolationExpression; |
| 14861 return isEqual6(node.leftBracket, other.leftBracket) && isEqual(node.express
ion, other.expression) && isEqual6(node.rightBracket, other.rightBracket); |
| 14862 } |
| 14863 bool visitInterpolationString(InterpolationString node) { |
| 14864 InterpolationString other = this._other as InterpolationString; |
| 14865 return isEqual6(node.contents, other.contents) && node.value == other.value; |
| 14866 } |
| 14867 bool visitIsExpression(IsExpression node) { |
| 14868 IsExpression other = this._other as IsExpression; |
| 14869 return isEqual(node.expression, other.expression) && isEqual6(node.isOperato
r, other.isOperator) && isEqual6(node.notOperator, other.notOperator) && isEqual
(node.type, other.type); |
| 14870 } |
| 14871 bool visitLabel(Label node) { |
| 14872 Label other = this._other as Label; |
| 14873 return isEqual(node.label, other.label) && isEqual6(node.colon, other.colon)
; |
| 14874 } |
| 14875 bool visitLabeledStatement(LabeledStatement node) { |
| 14876 LabeledStatement other = this._other as LabeledStatement; |
| 14877 return isEqual5(node.labels, other.labels) && isEqual(node.statement, other.
statement); |
| 14878 } |
| 14879 bool visitLibraryDirective(LibraryDirective node) { |
| 14880 LibraryDirective other = this._other as LibraryDirective; |
| 14881 return isEqual(node.documentationComment, other.documentationComment) && isE
qual5(node.metadata, other.metadata) && isEqual6(node.libraryToken, other.librar
yToken) && isEqual(node.name, other.name) && isEqual6(node.semicolon, other.semi
colon); |
| 14882 } |
| 14883 bool visitLibraryIdentifier(LibraryIdentifier node) { |
| 14884 LibraryIdentifier other = this._other as LibraryIdentifier; |
| 14885 return isEqual5(node.components, other.components); |
| 14886 } |
| 14887 bool visitListLiteral(ListLiteral node) { |
| 14888 ListLiteral other = this._other as ListLiteral; |
| 14889 return isEqual6(node.constKeyword, other.constKeyword) && isEqual(node.typeA
rguments, other.typeArguments) && isEqual6(node.leftBracket, other.leftBracket)
&& isEqual5(node.elements, other.elements) && isEqual6(node.rightBracket, other.
rightBracket); |
| 14890 } |
| 14891 bool visitMapLiteral(MapLiteral node) { |
| 14892 MapLiteral other = this._other as MapLiteral; |
| 14893 return isEqual6(node.constKeyword, other.constKeyword) && isEqual(node.typeA
rguments, other.typeArguments) && isEqual6(node.leftBracket, other.leftBracket)
&& isEqual5(node.entries, other.entries) && isEqual6(node.rightBracket, other.ri
ghtBracket); |
| 14894 } |
| 14895 bool visitMapLiteralEntry(MapLiteralEntry node) { |
| 14896 MapLiteralEntry other = this._other as MapLiteralEntry; |
| 14897 return isEqual(node.key, other.key) && isEqual6(node.separator, other.separa
tor) && isEqual(node.value, other.value); |
| 14898 } |
| 14899 bool visitMethodDeclaration(MethodDeclaration node) { |
| 14900 MethodDeclaration other = this._other as MethodDeclaration; |
| 14901 return isEqual(node.documentationComment, other.documentationComment) && isE
qual5(node.metadata, other.metadata) && isEqual6(node.externalKeyword, other.ext
ernalKeyword) && isEqual6(node.modifierKeyword, other.modifierKeyword) && isEqua
l(node.returnType, other.returnType) && isEqual6(node.propertyKeyword, other.pro
pertyKeyword) && isEqual6(node.propertyKeyword, other.propertyKeyword) && isEqua
l(node.name, other.name) && isEqual(node.parameters, other.parameters) && isEqua
l(node.body, other.body); |
| 14902 } |
| 14903 bool visitMethodInvocation(MethodInvocation node) { |
| 14904 MethodInvocation other = this._other as MethodInvocation; |
| 14905 return isEqual(node.target, other.target) && isEqual6(node.period, other.per
iod) && isEqual(node.methodName, other.methodName) && isEqual(node.argumentList,
other.argumentList); |
| 14906 } |
| 14907 bool visitNamedExpression(NamedExpression node) { |
| 14908 NamedExpression other = this._other as NamedExpression; |
| 14909 return isEqual(node.name, other.name) && isEqual(node.expression, other.expr
ession); |
| 14910 } |
| 14911 bool visitNativeClause(NativeClause node) { |
| 14912 NativeClause other = this._other as NativeClause; |
| 14913 return isEqual6(node.keyword, other.keyword) && isEqual(node.name, other.nam
e); |
| 14914 } |
| 14915 bool visitNativeFunctionBody(NativeFunctionBody node) { |
| 14916 NativeFunctionBody other = this._other as NativeFunctionBody; |
| 14917 return isEqual6(node.nativeToken, other.nativeToken) && isEqual(node.stringL
iteral, other.stringLiteral) && isEqual6(node.semicolon, other.semicolon); |
| 14918 } |
| 14919 bool visitNullLiteral(NullLiteral node) { |
| 14920 NullLiteral other = this._other as NullLiteral; |
| 14921 return isEqual6(node.literal, other.literal); |
| 14922 } |
| 14923 bool visitParenthesizedExpression(ParenthesizedExpression node) { |
| 14924 ParenthesizedExpression other = this._other as ParenthesizedExpression; |
| 14925 return isEqual6(node.leftParenthesis, other.leftParenthesis) && isEqual(node
.expression, other.expression) && isEqual6(node.rightParenthesis, other.rightPar
enthesis); |
| 14926 } |
| 14927 bool visitPartDirective(PartDirective node) { |
| 14928 PartDirective other = this._other as PartDirective; |
| 14929 return isEqual(node.documentationComment, other.documentationComment) && isE
qual5(node.metadata, other.metadata) && isEqual6(node.partToken, other.partToken
) && isEqual(node.uri, other.uri) && isEqual6(node.semicolon, other.semicolon); |
| 14930 } |
| 14931 bool visitPartOfDirective(PartOfDirective node) { |
| 14932 PartOfDirective other = this._other as PartOfDirective; |
| 14933 return isEqual(node.documentationComment, other.documentationComment) && isE
qual5(node.metadata, other.metadata) && isEqual6(node.partToken, other.partToken
) && isEqual6(node.ofToken, other.ofToken) && isEqual(node.libraryName, other.li
braryName) && isEqual6(node.semicolon, other.semicolon); |
| 14934 } |
| 14935 bool visitPostfixExpression(PostfixExpression node) { |
| 14936 PostfixExpression other = this._other as PostfixExpression; |
| 14937 return isEqual(node.operand, other.operand) && isEqual6(node.operator, other
.operator); |
| 14938 } |
| 14939 bool visitPrefixedIdentifier(PrefixedIdentifier node) { |
| 14940 PrefixedIdentifier other = this._other as PrefixedIdentifier; |
| 14941 return isEqual(node.prefix, other.prefix) && isEqual6(node.period, other.per
iod) && isEqual(node.identifier, other.identifier); |
| 14942 } |
| 14943 bool visitPrefixExpression(PrefixExpression node) { |
| 14944 PrefixExpression other = this._other as PrefixExpression; |
| 14945 return isEqual6(node.operator, other.operator) && isEqual(node.operand, othe
r.operand); |
| 14946 } |
| 14947 bool visitPropertyAccess(PropertyAccess node) { |
| 14948 PropertyAccess other = this._other as PropertyAccess; |
| 14949 return isEqual(node.target, other.target) && isEqual6(node.operator, other.o
perator) && isEqual(node.propertyName, other.propertyName); |
| 14950 } |
| 14951 bool visitRedirectingConstructorInvocation(RedirectingConstructorInvocation no
de) { |
| 14952 RedirectingConstructorInvocation other = this._other as RedirectingConstruct
orInvocation; |
| 14953 return isEqual6(node.keyword, other.keyword) && isEqual6(node.period, other.
period) && isEqual(node.constructorName, other.constructorName) && isEqual(node.
argumentList, other.argumentList); |
| 14954 } |
| 14955 bool visitRethrowExpression(RethrowExpression node) { |
| 14956 RethrowExpression other = this._other as RethrowExpression; |
| 14957 return isEqual6(node.keyword, other.keyword); |
| 14958 } |
| 14959 bool visitReturnStatement(ReturnStatement node) { |
| 14960 ReturnStatement other = this._other as ReturnStatement; |
| 14961 return isEqual6(node.keyword, other.keyword) && isEqual(node.expression, oth
er.expression) && isEqual6(node.semicolon, other.semicolon); |
| 14962 } |
| 14963 bool visitScriptTag(ScriptTag node) { |
| 14964 ScriptTag other = this._other as ScriptTag; |
| 14965 return isEqual6(node.scriptTag, other.scriptTag); |
| 14966 } |
| 14967 bool visitShowCombinator(ShowCombinator node) { |
| 14968 ShowCombinator other = this._other as ShowCombinator; |
| 14969 return isEqual6(node.keyword, other.keyword) && isEqual5(node.shownNames, ot
her.shownNames); |
| 14970 } |
| 14971 bool visitSimpleFormalParameter(SimpleFormalParameter node) { |
| 14972 SimpleFormalParameter other = this._other as SimpleFormalParameter; |
| 14973 return isEqual(node.documentationComment, other.documentationComment) && isE
qual5(node.metadata, other.metadata) && isEqual6(node.keyword, other.keyword) &&
isEqual(node.type, other.type) && isEqual(node.identifier, other.identifier); |
| 14974 } |
| 14975 bool visitSimpleIdentifier(SimpleIdentifier node) { |
| 14976 SimpleIdentifier other = this._other as SimpleIdentifier; |
| 14977 return isEqual6(node.token, other.token); |
| 14978 } |
| 14979 bool visitSimpleStringLiteral(SimpleStringLiteral node) { |
| 14980 SimpleStringLiteral other = this._other as SimpleStringLiteral; |
| 14981 return isEqual6(node.literal, other.literal) && identical(node.value, other.
value); |
| 14982 } |
| 14983 bool visitStringInterpolation(StringInterpolation node) { |
| 14984 StringInterpolation other = this._other as StringInterpolation; |
| 14985 return isEqual5(node.elements, other.elements); |
| 14986 } |
| 14987 bool visitSuperConstructorInvocation(SuperConstructorInvocation node) { |
| 14988 SuperConstructorInvocation other = this._other as SuperConstructorInvocation
; |
| 14989 return isEqual6(node.keyword, other.keyword) && isEqual6(node.period, other.
period) && isEqual(node.constructorName, other.constructorName) && isEqual(node.
argumentList, other.argumentList); |
| 14990 } |
| 14991 bool visitSuperExpression(SuperExpression node) { |
| 14992 SuperExpression other = this._other as SuperExpression; |
| 14993 return isEqual6(node.keyword, other.keyword); |
| 14994 } |
| 14995 bool visitSwitchCase(SwitchCase node) { |
| 14996 SwitchCase other = this._other as SwitchCase; |
| 14997 return isEqual5(node.labels, other.labels) && isEqual6(node.keyword, other.k
eyword) && isEqual(node.expression, other.expression) && isEqual6(node.colon, ot
her.colon) && isEqual5(node.statements, other.statements); |
| 14998 } |
| 14999 bool visitSwitchDefault(SwitchDefault node) { |
| 15000 SwitchDefault other = this._other as SwitchDefault; |
| 15001 return isEqual5(node.labels, other.labels) && isEqual6(node.keyword, other.k
eyword) && isEqual6(node.colon, other.colon) && isEqual5(node.statements, other.
statements); |
| 15002 } |
| 15003 bool visitSwitchStatement(SwitchStatement node) { |
| 15004 SwitchStatement other = this._other as SwitchStatement; |
| 15005 return isEqual6(node.keyword, other.keyword) && isEqual6(node.leftParenthesi
s, other.leftParenthesis) && isEqual(node.expression, other.expression) && isEqu
al6(node.rightParenthesis, other.rightParenthesis) && isEqual6(node.leftBracket,
other.leftBracket) && isEqual5(node.members, other.members) && isEqual6(node.ri
ghtBracket, other.rightBracket); |
| 15006 } |
| 15007 bool visitSymbolLiteral(SymbolLiteral node) { |
| 15008 SymbolLiteral other = this._other as SymbolLiteral; |
| 15009 return isEqual6(node.poundSign, other.poundSign) && isEqual7(node.components
, other.components); |
| 15010 } |
| 15011 bool visitThisExpression(ThisExpression node) { |
| 15012 ThisExpression other = this._other as ThisExpression; |
| 15013 return isEqual6(node.keyword, other.keyword); |
| 15014 } |
| 15015 bool visitThrowExpression(ThrowExpression node) { |
| 15016 ThrowExpression other = this._other as ThrowExpression; |
| 15017 return isEqual6(node.keyword, other.keyword) && isEqual(node.expression, oth
er.expression); |
| 15018 } |
| 15019 bool visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) { |
| 15020 TopLevelVariableDeclaration other = this._other as TopLevelVariableDeclarati
on; |
| 15021 return isEqual(node.documentationComment, other.documentationComment) && isE
qual5(node.metadata, other.metadata) && isEqual(node.variables, other.variables)
&& isEqual6(node.semicolon, other.semicolon); |
| 15022 } |
| 15023 bool visitTryStatement(TryStatement node) { |
| 15024 TryStatement other = this._other as TryStatement; |
| 15025 return isEqual6(node.tryKeyword, other.tryKeyword) && isEqual(node.body, oth
er.body) && isEqual5(node.catchClauses, other.catchClauses) && isEqual6(node.fin
allyKeyword, other.finallyKeyword) && isEqual(node.finallyBlock, other.finallyBl
ock); |
| 15026 } |
| 15027 bool visitTypeArgumentList(TypeArgumentList node) { |
| 15028 TypeArgumentList other = this._other as TypeArgumentList; |
| 15029 return isEqual6(node.leftBracket, other.leftBracket) && isEqual5(node.argume
nts, other.arguments) && isEqual6(node.rightBracket, other.rightBracket); |
| 15030 } |
| 15031 bool visitTypeName(TypeName node) { |
| 15032 TypeName other = this._other as TypeName; |
| 15033 return isEqual(node.name, other.name) && isEqual(node.typeArguments, other.t
ypeArguments); |
| 15034 } |
| 15035 bool visitTypeParameter(TypeParameter node) { |
| 15036 TypeParameter other = this._other as TypeParameter; |
| 15037 return isEqual(node.documentationComment, other.documentationComment) && isE
qual5(node.metadata, other.metadata) && isEqual(node.name, other.name) && isEqua
l6(node.keyword, other.keyword) && isEqual(node.bound, other.bound); |
| 15038 } |
| 15039 bool visitTypeParameterList(TypeParameterList node) { |
| 15040 TypeParameterList other = this._other as TypeParameterList; |
| 15041 return isEqual6(node.leftBracket, other.leftBracket) && isEqual5(node.typePa
rameters, other.typeParameters) && isEqual6(node.rightBracket, other.rightBracke
t); |
| 15042 } |
| 15043 bool visitVariableDeclaration(VariableDeclaration node) { |
| 15044 VariableDeclaration other = this._other as VariableDeclaration; |
| 15045 return isEqual(node.documentationComment, other.documentationComment) && isE
qual5(node.metadata, other.metadata) && isEqual(node.name, other.name) && isEqua
l6(node.equals, other.equals) && isEqual(node.initializer, other.initializer); |
| 15046 } |
| 15047 bool visitVariableDeclarationList(VariableDeclarationList node) { |
| 15048 VariableDeclarationList other = this._other as VariableDeclarationList; |
| 15049 return isEqual(node.documentationComment, other.documentationComment) && isE
qual5(node.metadata, other.metadata) && isEqual6(node.keyword, other.keyword) &&
isEqual(node.type, other.type) && isEqual5(node.variables, other.variables); |
| 15050 } |
| 15051 bool visitVariableDeclarationStatement(VariableDeclarationStatement node) { |
| 15052 VariableDeclarationStatement other = this._other as VariableDeclarationState
ment; |
| 15053 return isEqual(node.variables, other.variables) && isEqual6(node.semicolon,
other.semicolon); |
| 15054 } |
| 15055 bool visitWhileStatement(WhileStatement node) { |
| 15056 WhileStatement other = this._other as WhileStatement; |
| 15057 return isEqual6(node.keyword, other.keyword) && isEqual6(node.leftParenthesi
s, other.leftParenthesis) && isEqual(node.condition, other.condition) && isEqual
6(node.rightParenthesis, other.rightParenthesis) && isEqual(node.body, other.bod
y); |
| 15058 } |
| 15059 bool visitWithClause(WithClause node) { |
| 15060 WithClause other = this._other as WithClause; |
| 15061 return isEqual6(node.withKeyword, other.withKeyword) && isEqual5(node.mixinT
ypes, other.mixinTypes); |
| 15062 } |
| 15063 |
| 15064 /** |
| 15065 * Return `true` if the given AST nodes have the same structure. |
| 15066 * |
| 15067 * @param first the first node being compared |
| 15068 * @param second the second node being compared |
| 15069 * @return `true` if the given AST nodes have the same structure |
| 15070 */ |
| 15071 bool isEqual(ASTNode first, ASTNode second) { |
| 15072 if (first == null) { |
| 15073 return second == null; |
| 15074 } else if (second == null) { |
| 15075 return false; |
| 15076 } else if (first.runtimeType != second.runtimeType) { |
| 15077 return false; |
| 15078 } |
| 15079 _other = second; |
| 15080 return first.accept(this); |
| 15081 } |
| 15082 |
| 15083 /** |
| 15084 * Return `true` if the given lists of AST nodes have the same size and corres
ponding |
| 15085 * elements are equal. |
| 15086 * |
| 15087 * @param first the first node being compared |
| 15088 * @param second the second node being compared |
| 15089 * @return `true` if the given AST nodes have the same size and corresponding
elements are |
| 15090 * equal |
| 15091 */ |
| 15092 bool isEqual5(NodeList first, NodeList second) { |
| 15093 if (first == null) { |
| 15094 return second == null; |
| 15095 } else if (second == null) { |
| 15096 return false; |
| 15097 } |
| 15098 int size = first.length; |
| 15099 if (second.length != size) { |
| 15100 return false; |
| 15101 } |
| 15102 for (int i = 0; i < size; i++) { |
| 15103 if (!isEqual(first[i], second[i])) { |
| 15104 return false; |
| 15105 } |
| 15106 } |
| 15107 return true; |
| 15108 } |
| 15109 |
| 15110 /** |
| 15111 * Return `true` if the given tokens have the same structure. |
| 15112 * |
| 15113 * @param first the first node being compared |
| 15114 * @param second the second node being compared |
| 15115 * @return `true` if the given tokens have the same structure |
| 15116 */ |
| 15117 bool isEqual6(Token first, Token second) { |
| 15118 if (first == null) { |
| 15119 return second == null; |
| 15120 } else if (second == null) { |
| 15121 return false; |
| 15122 } |
| 15123 return first.offset == second.offset && first.length == second.length && fir
st.lexeme == second.lexeme; |
| 15124 } |
| 15125 |
| 15126 /** |
| 15127 * Return `true` if the given arrays of tokens have the same length and corres
ponding |
| 15128 * elements are equal. |
| 15129 * |
| 15130 * @param first the first node being compared |
| 15131 * @param second the second node being compared |
| 15132 * @return `true` if the given arrays of tokens have the same length and corre
sponding |
| 15133 * elements are equal |
| 15134 */ |
| 15135 bool isEqual7(List<Token> first, List<Token> second) { |
| 15136 int length = first.length; |
| 15137 if (second.length != length) { |
| 15138 return false; |
| 15139 } |
| 15140 for (int i = 0; i < length; i++) { |
| 15141 if (isEqual6(first[i], second[i])) { |
| 15142 return false; |
| 15143 } |
| 15144 } |
| 15145 return true; |
| 15146 } |
| 15147 } |
| 15148 /** |
14629 * Instances of the class `IncrementalASTCloner` implement an object that will c
lone any AST | 15149 * Instances of the class `IncrementalASTCloner` implement an object that will c
lone any AST |
14630 * structure that it visits. The cloner will clone the structure, replacing the
specified ASTNode | 15150 * structure that it visits. The cloner will clone the structure, replacing the
specified ASTNode |
14631 * with a new ASTNode, mapping the old token stream to a new token stream, and p
reserving resolution | 15151 * with a new ASTNode, mapping the old token stream to a new token stream, and p
reserving resolution |
14632 * results. | 15152 * results. |
14633 */ | 15153 */ |
14634 class IncrementalASTCloner implements ASTVisitor<ASTNode> { | 15154 class IncrementalASTCloner implements ASTVisitor<ASTNode> { |
14635 | 15155 |
14636 /** | 15156 /** |
14637 * The node to be replaced during the cloning process. | 15157 * The node to be replaced during the cloning process. |
14638 */ | 15158 */ |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14677 AsExpression visitAsExpression(AsExpression node) { | 15197 AsExpression visitAsExpression(AsExpression node) { |
14678 AsExpression copy = new AsExpression.full(clone4(node.expression), map(node.
asOperator), clone4(node.type)); | 15198 AsExpression copy = new AsExpression.full(clone4(node.expression), map(node.
asOperator), clone4(node.type)); |
14679 copy.propagatedType = node.propagatedType; | 15199 copy.propagatedType = node.propagatedType; |
14680 copy.staticType = node.staticType; | 15200 copy.staticType = node.staticType; |
14681 return copy; | 15201 return copy; |
14682 } | 15202 } |
14683 ASTNode visitAssertStatement(AssertStatement node) => new AssertStatement.full
(map(node.keyword), map(node.leftParenthesis), clone4(node.condition), map(node.
rightParenthesis), map(node.semicolon)); | 15203 ASTNode visitAssertStatement(AssertStatement node) => new AssertStatement.full
(map(node.keyword), map(node.leftParenthesis), clone4(node.condition), map(node.
rightParenthesis), map(node.semicolon)); |
14684 AssignmentExpression visitAssignmentExpression(AssignmentExpression node) { | 15204 AssignmentExpression visitAssignmentExpression(AssignmentExpression node) { |
14685 AssignmentExpression copy = new AssignmentExpression.full(clone4(node.leftHa
ndSide), map(node.operator), clone4(node.rightHandSide)); | 15205 AssignmentExpression copy = new AssignmentExpression.full(clone4(node.leftHa
ndSide), map(node.operator), clone4(node.rightHandSide)); |
14686 copy.propagatedElement = node.propagatedElement; | 15206 copy.propagatedElement = node.propagatedElement; |
| 15207 copy.propagatedType = node.propagatedType; |
14687 copy.staticElement = node.staticElement; | 15208 copy.staticElement = node.staticElement; |
| 15209 copy.staticType = node.staticType; |
14688 return copy; | 15210 return copy; |
14689 } | 15211 } |
14690 BinaryExpression visitBinaryExpression(BinaryExpression node) { | 15212 BinaryExpression visitBinaryExpression(BinaryExpression node) { |
14691 BinaryExpression copy = new BinaryExpression.full(clone4(node.leftOperand),
map(node.operator), clone4(node.rightOperand)); | 15213 BinaryExpression copy = new BinaryExpression.full(clone4(node.leftOperand),
map(node.operator), clone4(node.rightOperand)); |
14692 copy.propagatedElement = node.propagatedElement; | 15214 copy.propagatedElement = node.propagatedElement; |
14693 copy.propagatedType = node.propagatedType; | 15215 copy.propagatedType = node.propagatedType; |
14694 copy.staticElement = node.staticElement; | 15216 copy.staticElement = node.staticElement; |
14695 copy.staticType = node.staticType; | 15217 copy.staticType = node.staticType; |
14696 return copy; | 15218 return copy; |
14697 } | 15219 } |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14893 copy.element = node.element; | 15415 copy.element = node.element; |
14894 return copy; | 15416 return copy; |
14895 } | 15417 } |
14896 PartOfDirective visitPartOfDirective(PartOfDirective node) { | 15418 PartOfDirective visitPartOfDirective(PartOfDirective node) { |
14897 PartOfDirective copy = new PartOfDirective.full(clone4(node.documentationCom
ment), clone5(node.metadata), map(node.partToken), map(node.ofToken), clone4(nod
e.libraryName), map(node.semicolon)); | 15419 PartOfDirective copy = new PartOfDirective.full(clone4(node.documentationCom
ment), clone5(node.metadata), map(node.partToken), map(node.ofToken), clone4(nod
e.libraryName), map(node.semicolon)); |
14898 copy.element = node.element; | 15420 copy.element = node.element; |
14899 return copy; | 15421 return copy; |
14900 } | 15422 } |
14901 PostfixExpression visitPostfixExpression(PostfixExpression node) { | 15423 PostfixExpression visitPostfixExpression(PostfixExpression node) { |
14902 PostfixExpression copy = new PostfixExpression.full(clone4(node.operand), ma
p(node.operator)); | 15424 PostfixExpression copy = new PostfixExpression.full(clone4(node.operand), ma
p(node.operator)); |
| 15425 copy.propagatedElement = node.propagatedElement; |
14903 copy.propagatedType = node.propagatedType; | 15426 copy.propagatedType = node.propagatedType; |
| 15427 copy.staticElement = node.staticElement; |
14904 copy.staticType = node.staticType; | 15428 copy.staticType = node.staticType; |
14905 return copy; | 15429 return copy; |
14906 } | 15430 } |
14907 PrefixedIdentifier visitPrefixedIdentifier(PrefixedIdentifier node) { | 15431 PrefixedIdentifier visitPrefixedIdentifier(PrefixedIdentifier node) { |
14908 PrefixedIdentifier copy = new PrefixedIdentifier.full(clone4(node.prefix), m
ap(node.period), clone4(node.identifier)); | 15432 PrefixedIdentifier copy = new PrefixedIdentifier.full(clone4(node.prefix), m
ap(node.period), clone4(node.identifier)); |
14909 copy.propagatedType = node.propagatedType; | 15433 copy.propagatedType = node.propagatedType; |
14910 copy.staticType = node.staticType; | 15434 copy.staticType = node.staticType; |
14911 return copy; | 15435 return copy; |
14912 } | 15436 } |
14913 PrefixExpression visitPrefixExpression(PrefixExpression node) { | 15437 PrefixExpression visitPrefixExpression(PrefixExpression node) { |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15304 void operator[]=(int index, E node) { | 15828 void operator[]=(int index, E node) { |
15305 if (index < 0 || index >= _elements.length) { | 15829 if (index < 0 || index >= _elements.length) { |
15306 throw new RangeError("Index: ${index}, Size: ${_elements.length}"); | 15830 throw new RangeError("Index: ${index}, Size: ${_elements.length}"); |
15307 } | 15831 } |
15308 _elements[index] as E; | 15832 _elements[index] as E; |
15309 owner.becomeParentOf(node); | 15833 owner.becomeParentOf(node); |
15310 _elements[index] = node; | 15834 _elements[index] = node; |
15311 } | 15835 } |
15312 int get length => _elements.length; | 15836 int get length => _elements.length; |
15313 } | 15837 } |
OLD | NEW |