Index: pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart |
diff --git a/pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart b/pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart |
index da3e1f5ee19b7d8a62c767d2e214a99fbae1bf40..d9f08e7fa0b380aeb4aeabcf592183f439f3c416 100644 |
--- a/pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart |
+++ b/pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart |
@@ -205,6 +205,15 @@ abstract class ErrorBulkMixin<R, A> |
A arg) { |
return bulkHandleError(node, error, arg); |
} |
+ |
+ @override |
+ R errorInvalidSetIfNull( |
+ Send node, |
+ ErroneousElement error, |
+ Node rhs, |
+ A arg) { |
+ return bulkHandleError(node, error, arg); |
+ } |
} |
/// Mixin that implements all `visitXPrefix` methods of [SemanticSendVisitor] by |
@@ -1471,1246 +1480,1618 @@ abstract class CompoundBulkMixin<R, A> |
} |
} |
-/// Mixin that implements all `visitXInvoke` methods of [SemanticSendVisitor] by |
-/// delegating to a bulk handler. |
+/// Mixin that implements all `visitXSetIfNull` methods of [SemanticSendVisitor] |
+/// by delegating to a bulk handler. |
/// |
-/// Use this mixin to provide a trivial implementation for all `visitXInvoke` |
+/// Use this mixin to provide a trivial implementation for all `xSetIfNull` |
/// methods. |
-abstract class InvokeBulkMixin<R, A> |
+abstract class SetIfNullBulkMixin<R, A> |
implements SemanticSendVisitor<R, A>, BulkHandle<R, A> { |
- R bulkHandleInvoke(Send node, A arg) { |
- return bulkHandleNode(node, "Invocation `#` unhandled.", arg); |
+ R bulkHandleSetIfNull(Send node, A arg) { |
+ return bulkHandleNode(node, "If null assignment `#` unhandled.", arg); |
} |
@override |
- R visitClassTypeLiteralInvoke( |
+ R visitClassTypeLiteralSetIfNull( |
Send node, |
ConstantExpression constant, |
- NodeList arguments, |
- CallStructure callStructure, |
- A arg) { |
- return bulkHandleInvoke(node, arg); |
- } |
- |
- @override |
- R visitDynamicPropertyInvoke( |
- Send node, |
- Node receiver, |
- NodeList arguments, |
- Selector selector, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitIfNotNullDynamicPropertyInvoke( |
+ R visitDynamicPropertySetIfNull( |
Send node, |
Node receiver, |
- NodeList arguments, |
- Selector selector, |
+ Name name, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitDynamicTypeLiteralInvoke( |
+ R visitDynamicTypeLiteralSetIfNull( |
Send node, |
ConstantExpression constant, |
- NodeList arguments, |
- CallStructure callStructure, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitExpressionInvoke( |
+ R visitFinalLocalVariableSetIfNull( |
Send node, |
- Node expression, |
- NodeList arguments, |
- CallStructure callStructure, |
+ LocalVariableElement variable, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitLocalFunctionInvoke( |
+ R visitFinalParameterSetIfNull( |
Send node, |
- LocalFunctionElement function, |
- NodeList arguments, |
- CallStructure callStructure, |
+ ParameterElement parameter, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitLocalFunctionIncompatibleInvoke( |
+ R visitFinalStaticFieldSetIfNull( |
Send node, |
- LocalFunctionElement function, |
- NodeList arguments, |
- CallStructure callStructure, |
+ FieldElement field, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitLocalVariableInvoke( |
+ R visitFinalSuperFieldSetIfNull( |
Send node, |
- LocalVariableElement variable, |
- NodeList arguments, |
- CallStructure callStructure, |
+ FieldElement field, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitParameterInvoke( |
+ R visitFinalTopLevelFieldSetIfNull( |
Send node, |
- ParameterElement parameter, |
- NodeList arguments, |
- CallStructure callStructure, |
+ FieldElement field, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitStaticFieldInvoke( |
+ R visitIfNotNullDynamicPropertySetIfNull( |
Send node, |
- FieldElement field, |
- NodeList arguments, |
- CallStructure callStructure, |
+ Node receiver, |
+ Name name, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitStaticFunctionInvoke( |
+ R visitLocalFunctionSetIfNull( |
Send node, |
- MethodElement function, |
- NodeList arguments, |
- CallStructure callStructure, |
+ LocalFunctionElement function, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitStaticFunctionIncompatibleInvoke( |
+ R visitLocalVariableSetIfNull( |
Send node, |
- MethodElement function, |
- NodeList arguments, |
- CallStructure callStructure, |
+ LocalVariableElement variable, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitStaticGetterInvoke( |
+ R visitParameterSetIfNull( |
Send node, |
- FunctionElement getter, |
- NodeList arguments, |
- CallStructure callStructure, |
+ ParameterElement parameter, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitSuperFieldInvoke( |
+ R visitStaticFieldSetIfNull( |
Send node, |
FieldElement field, |
- NodeList arguments, |
- CallStructure callStructure, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitSuperGetterInvoke( |
+ R visitStaticGetterSetterSetIfNull( |
Send node, |
FunctionElement getter, |
- NodeList arguments, |
- CallStructure callStructure, |
+ FunctionElement setter, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitSuperMethodInvoke( |
+ R visitStaticMethodSetIfNull( |
Send node, |
- MethodElement method, |
- NodeList arguments, |
- CallStructure callStructure, |
+ FunctionElement method, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitSuperMethodIncompatibleInvoke( |
+ R visitStaticMethodSetterSetIfNull( |
Send node, |
MethodElement method, |
- NodeList arguments, |
- CallStructure callStructure, |
+ MethodElement setter, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitThisInvoke( |
+ R visitSuperFieldFieldSetIfNull( |
Send node, |
- NodeList arguments, |
- CallStructure callStructure, |
+ FieldElement readField, |
+ FieldElement writtenField, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitThisPropertyInvoke( |
+ R visitSuperFieldSetIfNull( |
Send node, |
- NodeList arguments, |
- Selector selector, |
+ FieldElement field, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitTopLevelFieldInvoke( |
+ R visitSuperFieldSetterSetIfNull( |
Send node, |
FieldElement field, |
- NodeList arguments, |
- CallStructure callStructure, |
+ FunctionElement setter, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitTopLevelFunctionInvoke( |
+ R visitSuperGetterFieldSetIfNull( |
Send node, |
- MethodElement function, |
- NodeList arguments, |
- CallStructure callStructure, |
+ FunctionElement getter, |
+ FieldElement field, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitTopLevelFunctionIncompatibleInvoke( |
+ R visitSuperGetterSetterSetIfNull( |
Send node, |
- MethodElement function, |
- NodeList arguments, |
- CallStructure callStructure, |
+ FunctionElement getter, |
+ FunctionElement setter, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitTopLevelGetterInvoke( |
+ R visitSuperMethodSetIfNull( |
Send node, |
- FunctionElement getter, |
- NodeList arguments, |
- CallStructure callStructure, |
+ FunctionElement method, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitTypeVariableTypeLiteralInvoke( |
+ R visitSuperMethodSetterSetIfNull( |
Send node, |
- TypeVariableElement element, |
- NodeList arguments, |
- CallStructure callStructure, |
+ FunctionElement method, |
+ FunctionElement setter, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitTypedefTypeLiteralInvoke( |
+ R visitThisPropertySetIfNull( |
Send node, |
- ConstantExpression constant, |
- NodeList arguments, |
- CallStructure callStructure, |
+ Name name, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitConstantInvoke( |
+ R visitTopLevelFieldSetIfNull( |
Send node, |
- ConstantExpression constant, |
- NodeList arguments, |
- CallStructure callStructure, |
+ FieldElement field, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitUnresolvedInvoke( |
+ R visitTopLevelGetterSetterSetIfNull( |
Send node, |
- Element element, |
- NodeList arguments, |
- Selector selector, |
+ FunctionElement getter, |
+ FunctionElement setter, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitUnresolvedSuperInvoke( |
+ R visitTopLevelMethodSetIfNull( |
Send node, |
- Element function, |
- NodeList arguments, |
- Selector selector, |
+ FunctionElement method, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitStaticSetterInvoke( |
+ R visitTopLevelMethodSetterSetIfNull( |
Send node, |
+ FunctionElement method, |
FunctionElement setter, |
- NodeList arguments, |
- CallStructure callStructure, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitSuperSetterInvoke( |
+ R visitTypeVariableTypeLiteralSetIfNull( |
Send node, |
- FunctionElement setter, |
- NodeList arguments, |
- CallStructure callStructure, |
+ TypeVariableElement element, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitTopLevelSetterInvoke( |
+ R visitTypedefTypeLiteralSetIfNull( |
Send node, |
- FunctionElement setter, |
- NodeList arguments, |
- CallStructure callStructure, |
+ ConstantExpression constant, |
+ Node rhs, |
A arg) { |
- return bulkHandleInvoke(node, arg); |
- } |
-} |
- |
-/// Mixin that implements all `visitXGet` methods of [SemanticSendVisitor] by |
-/// delegating to a bulk handler. |
-/// |
-/// Use this mixin to provide a trivial implementation for all `visitXGet` |
-/// methods. |
-abstract class GetBulkMixin<R, A> |
- implements SemanticSendVisitor<R, A>, BulkHandle<R, A> { |
- |
- R bulkHandleGet(Node node, A arg) { |
- return bulkHandleNode(node, "Read `#` unhandled.", arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitClassTypeLiteralGet( |
+ R visitUnresolvedSetIfNull( |
Send node, |
- ConstantExpression constant, |
+ Element element, |
+ Node rhs, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitDynamicPropertyGet( |
+ R visitUnresolvedStaticGetterSetIfNull( |
Send node, |
- Node receiver, |
- Name name, |
+ Element element, |
+ MethodElement setter, |
+ Node rhs, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitIfNotNullDynamicPropertyGet( |
+ R visitUnresolvedStaticSetterSetIfNull( |
Send node, |
- Node receiver, |
- Name name, |
+ MethodElement getter, |
+ Element element, |
+ Node rhs, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitDynamicTypeLiteralGet( |
+ R visitUnresolvedSuperGetterSetIfNull( |
Send node, |
- ConstantExpression constant, |
+ Element element, |
+ MethodElement setter, |
+ Node rhs, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitLocalFunctionGet( |
+ R visitUnresolvedSuperSetIfNull( |
Send node, |
- LocalFunctionElement function, |
+ Element element, |
+ Node rhs, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitLocalVariableGet( |
+ R visitUnresolvedSuperSetterSetIfNull( |
Send node, |
- LocalVariableElement variable, |
+ MethodElement getter, |
+ Element element, |
+ Node rhs, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitParameterGet( |
+ R visitUnresolvedTopLevelGetterSetIfNull( |
Send node, |
- ParameterElement parameter, |
+ Element element, |
+ MethodElement setter, |
+ Node rhs, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
} |
@override |
- R visitStaticFieldGet( |
+ R visitUnresolvedTopLevelSetterSetIfNull( |
Send node, |
- FieldElement field, |
+ MethodElement getter, |
+ Element element, |
+ Node rhs, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleSetIfNull(node, arg); |
+ } |
+} |
+ |
+/// Mixin that implements all `visitXInvoke` methods of [SemanticSendVisitor] by |
+/// delegating to a bulk handler. |
+/// |
+/// Use this mixin to provide a trivial implementation for all `visitXInvoke` |
+/// methods. |
+abstract class InvokeBulkMixin<R, A> |
+ implements SemanticSendVisitor<R, A>, BulkHandle<R, A> { |
+ |
+ R bulkHandleInvoke(Send node, A arg) { |
+ return bulkHandleNode(node, "Invocation `#` unhandled.", arg); |
} |
@override |
- R visitStaticFunctionGet( |
+ R visitClassTypeLiteralInvoke( |
Send node, |
- MethodElement function, |
+ ConstantExpression constant, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitStaticGetterGet( |
+ R visitDynamicPropertyInvoke( |
Send node, |
- FunctionElement getter, |
+ Node receiver, |
+ NodeList arguments, |
+ Selector selector, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitSuperFieldGet( |
+ R visitIfNotNullDynamicPropertyInvoke( |
Send node, |
- FieldElement field, |
+ Node receiver, |
+ NodeList arguments, |
+ Selector selector, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitSuperGetterGet( |
+ R visitDynamicTypeLiteralInvoke( |
Send node, |
- FunctionElement getter, |
+ ConstantExpression constant, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitSuperMethodGet( |
+ R visitExpressionInvoke( |
Send node, |
- MethodElement method, |
+ Node expression, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitThisGet(Identifier node, A arg) { |
- return bulkHandleGet(node, arg); |
+ R visitLocalFunctionInvoke( |
+ Send node, |
+ LocalFunctionElement function, |
+ NodeList arguments, |
+ CallStructure callStructure, |
+ A arg) { |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitThisPropertyGet( |
+ R visitLocalFunctionIncompatibleInvoke( |
Send node, |
- Name name, |
+ LocalFunctionElement function, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitTopLevelFieldGet( |
+ R visitLocalVariableInvoke( |
Send node, |
- FieldElement field, |
+ LocalVariableElement variable, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitTopLevelFunctionGet( |
+ R visitParameterInvoke( |
Send node, |
- MethodElement function, |
+ ParameterElement parameter, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitTopLevelGetterGet( |
+ R visitStaticFieldInvoke( |
Send node, |
- FunctionElement getter, |
+ FieldElement field, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitTypeVariableTypeLiteralGet( |
+ R visitStaticFunctionInvoke( |
Send node, |
- TypeVariableElement element, |
+ MethodElement function, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitTypedefTypeLiteralGet( |
+ R visitStaticFunctionIncompatibleInvoke( |
Send node, |
- ConstantExpression constant, |
+ MethodElement function, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitConstantGet( |
+ R visitStaticGetterInvoke( |
Send node, |
- ConstantExpression constant, |
+ FunctionElement getter, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitUnresolvedGet( |
+ R visitSuperFieldInvoke( |
Send node, |
- Element element, |
+ FieldElement field, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitUnresolvedSuperGet( |
+ R visitSuperGetterInvoke( |
Send node, |
- Element element, |
+ FunctionElement getter, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitStaticSetterGet( |
+ R visitSuperMethodInvoke( |
Send node, |
- FunctionElement setter, |
+ MethodElement method, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitSuperSetterGet( |
+ R visitSuperMethodIncompatibleInvoke( |
Send node, |
- FunctionElement setter, |
+ MethodElement method, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitTopLevelSetterGet( |
+ R visitThisInvoke( |
Send node, |
- FunctionElement setter, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleGet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
-} |
- |
-/// Mixin that implements all `visitXSet` methods of [SemanticSendVisitor] by |
-/// delegating to a bulk handler. |
-/// |
-/// Use this mixin to provide a trivial implementation for all `visitXSet` |
-/// methods. |
-abstract class SetBulkMixin<R, A> |
- implements SemanticSendVisitor<R, A>, BulkHandle<R, A> { |
- R bulkHandleSet(Send node, A arg) { |
- return bulkHandleNode(node, "Assignment `#` unhandled.", arg); |
+ @override |
+ R visitThisPropertyInvoke( |
+ Send node, |
+ NodeList arguments, |
+ Selector selector, |
+ A arg) { |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitDynamicPropertySet( |
- SendSet node, |
- Node receiver, |
- Name name, |
- Node rhs, |
+ R visitTopLevelFieldInvoke( |
+ Send node, |
+ FieldElement field, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitIfNotNullDynamicPropertySet( |
- SendSet node, |
- Node receiver, |
- Name name, |
- Node rhs, |
+ R visitTopLevelFunctionInvoke( |
+ Send node, |
+ MethodElement function, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitLocalVariableSet( |
- SendSet node, |
- LocalVariableElement variable, |
- Node rhs, |
+ R visitTopLevelFunctionIncompatibleInvoke( |
+ Send node, |
+ MethodElement function, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitParameterSet( |
- SendSet node, |
- ParameterElement parameter, |
- Node rhs, |
+ R visitTopLevelGetterInvoke( |
+ Send node, |
+ FunctionElement getter, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitStaticFieldSet( |
- SendSet node, |
- FieldElement field, |
- Node rhs, |
+ R visitTypeVariableTypeLiteralInvoke( |
+ Send node, |
+ TypeVariableElement element, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitStaticSetterSet( |
- SendSet node, |
- FunctionElement setter, |
- Node rhs, |
+ R visitTypedefTypeLiteralInvoke( |
+ Send node, |
+ ConstantExpression constant, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitSuperFieldSet( |
- SendSet node, |
- FieldElement field, |
- Node rhs, |
+ R visitConstantInvoke( |
+ Send node, |
+ ConstantExpression constant, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitSuperSetterSet( |
- SendSet node, |
- FunctionElement setter, |
- Node rhs, |
+ R visitUnresolvedInvoke( |
+ Send node, |
+ Element element, |
+ NodeList arguments, |
+ Selector selector, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitThisPropertySet( |
- SendSet node, |
- Name name, |
- Node rhs, |
+ R visitUnresolvedSuperInvoke( |
+ Send node, |
+ Element function, |
+ NodeList arguments, |
+ Selector selector, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitTopLevelFieldSet( |
- SendSet node, |
- FieldElement field, |
- Node rhs, |
+ R visitStaticSetterInvoke( |
+ Send node, |
+ FunctionElement setter, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitTopLevelSetterSet( |
- SendSet node, |
+ R visitSuperSetterInvoke( |
+ Send node, |
FunctionElement setter, |
- Node rhs, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
} |
@override |
- R visitClassTypeLiteralSet( |
- SendSet node, |
- ConstantExpression constant, |
- Node rhs, |
+ R visitTopLevelSetterInvoke( |
+ Send node, |
+ FunctionElement setter, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleInvoke(node, arg); |
+ } |
+} |
+ |
+/// Mixin that implements all `visitXGet` methods of [SemanticSendVisitor] by |
+/// delegating to a bulk handler. |
+/// |
+/// Use this mixin to provide a trivial implementation for all `visitXGet` |
+/// methods. |
+abstract class GetBulkMixin<R, A> |
+ implements SemanticSendVisitor<R, A>, BulkHandle<R, A> { |
+ |
+ R bulkHandleGet(Node node, A arg) { |
+ return bulkHandleNode(node, "Read `#` unhandled.", arg); |
} |
@override |
- R visitDynamicTypeLiteralSet( |
- SendSet node, |
+ R visitClassTypeLiteralGet( |
+ Send node, |
ConstantExpression constant, |
- Node rhs, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleGet(node, arg); |
} |
@override |
- R visitFinalLocalVariableSet( |
- SendSet node, |
- LocalVariableElement variable, |
- Node rhs, |
+ R visitDynamicPropertyGet( |
+ Send node, |
+ Node receiver, |
+ Name name, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleGet(node, arg); |
} |
@override |
- R visitFinalParameterSet( |
- SendSet node, |
- ParameterElement parameter, |
- Node rhs, |
+ R visitIfNotNullDynamicPropertyGet( |
+ Send node, |
+ Node receiver, |
+ Name name, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleGet(node, arg); |
} |
@override |
- R visitFinalStaticFieldSet( |
- SendSet node, |
- FieldElement field, |
- Node rhs, |
+ R visitDynamicTypeLiteralGet( |
+ Send node, |
+ ConstantExpression constant, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleGet(node, arg); |
} |
@override |
- R visitFinalSuperFieldSet( |
- SendSet node, |
- FieldElement field, |
- Node rhs, |
+ R visitLocalFunctionGet( |
+ Send node, |
+ LocalFunctionElement function, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleGet(node, arg); |
} |
@override |
- R visitFinalTopLevelFieldSet( |
- SendSet node, |
- FieldElement field, |
- Node rhs, |
+ R visitLocalVariableGet( |
+ Send node, |
+ LocalVariableElement variable, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleGet(node, arg); |
} |
@override |
- R visitLocalFunctionSet( |
- SendSet node, |
- LocalFunctionElement function, |
- Node rhs, |
+ R visitParameterGet( |
+ Send node, |
+ ParameterElement parameter, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleGet(node, arg); |
} |
@override |
- R visitStaticFunctionSet( |
+ R visitStaticFieldGet( |
+ Send node, |
+ FieldElement field, |
+ A arg) { |
+ return bulkHandleGet(node, arg); |
+ } |
+ |
+ @override |
+ R visitStaticFunctionGet( |
Send node, |
MethodElement function, |
- Node rhs, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleGet(node, arg); |
} |
@override |
- R visitStaticGetterSet( |
- SendSet node, |
+ R visitStaticGetterGet( |
+ Send node, |
FunctionElement getter, |
- Node rhs, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleGet(node, arg); |
} |
@override |
- R visitSuperGetterSet( |
- SendSet node, |
+ R visitSuperFieldGet( |
+ Send node, |
+ FieldElement field, |
+ A arg) { |
+ return bulkHandleGet(node, arg); |
+ } |
+ |
+ @override |
+ R visitSuperGetterGet( |
+ Send node, |
FunctionElement getter, |
- Node rhs, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleGet(node, arg); |
} |
@override |
- R visitSuperMethodSet( |
+ R visitSuperMethodGet( |
Send node, |
MethodElement method, |
- Node rhs, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleGet(node, arg); |
} |
@override |
- R visitTopLevelFunctionSet( |
+ R visitThisGet(Identifier node, A arg) { |
+ return bulkHandleGet(node, arg); |
+ } |
+ |
+ @override |
+ R visitThisPropertyGet( |
+ Send node, |
+ Name name, |
+ A arg) { |
+ return bulkHandleGet(node, arg); |
+ } |
+ |
+ @override |
+ R visitTopLevelFieldGet( |
+ Send node, |
+ FieldElement field, |
+ A arg) { |
+ return bulkHandleGet(node, arg); |
+ } |
+ |
+ @override |
+ R visitTopLevelFunctionGet( |
Send node, |
MethodElement function, |
- Node rhs, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleGet(node, arg); |
} |
@override |
- R visitTopLevelGetterSet( |
- SendSet node, |
+ R visitTopLevelGetterGet( |
+ Send node, |
FunctionElement getter, |
- Node rhs, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleGet(node, arg); |
} |
@override |
- R visitTypeVariableTypeLiteralSet( |
- SendSet node, |
+ R visitTypeVariableTypeLiteralGet( |
+ Send node, |
TypeVariableElement element, |
- Node rhs, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleGet(node, arg); |
} |
@override |
- R visitTypedefTypeLiteralSet( |
- SendSet node, |
+ R visitTypedefTypeLiteralGet( |
+ Send node, |
ConstantExpression constant, |
- Node rhs, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleGet(node, arg); |
} |
@override |
- R visitUnresolvedSet( |
+ R visitConstantGet( |
Send node, |
- Element element, |
- Node rhs, |
+ ConstantExpression constant, |
A arg) { |
- return bulkHandleSet(node, arg); |
+ return bulkHandleGet(node, arg); |
} |
-} |
-/// Mixin that implements all `visitXIndexSet` methods of [SemanticSendVisitor] |
-/// by delegating to a bulk handler. |
+ @override |
+ R visitUnresolvedGet( |
+ Send node, |
+ Element element, |
+ A arg) { |
+ return bulkHandleGet(node, arg); |
+ } |
+ |
+ @override |
+ R visitUnresolvedSuperGet( |
+ Send node, |
+ Element element, |
+ A arg) { |
+ return bulkHandleGet(node, arg); |
+ } |
+ |
+ @override |
+ R visitStaticSetterGet( |
+ Send node, |
+ FunctionElement setter, |
+ A arg) { |
+ return bulkHandleGet(node, arg); |
+ } |
+ |
+ @override |
+ R visitSuperSetterGet( |
+ Send node, |
+ FunctionElement setter, |
+ A arg) { |
+ return bulkHandleGet(node, arg); |
+ } |
+ |
+ @override |
+ R visitTopLevelSetterGet( |
+ Send node, |
+ FunctionElement setter, |
+ A arg) { |
+ return bulkHandleGet(node, arg); |
+ } |
+} |
+ |
+/// Mixin that implements all `visitXSet` methods of [SemanticSendVisitor] by |
+/// delegating to a bulk handler. |
/// |
-/// Use this mixin to provide a trivial implementation for all `visitXIndexSet` |
+/// Use this mixin to provide a trivial implementation for all `visitXSet` |
/// methods. |
-abstract class IndexSetBulkMixin<R, A> |
+abstract class SetBulkMixin<R, A> |
implements SemanticSendVisitor<R, A>, BulkHandle<R, A> { |
- R bulkHandleIndexSet(Send node, A arg) { |
- return bulkHandleNode(node, "Index set expression `#` unhandled.", arg); |
+ R bulkHandleSet(Send node, A arg) { |
+ return bulkHandleNode(node, "Assignment `#` unhandled.", arg); |
} |
@override |
- R visitCompoundIndexSet( |
+ R visitDynamicPropertySet( |
SendSet node, |
Node receiver, |
- Node index, |
- AssignmentOperator operator, |
+ Name name, |
Node rhs, |
A arg) { |
- return bulkHandleIndexSet(node, arg); |
+ return bulkHandleSet(node, arg); |
} |
@override |
- R visitIndexSet( |
+ R visitIfNotNullDynamicPropertySet( |
SendSet node, |
Node receiver, |
- Node index, |
+ Name name, |
Node rhs, |
A arg) { |
- return bulkHandleIndexSet(node, arg); |
+ return bulkHandleSet(node, arg); |
} |
@override |
- R visitSuperCompoundIndexSet( |
+ R visitLocalVariableSet( |
SendSet node, |
- FunctionElement getter, |
- FunctionElement setter, |
- Node index, |
- AssignmentOperator operator, |
+ LocalVariableElement variable, |
Node rhs, |
A arg) { |
- return bulkHandleIndexSet(node, arg); |
+ return bulkHandleSet(node, arg); |
} |
@override |
- R visitUnresolvedSuperGetterCompoundIndexSet( |
+ R visitParameterSet( |
SendSet node, |
- Element element, |
- MethodElement setter, |
- Node index, |
- AssignmentOperator operator, |
+ ParameterElement parameter, |
Node rhs, |
A arg) { |
- return bulkHandleIndexSet(node, arg); |
+ return bulkHandleSet(node, arg); |
} |
@override |
- R visitUnresolvedSuperSetterCompoundIndexSet( |
+ R visitStaticFieldSet( |
SendSet node, |
- MethodElement getter, |
- Element element, |
- Node index, |
- AssignmentOperator operator, |
+ FieldElement field, |
Node rhs, |
A arg) { |
- return bulkHandleIndexSet(node, arg); |
+ return bulkHandleSet(node, arg); |
} |
@override |
- R visitUnresolvedSuperCompoundIndexSet( |
+ R visitStaticSetterSet( |
SendSet node, |
- Element element, |
- Node index, |
- AssignmentOperator operator, |
+ FunctionElement setter, |
Node rhs, |
A arg) { |
- return bulkHandleIndexSet(node, arg); |
+ return bulkHandleSet(node, arg); |
} |
@override |
- R visitSuperIndexSet( |
+ R visitSuperFieldSet( |
SendSet node, |
- FunctionElement function, |
- Node index, |
+ FieldElement field, |
Node rhs, |
A arg) { |
- return bulkHandleIndexSet(node, arg); |
+ return bulkHandleSet(node, arg); |
} |
@override |
- R visitUnresolvedSuperIndexSet( |
+ R visitSuperSetterSet( |
SendSet node, |
- Element element, |
- Node index, |
+ FunctionElement setter, |
Node rhs, |
A arg) { |
- return bulkHandleIndexSet(node, arg); |
+ return bulkHandleSet(node, arg); |
} |
-} |
-/// Mixin that implements all binary visitor methods in [SemanticSendVisitor] by |
-/// delegating to a bulk handler. |
-/// |
-/// Use this mixin to provide a trivial implementation for all binary visitor |
-/// methods. |
-abstract class BinaryBulkMixin<R, A> |
- implements SemanticSendVisitor<R, A>, BulkHandle<R, A> { |
+ @override |
+ R visitThisPropertySet( |
+ SendSet node, |
+ Name name, |
+ Node rhs, |
+ A arg) { |
+ return bulkHandleSet(node, arg); |
+ } |
- R bulkHandleBinary(Send node, A arg) { |
- return bulkHandleNode(node, "Binary expression `#` unhandled.", arg); |
+ @override |
+ R visitTopLevelFieldSet( |
+ SendSet node, |
+ FieldElement field, |
+ Node rhs, |
+ A arg) { |
+ return bulkHandleSet(node, arg); |
} |
@override |
- R visitBinary( |
- Send node, |
- Node left, |
- BinaryOperator operator, |
- Node right, |
+ R visitTopLevelSetterSet( |
+ SendSet node, |
+ FunctionElement setter, |
+ Node rhs, |
A arg) { |
- return bulkHandleBinary(node, arg); |
+ return bulkHandleSet(node, arg); |
} |
@override |
- R visitEquals( |
- Send node, |
- Node left, |
- Node right, |
+ R visitClassTypeLiteralSet( |
+ SendSet node, |
+ ConstantExpression constant, |
+ Node rhs, |
A arg) { |
- return bulkHandleBinary(node, arg); |
+ return bulkHandleSet(node, arg); |
} |
@override |
- R visitNotEquals( |
- Send node, |
- Node left, |
- Node right, |
+ R visitDynamicTypeLiteralSet( |
+ SendSet node, |
+ ConstantExpression constant, |
+ Node rhs, |
A arg) { |
- return bulkHandleBinary(node, arg); |
+ return bulkHandleSet(node, arg); |
} |
@override |
- R visitIndex( |
- Send node, |
- Node receiver, |
- Node index, |
+ R visitFinalLocalVariableSet( |
+ SendSet node, |
+ LocalVariableElement variable, |
+ Node rhs, |
A arg) { |
- return bulkHandleBinary(node, arg); |
+ return bulkHandleSet(node, arg); |
} |
@override |
- R visitSuperBinary( |
- Send node, |
- FunctionElement function, |
- BinaryOperator operator, |
- Node argument, |
+ R visitFinalParameterSet( |
+ SendSet node, |
+ ParameterElement parameter, |
+ Node rhs, |
A arg) { |
- return bulkHandleBinary(node, arg); |
+ return bulkHandleSet(node, arg); |
} |
@override |
- R visitSuperEquals( |
- Send node, |
- FunctionElement function, |
- Node argument, |
+ R visitFinalStaticFieldSet( |
+ SendSet node, |
+ FieldElement field, |
+ Node rhs, |
A arg) { |
- return bulkHandleBinary(node, arg); |
+ return bulkHandleSet(node, arg); |
} |
@override |
- R visitSuperNotEquals( |
- Send node, |
- FunctionElement function, |
- Node argument, |
+ R visitFinalSuperFieldSet( |
+ SendSet node, |
+ FieldElement field, |
+ Node rhs, |
A arg) { |
- return bulkHandleBinary(node, arg); |
+ return bulkHandleSet(node, arg); |
} |
@override |
- R visitSuperIndex( |
- Send node, |
- FunctionElement function, |
- Node index, |
+ R visitFinalTopLevelFieldSet( |
+ SendSet node, |
+ FieldElement field, |
+ Node rhs, |
A arg) { |
- return bulkHandleBinary(node, arg); |
+ return bulkHandleSet(node, arg); |
} |
@override |
- R visitUnresolvedSuperBinary( |
- Send node, |
- FunctionElement function, |
- BinaryOperator operator, |
- Node argument, |
+ R visitLocalFunctionSet( |
+ SendSet node, |
+ LocalFunctionElement function, |
+ Node rhs, |
A arg) { |
- return bulkHandleBinary(node, arg); |
+ return bulkHandleSet(node, arg); |
} |
@override |
- R visitUnresolvedSuperInvoke( |
+ R visitStaticFunctionSet( |
Send node, |
- Element function, |
- NodeList arguments, |
- Selector selector, |
+ MethodElement function, |
+ Node rhs, |
A arg) { |
- return bulkHandleBinary(node, arg); |
+ return bulkHandleSet(node, arg); |
} |
@override |
- R visitUnresolvedSuperIndex( |
- Send node, |
- FunctionElement function, |
- Node index, |
+ R visitStaticGetterSet( |
+ SendSet node, |
+ FunctionElement getter, |
+ Node rhs, |
A arg) { |
- return bulkHandleBinary(node, arg); |
+ return bulkHandleSet(node, arg); |
} |
-} |
-/// Mixin that implements all unary visitor methods in [SemanticSendVisitor] by |
-/// delegating to a bulk handler. |
-/// |
-/// Use this mixin to provide a trivial implementation for all unary visitor |
-/// methods. |
-abstract class UnaryBulkMixin<R, A> |
- implements SemanticSendVisitor<R, A>, BulkHandle<R, A> { |
- |
- R bulkHandleUnary(Send node, A arg) { |
- return bulkHandleNode(node, "Unary expression `#` unhandled.", arg); |
+ @override |
+ R visitSuperGetterSet( |
+ SendSet node, |
+ FunctionElement getter, |
+ Node rhs, |
+ A arg) { |
+ return bulkHandleSet(node, arg); |
} |
@override |
- R visitNot( |
+ R visitSuperMethodSet( |
Send node, |
- Node expression, |
+ MethodElement method, |
+ Node rhs, |
A arg) { |
- return bulkHandleUnary(node, arg); |
+ return bulkHandleSet(node, arg); |
} |
@override |
- R visitSuperUnary( |
+ R visitTopLevelFunctionSet( |
Send node, |
- UnaryOperator operator, |
- FunctionElement function, |
+ MethodElement function, |
+ Node rhs, |
A arg) { |
- return bulkHandleUnary(node, arg); |
+ return bulkHandleSet(node, arg); |
} |
@override |
- R visitUnary( |
- Send node, |
- UnaryOperator operator, |
- Node expression, |
+ R visitTopLevelGetterSet( |
+ SendSet node, |
+ FunctionElement getter, |
+ Node rhs, |
A arg) { |
- return bulkHandleUnary(node, arg); |
+ return bulkHandleSet(node, arg); |
} |
@override |
- R visitUnresolvedSuperUnary( |
+ R visitTypeVariableTypeLiteralSet( |
+ SendSet node, |
+ TypeVariableElement element, |
+ Node rhs, |
+ A arg) { |
+ return bulkHandleSet(node, arg); |
+ } |
+ |
+ @override |
+ R visitTypedefTypeLiteralSet( |
+ SendSet node, |
+ ConstantExpression constant, |
+ Node rhs, |
+ A arg) { |
+ return bulkHandleSet(node, arg); |
+ } |
+ |
+ @override |
+ R visitUnresolvedSet( |
Send node, |
- UnaryOperator operator, |
- FunctionElement function, |
+ Element element, |
+ Node rhs, |
A arg) { |
- return bulkHandleUnary(node, arg); |
+ return bulkHandleSet(node, arg); |
} |
} |
-/// Mixin that implements all purely structural visitor methods in |
-/// [SemanticSendVisitor] by delegating to a bulk handler. |
+/// Mixin that implements all `visitXIndexSet` methods of [SemanticSendVisitor] |
+/// by delegating to a bulk handler. |
/// |
-/// Use this mixin to provide a trivial implementation for all purely structural |
-/// visitor methods. |
-abstract class BaseBulkMixin<R, A> |
+/// Use this mixin to provide a trivial implementation for all `visitXIndexSet` |
+/// methods. |
+abstract class IndexSetBulkMixin<R, A> |
implements SemanticSendVisitor<R, A>, BulkHandle<R, A> { |
+ R bulkHandleIndexSet(Send node, A arg) { |
+ return bulkHandleNode(node, "Index set expression `#` unhandled.", arg); |
+ } |
+ |
@override |
- R visitAs( |
- Send node, |
- Node expression, |
- DartType type, |
+ R visitCompoundIndexSet( |
+ SendSet node, |
+ Node receiver, |
+ Node index, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
- return bulkHandleNode(node, 'As cast `#` unhandled.', arg); |
+ return bulkHandleIndexSet(node, arg); |
} |
@override |
- R visitAssert( |
- Send node, |
- Node expression, |
+ R visitIndexSet( |
+ SendSet node, |
+ Node receiver, |
+ Node index, |
+ Node rhs, |
A arg) { |
- return bulkHandleNode(node, 'Assert `#` unhandled.', arg); |
+ return bulkHandleIndexSet(node, arg); |
} |
@override |
- R visitIs( |
- Send node, |
- Node expression, |
- DartType type, |
+ R visitSuperCompoundIndexSet( |
+ SendSet node, |
+ FunctionElement getter, |
+ FunctionElement setter, |
+ Node index, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
- return bulkHandleNode(node, 'Is test `#` unhandled.', arg); |
+ return bulkHandleIndexSet(node, arg); |
} |
@override |
- R visitIsNot( |
- Send node, |
- Node expression, |
- DartType type, |
+ R visitUnresolvedSuperGetterCompoundIndexSet( |
+ SendSet node, |
+ Element element, |
+ MethodElement setter, |
+ Node index, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
- return bulkHandleNode(node, 'Is not test `#` unhandled.', arg); |
+ return bulkHandleIndexSet(node, arg); |
} |
@override |
- R visitIfNull( |
- Send node, |
- Node left, |
- Node right, |
+ R visitUnresolvedSuperSetterCompoundIndexSet( |
+ SendSet node, |
+ MethodElement getter, |
+ Element element, |
+ Node index, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
- return bulkHandleNode(node, 'If-null (Lazy ?? `#`) unhandled.', arg); |
+ return bulkHandleIndexSet(node, arg); |
} |
@override |
- R visitLogicalAnd( |
- Send node, |
- Node left, |
- Node right, |
+ R visitUnresolvedSuperCompoundIndexSet( |
+ SendSet node, |
+ Element element, |
+ Node index, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
- return bulkHandleNode(node, 'Lazy and `#` unhandled.', arg); |
+ return bulkHandleIndexSet(node, arg); |
} |
@override |
- R visitLogicalOr( |
- Send node, |
- Node left, |
- Node right, |
+ R visitSuperIndexSet( |
+ SendSet node, |
+ FunctionElement function, |
+ Node index, |
+ Node rhs, |
A arg) { |
- return bulkHandleNode(node, 'Lazy or `#` unhandled.', arg); |
+ return bulkHandleIndexSet(node, arg); |
} |
@override |
- void previsitDeferredAccess( |
- Send node, |
- PrefixElement prefix, |
+ R visitUnresolvedSuperIndexSet( |
+ SendSet node, |
+ Element element, |
+ Node index, |
+ Node rhs, |
A arg) { |
- bulkHandleNode(node, 'Deferred access `#` unhandled.', arg); |
+ return bulkHandleIndexSet(node, arg); |
} |
} |
-/// Mixin that implements all visitor methods for `super` calls in |
-/// [SemanticSendVisitor] by delegating to a bulk handler. |
+/// Mixin that implements all binary visitor methods in [SemanticSendVisitor] by |
+/// delegating to a bulk handler. |
/// |
-/// Use this mixin to provide a trivial implementation for `super` calls |
-/// visitor methods. |
-abstract class SuperBulkMixin<R, A> |
+/// Use this mixin to provide a trivial implementation for all binary visitor |
+/// methods. |
+abstract class BinaryBulkMixin<R, A> |
implements SemanticSendVisitor<R, A>, BulkHandle<R, A> { |
- R bulkHandleSuper(Send node, A arg) { |
- return bulkHandleNode(node, "Super call `#` unhandled.", arg); |
+ R bulkHandleBinary(Send node, A arg) { |
+ return bulkHandleNode(node, "Binary expression `#` unhandled.", arg); |
} |
@override |
- R visitSuperBinary( |
+ R visitBinary( |
Send node, |
- FunctionElement function, |
+ Node left, |
BinaryOperator operator, |
- Node argument, |
+ Node right, |
A arg) { |
- return bulkHandleSuper(node, arg); |
+ return bulkHandleBinary(node, arg); |
} |
@override |
- R visitSuperCompoundIndexSet( |
- SendSet node, |
- FunctionElement getter, |
- FunctionElement setter, |
- Node index, |
- AssignmentOperator operator, |
- Node rhs, |
+ R visitEquals( |
+ Send node, |
+ Node left, |
+ Node right, |
A arg) { |
- return bulkHandleSuper(node, arg); |
+ return bulkHandleBinary(node, arg); |
} |
@override |
- R visitSuperEquals( |
+ R visitNotEquals( |
Send node, |
- FunctionElement function, |
- Node argument, |
+ Node left, |
+ Node right, |
A arg) { |
- return bulkHandleSuper(node, arg); |
+ return bulkHandleBinary(node, arg); |
} |
@override |
- R visitSuperFieldCompound( |
+ R visitIndex( |
Send node, |
- FieldElement field, |
- AssignmentOperator operator, |
- Node rhs, |
+ Node receiver, |
+ Node index, |
A arg) { |
- return bulkHandleSuper(node, arg); |
+ return bulkHandleBinary(node, arg); |
} |
@override |
- R visitSuperFieldFieldPostfix( |
+ R visitSuperBinary( |
Send node, |
- FieldElement readField, |
- FieldElement writtenField, |
- IncDecOperator operator, |
+ FunctionElement function, |
+ BinaryOperator operator, |
+ Node argument, |
A arg) { |
- return bulkHandleSuper(node, arg); |
+ return bulkHandleBinary(node, arg); |
} |
@override |
- R visitSuperFieldFieldPrefix( |
+ R visitSuperEquals( |
Send node, |
- FieldElement readField, |
- FieldElement writtenField, |
- IncDecOperator operator, |
+ FunctionElement function, |
+ Node argument, |
A arg) { |
- return bulkHandleSuper(node, arg); |
+ return bulkHandleBinary(node, arg); |
} |
@override |
- R visitSuperFieldGet( |
+ R visitSuperNotEquals( |
Send node, |
- FieldElement field, |
+ FunctionElement function, |
+ Node argument, |
A arg) { |
- return bulkHandleSuper(node, arg); |
+ return bulkHandleBinary(node, arg); |
} |
@override |
- R visitSuperFieldInvoke( |
+ R visitSuperIndex( |
Send node, |
- FieldElement field, |
- NodeList arguments, |
- CallStructure callStructure, |
- A arg) { |
+ FunctionElement function, |
+ Node index, |
+ A arg) { |
+ return bulkHandleBinary(node, arg); |
+ } |
+ |
+ @override |
+ R visitUnresolvedSuperBinary( |
+ Send node, |
+ FunctionElement function, |
+ BinaryOperator operator, |
+ Node argument, |
+ A arg) { |
+ return bulkHandleBinary(node, arg); |
+ } |
+ |
+ @override |
+ R visitUnresolvedSuperInvoke( |
+ Send node, |
+ Element function, |
+ NodeList arguments, |
+ Selector selector, |
+ A arg) { |
+ return bulkHandleBinary(node, arg); |
+ } |
+ |
+ @override |
+ R visitUnresolvedSuperIndex( |
+ Send node, |
+ FunctionElement function, |
+ Node index, |
+ A arg) { |
+ return bulkHandleBinary(node, arg); |
+ } |
+} |
+ |
+/// Mixin that implements all unary visitor methods in [SemanticSendVisitor] by |
+/// delegating to a bulk handler. |
+/// |
+/// Use this mixin to provide a trivial implementation for all unary visitor |
+/// methods. |
+abstract class UnaryBulkMixin<R, A> |
+ implements SemanticSendVisitor<R, A>, BulkHandle<R, A> { |
+ |
+ R bulkHandleUnary(Send node, A arg) { |
+ return bulkHandleNode(node, "Unary expression `#` unhandled.", arg); |
+ } |
+ |
+ @override |
+ R visitNot( |
+ Send node, |
+ Node expression, |
+ A arg) { |
+ return bulkHandleUnary(node, arg); |
+ } |
+ |
+ @override |
+ R visitSuperUnary( |
+ Send node, |
+ UnaryOperator operator, |
+ FunctionElement function, |
+ A arg) { |
+ return bulkHandleUnary(node, arg); |
+ } |
+ |
+ @override |
+ R visitUnary( |
+ Send node, |
+ UnaryOperator operator, |
+ Node expression, |
+ A arg) { |
+ return bulkHandleUnary(node, arg); |
+ } |
+ |
+ @override |
+ R visitUnresolvedSuperUnary( |
+ Send node, |
+ UnaryOperator operator, |
+ FunctionElement function, |
+ A arg) { |
+ return bulkHandleUnary(node, arg); |
+ } |
+} |
+ |
+/// Mixin that implements all purely structural visitor methods in |
+/// [SemanticSendVisitor] by delegating to a bulk handler. |
+/// |
+/// Use this mixin to provide a trivial implementation for all purely structural |
+/// visitor methods. |
+abstract class BaseBulkMixin<R, A> |
+ implements SemanticSendVisitor<R, A>, BulkHandle<R, A> { |
+ |
+ @override |
+ R visitAs( |
+ Send node, |
+ Node expression, |
+ DartType type, |
+ A arg) { |
+ return bulkHandleNode(node, 'As cast `#` unhandled.', arg); |
+ } |
+ |
+ @override |
+ R visitAssert( |
+ Send node, |
+ Node expression, |
+ A arg) { |
+ return bulkHandleNode(node, 'Assert `#` unhandled.', arg); |
+ } |
+ |
+ @override |
+ R visitIs( |
+ Send node, |
+ Node expression, |
+ DartType type, |
+ A arg) { |
+ return bulkHandleNode(node, 'Is test `#` unhandled.', arg); |
+ } |
+ |
+ @override |
+ R visitIsNot( |
+ Send node, |
+ Node expression, |
+ DartType type, |
+ A arg) { |
+ return bulkHandleNode(node, 'Is not test `#` unhandled.', arg); |
+ } |
+ |
+ @override |
+ R visitIfNull( |
+ Send node, |
+ Node left, |
+ Node right, |
+ A arg) { |
+ return bulkHandleNode(node, 'If-null (Lazy ?? `#`) unhandled.', arg); |
+ } |
+ |
+ @override |
+ R visitLogicalAnd( |
+ Send node, |
+ Node left, |
+ Node right, |
+ A arg) { |
+ return bulkHandleNode(node, 'Lazy and `#` unhandled.', arg); |
+ } |
+ |
+ @override |
+ R visitLogicalOr( |
+ Send node, |
+ Node left, |
+ Node right, |
+ A arg) { |
+ return bulkHandleNode(node, 'Lazy or `#` unhandled.', arg); |
+ } |
+ |
+ @override |
+ void previsitDeferredAccess( |
+ Send node, |
+ PrefixElement prefix, |
+ A arg) { |
+ bulkHandleNode(node, 'Deferred access `#` unhandled.', arg); |
+ } |
+} |
+ |
+/// Mixin that implements all visitor methods for `super` calls in |
+/// [SemanticSendVisitor] by delegating to a bulk handler. |
+/// |
+/// Use this mixin to provide a trivial implementation for `super` calls |
+/// visitor methods. |
+abstract class SuperBulkMixin<R, A> |
+ implements SemanticSendVisitor<R, A>, BulkHandle<R, A> { |
+ |
+ R bulkHandleSuper(Send node, A arg) { |
+ return bulkHandleNode(node, "Super call `#` unhandled.", arg); |
+ } |
+ |
+ @override |
+ R visitSuperBinary( |
+ Send node, |
+ FunctionElement function, |
+ BinaryOperator operator, |
+ Node argument, |
+ A arg) { |
+ return bulkHandleSuper(node, arg); |
+ } |
+ |
+ @override |
+ R visitSuperCompoundIndexSet( |
+ SendSet node, |
+ FunctionElement getter, |
+ FunctionElement setter, |
+ Node index, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return bulkHandleSuper(node, arg); |
+ } |
+ |
+ @override |
+ R visitSuperEquals( |
+ Send node, |
+ FunctionElement function, |
+ Node argument, |
+ A arg) { |
+ return bulkHandleSuper(node, arg); |
+ } |
+ |
+ @override |
+ R visitSuperFieldCompound( |
+ Send node, |
+ FieldElement field, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return bulkHandleSuper(node, arg); |
+ } |
+ |
+ @override |
+ R visitSuperFieldFieldPostfix( |
+ Send node, |
+ FieldElement readField, |
+ FieldElement writtenField, |
+ IncDecOperator operator, |
+ A arg) { |
+ return bulkHandleSuper(node, arg); |
+ } |
+ |
+ @override |
+ R visitSuperFieldFieldPrefix( |
+ Send node, |
+ FieldElement readField, |
+ FieldElement writtenField, |
+ IncDecOperator operator, |
+ A arg) { |
+ return bulkHandleSuper(node, arg); |
+ } |
+ |
+ @override |
+ R visitSuperFieldGet( |
+ Send node, |
+ FieldElement field, |
+ A arg) { |
+ return bulkHandleSuper(node, arg); |
+ } |
+ |
+ @override |
+ R visitSuperFieldInvoke( |
+ Send node, |
+ FieldElement field, |
+ NodeList arguments, |
+ CallStructure callStructure, |
+ A arg) { |
return bulkHandleSuper(node, arg); |
} |
@@ -3149,6 +3530,7 @@ class BulkSendVisitor<R, A> extends SemanticSendVisitor<R, A> |
InvokeBulkMixin<R, A>, |
IndexSetBulkMixin<R, A>, |
CompoundBulkMixin<R, A>, |
+ SetIfNullBulkMixin<R, A>, |
UnaryBulkMixin<R, A>, |
BaseBulkMixin<R, A>, |
BinaryBulkMixin<R, A>, |
@@ -5858,165 +6240,154 @@ class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> { |
} |
@override |
- R visitConstConstructorInvoke( |
- NewExpression node, |
- ConstructedConstantExpression constant, |
- A arg) { |
- return null; |
+ R errorInvalidSetIfNull( |
+ Send node, |
+ ErroneousElement error, |
+ Node rhs, |
+ A arg) { |
+ apply(rhs, arg); |
+ return null; |
} |
@override |
- R visitBoolFromEnvironmentConstructorInvoke( |
- NewExpression node, |
- BoolFromEnvironmentConstantExpression constant, |
+ R visitClassTypeLiteralSetIfNull( |
+ Send node, |
+ ConstantExpression constant, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitIntFromEnvironmentConstructorInvoke( |
- NewExpression node, |
- IntFromEnvironmentConstantExpression constant, |
+ R visitDynamicPropertySetIfNull( |
+ Send node, |
+ Node receiver, |
+ Name name, |
+ Node rhs, |
A arg) { |
+ apply(receiver, arg); |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitStringFromEnvironmentConstructorInvoke( |
- NewExpression node, |
- StringFromEnvironmentConstantExpression constant, |
+ R visitDynamicTypeLiteralSetIfNull( |
+ Send node, |
+ ConstantExpression constant, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitConstructorIncompatibleInvoke( |
- NewExpression node, |
- ConstructorElement constructor, |
- InterfaceType type, |
- NodeList arguments, |
- CallStructure callStructure, |
+ R visitFinalLocalVariableSetIfNull( |
+ Send node, |
+ LocalVariableElement variable, |
+ Node rhs, |
A arg) { |
- apply(arguments, arg); |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitUnresolvedClassConstructorInvoke( |
- NewExpression node, |
- Element constructor, |
- DartType type, |
- NodeList arguments, |
- Selector selector, |
+ R visitFinalParameterSetIfNull( |
+ Send node, |
+ ParameterElement parameter, |
+ Node rhs, |
A arg) { |
- apply(arguments, arg); |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitUnresolvedConstructorInvoke( |
- NewExpression node, |
- Element constructor, |
- DartType type, |
- NodeList arguments, |
- Selector selector, |
+ R visitFinalStaticFieldSetIfNull( |
+ Send node, |
+ FieldElement field, |
+ Node rhs, |
A arg) { |
- apply(arguments, arg); |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitFactoryConstructorInvoke( |
- NewExpression node, |
- ConstructorElement constructor, |
- InterfaceType type, |
- NodeList arguments, |
- CallStructure callStructure, |
+ R visitFinalSuperFieldSetIfNull( |
+ Send node, |
+ FieldElement field, |
+ Node rhs, |
A arg) { |
- apply(arguments, arg); |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitGenerativeConstructorInvoke( |
- NewExpression node, |
- ConstructorElement constructor, |
- InterfaceType type, |
- NodeList arguments, |
- CallStructure callStructure, |
+ R visitFinalTopLevelFieldSetIfNull( |
+ Send node, |
+ FieldElement field, |
+ Node rhs, |
A arg) { |
- apply(arguments, arg); |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitRedirectingFactoryConstructorInvoke( |
- NewExpression node, |
- ConstructorElement constructor, |
- InterfaceType type, |
- ConstructorElement effectiveTarget, |
- InterfaceType effectiveTargetType, |
- NodeList arguments, |
- CallStructure callStructure, |
+ R visitIfNotNullDynamicPropertySetIfNull( |
+ Send node, |
+ Node receiver, |
+ Name name, |
+ Node rhs, |
A arg) { |
- apply(arguments, arg); |
+ apply(receiver, arg); |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitRedirectingGenerativeConstructorInvoke( |
- NewExpression node, |
- ConstructorElement constructor, |
- InterfaceType type, |
- NodeList arguments, |
- CallStructure callStructure, |
+ R visitLocalFunctionSetIfNull( |
+ Send node, |
+ LocalFunctionElement function, |
+ Node rhs, |
A arg) { |
- apply(arguments, arg); |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitAbstractClassConstructorInvoke( |
- NewExpression node, |
- ConstructorElement element, |
- InterfaceType type, |
- NodeList arguments, |
- CallStructure callStructure, |
+ R visitLocalVariableSetIfNull( |
+ Send node, |
+ LocalVariableElement variable, |
+ Node rhs, |
A arg) { |
- apply(arguments, arg); |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitUnresolvedRedirectingFactoryConstructorInvoke( |
- NewExpression node, |
- ConstructorElement constructor, |
- InterfaceType type, |
- NodeList arguments, |
- CallStructure callStructure, |
+ R visitParameterSetIfNull( |
+ Send node, |
+ ParameterElement parameter, |
+ Node rhs, |
A arg) { |
- apply(arguments, arg); |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R errorNonConstantConstructorInvoke( |
- NewExpression node, |
- Element element, |
- DartType type, |
- NodeList arguments, |
- CallStructure callStructure, |
+ R visitStaticFieldSetIfNull( |
+ Send node, |
+ FieldElement field, |
+ Node rhs, |
A arg) { |
- apply(arguments, arg); |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitUnresolvedStaticGetterCompound( |
+ R visitStaticGetterSetterSetIfNull( |
Send node, |
- Element element, |
- MethodElement setter, |
- AssignmentOperator operator, |
+ FunctionElement getter, |
+ FunctionElement setter, |
Node rhs, |
A arg) { |
apply(rhs, arg); |
@@ -6024,11 +6395,9 @@ class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> { |
} |
@override |
- R visitUnresolvedTopLevelGetterCompound( |
+ R visitStaticMethodSetIfNull( |
Send node, |
- Element element, |
- MethodElement setter, |
- AssignmentOperator operator, |
+ FunctionElement method, |
Node rhs, |
A arg) { |
apply(rhs, arg); |
@@ -6036,11 +6405,10 @@ class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> { |
} |
@override |
- R visitUnresolvedStaticSetterCompound( |
+ R visitStaticMethodSetterSetIfNull( |
Send node, |
- MethodElement getter, |
- Element element, |
- AssignmentOperator operator, |
+ MethodElement method, |
+ MethodElement setter, |
Node rhs, |
A arg) { |
apply(rhs, arg); |
@@ -6048,11 +6416,10 @@ class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> { |
} |
@override |
- R visitUnresolvedTopLevelSetterCompound( |
+ R visitSuperFieldFieldSetIfNull( |
Send node, |
- MethodElement getter, |
- Element element, |
- AssignmentOperator operator, |
+ FieldElement readField, |
+ FieldElement writtenField, |
Node rhs, |
A arg) { |
apply(rhs, arg); |
@@ -6060,10 +6427,9 @@ class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> { |
} |
@override |
- R visitStaticMethodCompound( |
+ R visitSuperFieldSetIfNull( |
Send node, |
- MethodElement method, |
- AssignmentOperator operator, |
+ FieldElement field, |
Node rhs, |
A arg) { |
apply(rhs, arg); |
@@ -6071,180 +6437,200 @@ class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> { |
} |
@override |
- R visitUnresolvedStaticGetterPrefix( |
+ R visitSuperFieldSetterSetIfNull( |
Send node, |
- Element element, |
- MethodElement setter, |
- IncDecOperator operator, |
+ FieldElement field, |
+ FunctionElement setter, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitUnresolvedTopLevelGetterPrefix( |
+ R visitSuperGetterFieldSetIfNull( |
Send node, |
- Element element, |
- MethodElement setter, |
- IncDecOperator operator, |
+ FunctionElement getter, |
+ FieldElement field, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitUnresolvedStaticSetterPrefix( |
+ R visitSuperGetterSetterSetIfNull( |
Send node, |
- MethodElement getter, |
- Element element, |
- IncDecOperator operator, |
+ FunctionElement getter, |
+ FunctionElement setter, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitUnresolvedTopLevelSetterPrefix( |
+ R visitSuperMethodSetIfNull( |
Send node, |
- MethodElement getter, |
- Element element, |
- IncDecOperator operator, |
+ FunctionElement method, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitStaticMethodPrefix( |
+ R visitSuperMethodSetterSetIfNull( |
Send node, |
- MethodElement method, |
- IncDecOperator operator, |
+ FunctionElement method, |
+ FunctionElement setter, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitTopLevelMethodPrefix( |
+ R visitThisPropertySetIfNull( |
Send node, |
- MethodElement method, |
- IncDecOperator operator, |
+ Name name, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitUnresolvedStaticGetterPostfix( |
+ R visitTopLevelFieldSetIfNull( |
Send node, |
- Element element, |
- MethodElement setter, |
- IncDecOperator operator, |
+ FieldElement field, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitUnresolvedTopLevelGetterPostfix( |
+ R visitTopLevelGetterSetterSetIfNull( |
Send node, |
- Element element, |
- MethodElement setter, |
- IncDecOperator operator, |
+ FunctionElement getter, |
+ FunctionElement setter, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitUnresolvedStaticSetterPostfix( |
+ R visitTopLevelMethodSetIfNull( |
Send node, |
- MethodElement getter, |
- Element element, |
- IncDecOperator operator, |
+ FunctionElement method, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitUnresolvedTopLevelSetterPostfix( |
+ R visitTopLevelMethodSetterSetIfNull( |
Send node, |
- MethodElement getter, |
- Element element, |
- IncDecOperator operator, |
+ FunctionElement method, |
+ FunctionElement setter, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitStaticMethodPostfix( |
+ R visitTypeVariableTypeLiteralSetIfNull( |
Send node, |
- MethodElement method, |
- IncDecOperator operator, |
+ TypeVariableElement element, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitTopLevelMethodPostfix( |
+ R visitTypedefTypeLiteralSetIfNull( |
Send node, |
- MethodElement method, |
- IncDecOperator operator, |
+ ConstantExpression constant, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitFinalLocalVariablePostfix( |
+ R visitUnresolvedSetIfNull( |
Send node, |
- LocalVariableElement variable, |
- IncDecOperator operator, |
+ Element element, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitFinalLocalVariablePrefix( |
+ R visitUnresolvedStaticGetterSetIfNull( |
Send node, |
- LocalVariableElement variable, |
- IncDecOperator operator, |
+ Element element, |
+ MethodElement setter, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitFinalParameterPostfix( |
+ R visitUnresolvedStaticSetterSetIfNull( |
Send node, |
- ParameterElement parameter, |
- IncDecOperator operator, |
+ MethodElement getter, |
+ Element element, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitFinalParameterPrefix( |
+ R visitUnresolvedSuperGetterSetIfNull( |
Send node, |
- ParameterElement parameter, |
- IncDecOperator operator, |
+ Element element, |
+ MethodElement setter, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitFinalStaticFieldPostfix( |
+ R visitUnresolvedSuperSetIfNull( |
Send node, |
- FieldElement field, |
- IncDecOperator operator, |
+ Element element, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitFinalStaticFieldPrefix( |
+ R visitUnresolvedSuperSetterSetIfNull( |
Send node, |
- FieldElement field, |
- IncDecOperator operator, |
+ MethodElement getter, |
+ Element element, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitSuperFieldFieldCompound( |
- Send node, FieldElement readField, |
- FieldElement writtenField, |
- AssignmentOperator operator, |
+ R visitUnresolvedTopLevelGetterSetIfNull( |
+ Send node, |
+ Element element, |
+ MethodElement setter, |
Node rhs, |
A arg) { |
apply(rhs, arg); |
@@ -6252,10 +6638,10 @@ class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> { |
} |
@override |
- R visitFinalSuperFieldCompound( |
+ R visitUnresolvedTopLevelSetterSetIfNull( |
Send node, |
- FieldElement field, |
- AssignmentOperator operator, |
+ MethodElement getter, |
+ Element element, |
Node rhs, |
A arg) { |
apply(rhs, arg); |
@@ -6263,74 +6649,164 @@ class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> { |
} |
@override |
- R visitFinalSuperFieldPostfix( |
- Send node, |
- FieldElement field, |
- IncDecOperator operator, |
+ R visitConstConstructorInvoke( |
+ NewExpression node, |
+ ConstructedConstantExpression constant, |
A arg) { |
return null; |
} |
@override |
- R visitFinalSuperFieldPrefix( |
- Send node, |
- FieldElement field, |
- IncDecOperator operator, |
+ R visitBoolFromEnvironmentConstructorInvoke( |
+ NewExpression node, |
+ BoolFromEnvironmentConstantExpression constant, |
A arg) { |
return null; |
} |
@override |
- R visitSuperMethodCompound( |
- Send node, |
- FunctionElement method, |
- AssignmentOperator operator, |
- Node rhs, |
+ R visitIntFromEnvironmentConstructorInvoke( |
+ NewExpression node, |
+ IntFromEnvironmentConstantExpression constant, |
A arg) { |
- apply(rhs, arg); |
return null; |
} |
@override |
- R visitSuperMethodPostfix( |
- Send node, |
- FunctionElement method, |
- IncDecOperator operator, |
+ R visitStringFromEnvironmentConstructorInvoke( |
+ NewExpression node, |
+ StringFromEnvironmentConstantExpression constant, |
A arg) { |
return null; |
} |
@override |
- R visitSuperMethodPrefix( |
- Send node, |
- FunctionElement method, |
- IncDecOperator operator, |
+ R visitConstructorIncompatibleInvoke( |
+ NewExpression node, |
+ ConstructorElement constructor, |
+ InterfaceType type, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
+ apply(arguments, arg); |
return null; |
} |
@override |
- R visitFinalTopLevelFieldPostfix( |
- Send node, |
- FieldElement field, |
- IncDecOperator operator, |
+ R visitUnresolvedClassConstructorInvoke( |
+ NewExpression node, |
+ Element constructor, |
+ DartType type, |
+ NodeList arguments, |
+ Selector selector, |
A arg) { |
+ apply(arguments, arg); |
return null; |
} |
@override |
- R visitFinalTopLevelFieldPrefix( |
- Send node, |
- FieldElement field, |
- IncDecOperator operator, |
+ R visitUnresolvedConstructorInvoke( |
+ NewExpression node, |
+ Element constructor, |
+ DartType type, |
+ NodeList arguments, |
+ Selector selector, |
A arg) { |
+ apply(arguments, arg); |
return null; |
} |
@override |
- R visitTopLevelMethodCompound( |
+ R visitFactoryConstructorInvoke( |
+ NewExpression node, |
+ ConstructorElement constructor, |
+ InterfaceType type, |
+ NodeList arguments, |
+ CallStructure callStructure, |
+ A arg) { |
+ apply(arguments, arg); |
+ return null; |
+ } |
+ |
+ @override |
+ R visitGenerativeConstructorInvoke( |
+ NewExpression node, |
+ ConstructorElement constructor, |
+ InterfaceType type, |
+ NodeList arguments, |
+ CallStructure callStructure, |
+ A arg) { |
+ apply(arguments, arg); |
+ return null; |
+ } |
+ |
+ @override |
+ R visitRedirectingFactoryConstructorInvoke( |
+ NewExpression node, |
+ ConstructorElement constructor, |
+ InterfaceType type, |
+ ConstructorElement effectiveTarget, |
+ InterfaceType effectiveTargetType, |
+ NodeList arguments, |
+ CallStructure callStructure, |
+ A arg) { |
+ apply(arguments, arg); |
+ return null; |
+ } |
+ |
+ @override |
+ R visitRedirectingGenerativeConstructorInvoke( |
+ NewExpression node, |
+ ConstructorElement constructor, |
+ InterfaceType type, |
+ NodeList arguments, |
+ CallStructure callStructure, |
+ A arg) { |
+ apply(arguments, arg); |
+ return null; |
+ } |
+ |
+ @override |
+ R visitAbstractClassConstructorInvoke( |
+ NewExpression node, |
+ ConstructorElement element, |
+ InterfaceType type, |
+ NodeList arguments, |
+ CallStructure callStructure, |
+ A arg) { |
+ apply(arguments, arg); |
+ return null; |
+ } |
+ |
+ @override |
+ R visitUnresolvedRedirectingFactoryConstructorInvoke( |
+ NewExpression node, |
+ ConstructorElement constructor, |
+ InterfaceType type, |
+ NodeList arguments, |
+ CallStructure callStructure, |
+ A arg) { |
+ apply(arguments, arg); |
+ return null; |
+ } |
+ |
+ @override |
+ R errorNonConstantConstructorInvoke( |
+ NewExpression node, |
+ Element element, |
+ DartType type, |
+ NodeList arguments, |
+ CallStructure callStructure, |
+ A arg) { |
+ apply(arguments, arg); |
+ return null; |
+ } |
+ |
+ @override |
+ R visitUnresolvedStaticGetterCompound( |
Send node, |
- FunctionElement method, |
+ Element element, |
+ MethodElement setter, |
AssignmentOperator operator, |
Node rhs, |
A arg) { |
@@ -6339,9 +6815,10 @@ class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> { |
} |
@override |
- R visitUnresolvedSuperCompound( |
+ R visitUnresolvedTopLevelGetterCompound( |
Send node, |
Element element, |
+ MethodElement setter, |
AssignmentOperator operator, |
Node rhs, |
A arg) { |
@@ -6350,27 +6827,33 @@ class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> { |
} |
@override |
- R visitUnresolvedSuperPostfix( |
+ R visitUnresolvedStaticSetterCompound( |
Send node, |
+ MethodElement getter, |
Element element, |
- IncDecOperator operator, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitUnresolvedSuperPrefix( |
+ R visitUnresolvedTopLevelSetterCompound( |
Send node, |
+ MethodElement getter, |
Element element, |
- IncDecOperator operator, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitUnresolvedSuperGetterCompound( |
- Send node, Element element, |
- MethodElement setter, |
+ R visitStaticMethodCompound( |
+ Send node, |
+ MethodElement method, |
AssignmentOperator operator, |
Node rhs, |
A arg) { |
@@ -6379,7 +6862,7 @@ class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> { |
} |
@override |
- R visitUnresolvedSuperGetterPostfix( |
+ R visitUnresolvedStaticGetterPrefix( |
Send node, |
Element element, |
MethodElement setter, |
@@ -6389,7 +6872,7 @@ class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> { |
} |
@override |
- R visitUnresolvedSuperGetterPrefix( |
+ R visitUnresolvedTopLevelGetterPrefix( |
Send node, |
Element element, |
MethodElement setter, |
@@ -6399,18 +6882,17 @@ class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> { |
} |
@override |
- R visitUnresolvedSuperSetterCompound( |
- Send node, MethodElement getter, |
+ R visitUnresolvedStaticSetterPrefix( |
+ Send node, |
+ MethodElement getter, |
Element element, |
- AssignmentOperator operator, |
- Node rhs, |
+ IncDecOperator operator, |
A arg) { |
- apply(rhs, arg); |
return null; |
} |
@override |
- R visitUnresolvedSuperSetterPostfix( |
+ R visitUnresolvedTopLevelSetterPrefix( |
Send node, |
MethodElement getter, |
Element element, |
@@ -6420,386 +6902,349 @@ class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> { |
} |
@override |
- R visitUnresolvedSuperSetterPrefix( |
+ R visitStaticMethodPrefix( |
Send node, |
- MethodElement getter, |
- Element element, |
+ MethodElement method, |
IncDecOperator operator, |
A arg) { |
return null; |
} |
-} |
-/// [SemanticDeclarationVisitor] that visits subnodes. |
-class TraversalDeclarationMixin<R, A> |
- implements SemanticDeclarationVisitor<R, A> { |
@override |
- R apply(Node node, A arg) { |
- throw new UnimplementedError("TraversalMixin.apply unimplemented"); |
- } |
- |
- @override |
- applyInitializers(FunctionExpression constructor, A arg) { |
- throw new UnimplementedError( |
- "TraversalMixin.applyInitializers unimplemented"); |
- } |
- |
- @override |
- applyParameters(NodeList parameters, A arg) { |
- throw new UnimplementedError( |
- "TraversalMixin.applyParameters unimplemented"); |
- } |
- |
- @override |
- R visitAbstractMethodDeclaration( |
- FunctionExpression node, |
+ R visitTopLevelMethodPrefix( |
+ Send node, |
MethodElement method, |
- NodeList parameters, |
+ IncDecOperator operator, |
A arg) { |
- applyParameters(parameters, arg); |
return null; |
} |
@override |
- R visitClosureDeclaration( |
- FunctionExpression node, |
- LocalFunctionElement function, |
- NodeList parameters, |
- Node body, |
+ R visitUnresolvedStaticGetterPostfix( |
+ Send node, |
+ Element element, |
+ MethodElement setter, |
+ IncDecOperator operator, |
A arg) { |
- applyParameters(parameters, arg); |
- apply(body, arg); |
return null; |
} |
@override |
- R visitFactoryConstructorDeclaration( |
- FunctionExpression node, |
- ConstructorElement constructor, |
- NodeList parameters, |
- Node body, |
+ R visitUnresolvedTopLevelGetterPostfix( |
+ Send node, |
+ Element element, |
+ MethodElement setter, |
+ IncDecOperator operator, |
A arg) { |
- applyParameters(parameters, arg); |
- apply(body, arg); |
return null; |
} |
@override |
- R visitFieldInitializer( |
- SendSet node, |
- FieldElement field, |
- Node initializer, |
+ R visitUnresolvedStaticSetterPostfix( |
+ Send node, |
+ MethodElement getter, |
+ Element element, |
+ IncDecOperator operator, |
A arg) { |
- apply(initializer, arg); |
return null; |
} |
@override |
- R visitGenerativeConstructorDeclaration( |
- FunctionExpression node, |
- ConstructorElement constructor, |
- NodeList parameters, |
- NodeList initializers, |
- Node body, |
+ R visitUnresolvedTopLevelSetterPostfix( |
+ Send node, |
+ MethodElement getter, |
+ Element element, |
+ IncDecOperator operator, |
A arg) { |
- applyParameters(parameters, arg); |
- applyInitializers(node, arg); |
- apply(body, arg); |
return null; |
} |
@override |
- R visitInstanceMethodDeclaration( |
- FunctionExpression node, |
+ R visitStaticMethodPostfix( |
+ Send node, |
MethodElement method, |
- NodeList parameters, |
- Node body, |
+ IncDecOperator operator, |
A arg) { |
- applyParameters(parameters, arg); |
- apply(body, arg); |
return null; |
} |
@override |
- R visitLocalFunctionDeclaration( |
- FunctionExpression node, |
- LocalFunctionElement function, |
- NodeList parameters, |
- Node body, |
+ R visitTopLevelMethodPostfix( |
+ Send node, |
+ MethodElement method, |
+ IncDecOperator operator, |
A arg) { |
- applyParameters(parameters, arg); |
- apply(body, arg); |
return null; |
} |
@override |
- R visitRedirectingFactoryConstructorDeclaration( |
- FunctionExpression node, |
- ConstructorElement constructor, |
- NodeList parameters, |
- InterfaceType redirectionType, |
- ConstructorElement redirectionTarget, |
+ R visitFinalLocalVariablePostfix( |
+ Send node, |
+ LocalVariableElement variable, |
+ IncDecOperator operator, |
A arg) { |
- applyParameters(parameters, arg); |
return null; |
} |
@override |
- R visitRedirectingGenerativeConstructorDeclaration( |
- FunctionExpression node, |
- ConstructorElement constructor, |
- NodeList parameters, |
- NodeList initializers, |
+ R visitFinalLocalVariablePrefix( |
+ Send node, |
+ LocalVariableElement variable, |
+ IncDecOperator operator, |
A arg) { |
- applyParameters(parameters, arg); |
- applyInitializers(node, arg); |
return null; |
} |
@override |
- R visitStaticFunctionDeclaration( |
- FunctionExpression node, |
- MethodElement function, |
- NodeList parameters, |
- Node body, |
+ R visitFinalParameterPostfix( |
+ Send node, |
+ ParameterElement parameter, |
+ IncDecOperator operator, |
A arg) { |
- applyParameters(parameters, arg); |
- apply(body, arg); |
return null; |
} |
@override |
- R visitSuperConstructorInvoke( |
+ R visitFinalParameterPrefix( |
Send node, |
- ConstructorElement superConstructor, |
- InterfaceType type, |
- NodeList arguments, |
- CallStructure callStructure, |
+ ParameterElement parameter, |
+ IncDecOperator operator, |
A arg) { |
- apply(arguments, arg); |
return null; |
} |
@override |
- R visitImplicitSuperConstructorInvoke( |
- FunctionExpression node, |
- ConstructorElement superConstructor, |
- InterfaceType type, |
+ R visitFinalStaticFieldPostfix( |
+ Send node, |
+ FieldElement field, |
+ IncDecOperator operator, |
A arg) { |
return null; |
} |
@override |
- R visitThisConstructorInvoke( |
+ R visitFinalStaticFieldPrefix( |
Send node, |
- ConstructorElement thisConstructor, |
- NodeList arguments, |
- CallStructure callStructure, |
+ FieldElement field, |
+ IncDecOperator operator, |
A arg) { |
- apply(arguments, arg); |
return null; |
} |
@override |
- R visitTopLevelFunctionDeclaration( |
- FunctionExpression node, |
- MethodElement function, |
- NodeList parameters, |
- Node body, |
+ R visitSuperFieldFieldCompound( |
+ Send node, FieldElement readField, |
+ FieldElement writtenField, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
- applyParameters(parameters, arg); |
- apply(body, arg); |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R errorUnresolvedFieldInitializer( |
- SendSet node, |
- Element element, |
- Node initializer, |
+ R visitFinalSuperFieldCompound( |
+ Send node, |
+ FieldElement field, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
- apply(initializer, arg); |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R errorUnresolvedSuperConstructorInvoke( |
+ R visitFinalSuperFieldPostfix( |
Send node, |
- Element element, |
- NodeList arguments, |
- Selector selector, |
+ FieldElement field, |
+ IncDecOperator operator, |
A arg) { |
- apply(arguments, arg); |
return null; |
} |
@override |
- R errorUnresolvedThisConstructorInvoke( |
+ R visitFinalSuperFieldPrefix( |
Send node, |
- Element element, |
- NodeList arguments, |
- Selector selector, |
+ FieldElement field, |
+ IncDecOperator operator, |
A arg) { |
- apply(arguments, arg); |
return null; |
} |
@override |
- R visitLocalVariableDeclaration( |
- VariableDefinitions node, |
- Node definition, |
- LocalVariableElement variable, |
- Node initializer, |
+ R visitSuperMethodCompound( |
+ Send node, |
+ FunctionElement method, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
- if (initializer != null) { |
- apply(initializer, arg); |
- } |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitOptionalParameterDeclaration( |
- VariableDefinitions node, |
- Node definition, |
- ParameterElement parameter, |
- ConstantExpression defaultValue, |
- int index, |
+ R visitSuperMethodPostfix( |
+ Send node, |
+ FunctionElement method, |
+ IncDecOperator operator, |
A arg) { |
return null; |
} |
@override |
- R visitParameterDeclaration( |
- VariableDefinitions node, |
- Node definition, |
- ParameterElement parameter, |
- int index, |
+ R visitSuperMethodPrefix( |
+ Send node, |
+ FunctionElement method, |
+ IncDecOperator operator, |
A arg) { |
return null; |
} |
@override |
- R visitInitializingFormalDeclaration( |
- VariableDefinitions node, |
- Node definition, |
- InitializingFormalElement initializingFormal, |
- int index, |
+ R visitFinalTopLevelFieldPostfix( |
+ Send node, |
+ FieldElement field, |
+ IncDecOperator operator, |
A arg) { |
return null; |
} |
@override |
- R visitLocalConstantDeclaration( |
- VariableDefinitions node, |
- Node definition, |
- LocalVariableElement variable, |
- ConstantExpression constant, |
+ R visitFinalTopLevelFieldPrefix( |
+ Send node, |
+ FieldElement field, |
+ IncDecOperator operator, |
A arg) { |
return null; |
} |
@override |
- R visitNamedInitializingFormalDeclaration( |
- VariableDefinitions node, |
- Node definition, |
- InitializingFormalElement initializingFormal, |
- ConstantExpression defaultValue, |
+ R visitTopLevelMethodCompound( |
+ Send node, |
+ FunctionElement method, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitNamedParameterDeclaration( |
- VariableDefinitions node, |
- Node definition, |
- ParameterElement parameter, |
- ConstantExpression defaultValue, |
- A arg) { |
- return null; |
+ R visitUnresolvedSuperCompound( |
+ Send node, |
+ Element element, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ apply(rhs, arg); |
+ return null; |
} |
@override |
- R visitOptionalInitializingFormalDeclaration( |
- VariableDefinitions node, |
- Node definition, |
- InitializingFormalElement initializingFormal, |
- ConstantExpression defaultValue, |
- int index, |
+ R visitUnresolvedSuperPostfix( |
+ Send node, |
+ Element element, |
+ IncDecOperator operator, |
A arg) { |
return null; |
} |
@override |
- R visitInstanceFieldDeclaration( |
- VariableDefinitions node, |
- Node definition, |
- FieldElement field, |
- Node initializer, |
+ R visitUnresolvedSuperPrefix( |
+ Send node, |
+ Element element, |
+ IncDecOperator operator, |
A arg) { |
- if (initializer != null) { |
- apply(initializer, arg); |
- } |
return null; |
} |
@override |
- R visitStaticConstantDeclaration( |
- VariableDefinitions node, |
- Node definition, |
- FieldElement field, |
- ConstantExpression constant, |
+ R visitUnresolvedSuperGetterCompound( |
+ Send node, Element element, |
+ MethodElement setter, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitStaticFieldDeclaration( |
- VariableDefinitions node, |
- Node definition, |
- FieldElement field, |
- Node initializer, |
+ R visitUnresolvedSuperGetterPostfix( |
+ Send node, |
+ Element element, |
+ MethodElement setter, |
+ IncDecOperator operator, |
A arg) { |
- if (initializer != null) { |
- apply(initializer, arg); |
- } |
return null; |
} |
@override |
- R visitTopLevelConstantDeclaration( |
- VariableDefinitions node, |
- Node definition, |
- FieldElement field, |
- ConstantExpression constant, |
+ R visitUnresolvedSuperGetterPrefix( |
+ Send node, |
+ Element element, |
+ MethodElement setter, |
+ IncDecOperator operator, |
A arg) { |
return null; |
} |
@override |
- R visitTopLevelFieldDeclaration( |
- VariableDefinitions node, |
- Node definition, |
- FieldElement field, |
- Node initializer, |
+ R visitUnresolvedSuperSetterCompound( |
+ Send node, MethodElement getter, |
+ Element element, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
- if (initializer != null) { |
- apply(initializer, arg); |
- } |
+ apply(rhs, arg); |
return null; |
} |
@override |
- R visitAbstractGetterDeclaration( |
- FunctionExpression node, |
+ R visitUnresolvedSuperSetterPostfix( |
+ Send node, |
MethodElement getter, |
+ Element element, |
+ IncDecOperator operator, |
A arg) { |
return null; |
} |
@override |
- R visitAbstractSetterDeclaration( |
+ R visitUnresolvedSuperSetterPrefix( |
+ Send node, |
+ MethodElement getter, |
+ Element element, |
+ IncDecOperator operator, |
+ A arg) { |
+ return null; |
+ } |
+} |
+ |
+/// [SemanticDeclarationVisitor] that visits subnodes. |
+class TraversalDeclarationMixin<R, A> |
+ implements SemanticDeclarationVisitor<R, A> { |
+ @override |
+ R apply(Node node, A arg) { |
+ throw new UnimplementedError("TraversalMixin.apply unimplemented"); |
+ } |
+ |
+ @override |
+ applyInitializers(FunctionExpression constructor, A arg) { |
+ throw new UnimplementedError( |
+ "TraversalMixin.applyInitializers unimplemented"); |
+ } |
+ |
+ @override |
+ applyParameters(NodeList parameters, A arg) { |
+ throw new UnimplementedError( |
+ "TraversalMixin.applyParameters unimplemented"); |
+ } |
+ |
+ @override |
+ R visitAbstractMethodDeclaration( |
FunctionExpression node, |
- MethodElement setter, |
+ MethodElement method, |
NodeList parameters, |
A arg) { |
applyParameters(parameters, arg); |
@@ -6807,19 +7252,21 @@ class TraversalDeclarationMixin<R, A> |
} |
@override |
- R visitInstanceGetterDeclaration( |
+ R visitClosureDeclaration( |
FunctionExpression node, |
- MethodElement getter, |
+ LocalFunctionElement function, |
+ NodeList parameters, |
Node body, |
A arg) { |
+ applyParameters(parameters, arg); |
apply(body, arg); |
return null; |
} |
@override |
- R visitInstanceSetterDeclaration( |
+ R visitFactoryConstructorDeclaration( |
FunctionExpression node, |
- MethodElement setter, |
+ ConstructorElement constructor, |
NodeList parameters, |
Node body, |
A arg) { |
@@ -6829,41 +7276,45 @@ class TraversalDeclarationMixin<R, A> |
} |
@override |
- R visitStaticGetterDeclaration( |
- FunctionExpression node, |
- MethodElement getter, |
- Node body, |
+ R visitFieldInitializer( |
+ SendSet node, |
+ FieldElement field, |
+ Node initializer, |
A arg) { |
- apply(body, arg); |
+ apply(initializer, arg); |
return null; |
} |
@override |
- R visitStaticSetterDeclaration( |
+ R visitGenerativeConstructorDeclaration( |
FunctionExpression node, |
- MethodElement setter, |
+ ConstructorElement constructor, |
NodeList parameters, |
+ NodeList initializers, |
Node body, |
A arg) { |
applyParameters(parameters, arg); |
+ applyInitializers(node, arg); |
apply(body, arg); |
return null; |
} |
@override |
- R visitTopLevelGetterDeclaration( |
+ R visitInstanceMethodDeclaration( |
FunctionExpression node, |
- MethodElement getter, |
+ MethodElement method, |
+ NodeList parameters, |
Node body, |
A arg) { |
+ applyParameters(parameters, arg); |
apply(body, arg); |
return null; |
} |
@override |
- R visitTopLevelSetterDeclaration( |
+ R visitLocalFunctionDeclaration( |
FunctionExpression node, |
- MethodElement setter, |
+ LocalFunctionElement function, |
NodeList parameters, |
Node body, |
A arg) { |
@@ -6871,1543 +7322,1883 @@ class TraversalDeclarationMixin<R, A> |
apply(body, arg); |
return null; |
} |
-} |
- |
-/// AST visitor that visits all normal [Send] and [SendSet] nodes using the |
-/// [SemanticVisitor]. |
-class TraversalVisitor<R, A> extends SemanticVisitor<R, A> |
- with TraversalSendMixin<R, A>, |
- TraversalDeclarationMixin<R, A> { |
- TraversalVisitor(TreeElements elements) : super(elements); |
- |
- SemanticSendVisitor<R, A> get sendVisitor => this; |
- |
- SemanticDeclarationVisitor<R, A> get declVisitor => this; |
- R apply(Node node, A arg) { |
- node.accept(this); |
+ @override |
+ R visitRedirectingFactoryConstructorDeclaration( |
+ FunctionExpression node, |
+ ConstructorElement constructor, |
+ NodeList parameters, |
+ InterfaceType redirectionType, |
+ ConstructorElement redirectionTarget, |
+ A arg) { |
+ applyParameters(parameters, arg); |
return null; |
} |
@override |
- applyInitializers(FunctionExpression constructor, A arg) { |
- visitInitializers(constructor, arg); |
+ R visitRedirectingGenerativeConstructorDeclaration( |
+ FunctionExpression node, |
+ ConstructorElement constructor, |
+ NodeList parameters, |
+ NodeList initializers, |
+ A arg) { |
+ applyParameters(parameters, arg); |
+ applyInitializers(node, arg); |
+ return null; |
} |
@override |
- applyParameters(NodeList parameters, A arg) { |
- visitParameters(parameters, arg); |
+ R visitStaticFunctionDeclaration( |
+ FunctionExpression node, |
+ MethodElement function, |
+ NodeList parameters, |
+ Node body, |
+ A arg) { |
+ applyParameters(parameters, arg); |
+ apply(body, arg); |
+ return null; |
} |
@override |
- internalError(Spannable spannable, String message) { |
- throw new SpannableAssertionFailure(spannable, message); |
+ R visitSuperConstructorInvoke( |
+ Send node, |
+ ConstructorElement superConstructor, |
+ InterfaceType type, |
+ NodeList arguments, |
+ CallStructure callStructure, |
+ A arg) { |
+ apply(arguments, arg); |
+ return null; |
} |
@override |
- R visitNode(Node node) { |
- node.visitChildren(this); |
+ R visitImplicitSuperConstructorInvoke( |
+ FunctionExpression node, |
+ ConstructorElement superConstructor, |
+ InterfaceType type, |
+ A arg) { |
return null; |
} |
-} |
- |
-/// Mixin that groups all non-compound `visitStaticX` and `visitTopLevelX` |
-/// method by delegating calls to `handleStaticX` methods. |
-/// |
-/// This mixin is useful for the cases where both top level members and static |
-/// class members are handled uniformly. |
-abstract class BaseImplementationOfStaticsMixin<R, A> |
- implements SemanticSendVisitor<R, A> { |
- R handleStaticFieldGet( |
- Send node, |
- FieldElement field, |
- A arg); |
- R handleStaticFieldInvoke( |
+ @override |
+ R visitThisConstructorInvoke( |
Send node, |
- FieldElement field, |
+ ConstructorElement thisConstructor, |
NodeList arguments, |
CallStructure callStructure, |
- A arg); |
- |
- R handleStaticFieldSet( |
- SendSet node, |
- FieldElement field, |
- Node rhs, |
- A arg); |
+ A arg) { |
+ apply(arguments, arg); |
+ return null; |
+ } |
- R handleStaticFunctionGet( |
- Send node, |
+ @override |
+ R visitTopLevelFunctionDeclaration( |
+ FunctionExpression node, |
MethodElement function, |
- A arg); |
- |
- R handleStaticFunctionInvoke( |
- Send node, |
- MethodElement function, |
- NodeList arguments, |
- CallStructure callStructure, |
- A arg); |
- |
- R handleStaticFunctionIncompatibleInvoke( |
- Send node, |
- MethodElement function, |
- NodeList arguments, |
- CallStructure callStructure, |
- A arg); |
- |
- R handleStaticGetterGet( |
- Send node, |
- FunctionElement getter, |
- A arg); |
- |
- R handleStaticGetterSet( |
- Send node, |
- FunctionElement getter, |
- Node rhs, |
- A arg); |
- |
- R handleStaticGetterInvoke( |
- Send node, |
- FunctionElement getter, |
- NodeList arguments, |
- CallStructure callStructure, |
- A arg); |
- |
- R handleStaticSetterGet( |
- SendSet node, |
- FunctionElement setter, |
- A arg); |
+ NodeList parameters, |
+ Node body, |
+ A arg) { |
+ applyParameters(parameters, arg); |
+ apply(body, arg); |
+ return null; |
+ } |
- R handleStaticSetterSet( |
+ @override |
+ R errorUnresolvedFieldInitializer( |
SendSet node, |
- FunctionElement setter, |
- Node rhs, |
- A arg); |
+ Element element, |
+ Node initializer, |
+ A arg) { |
+ apply(initializer, arg); |
+ return null; |
+ } |
- R handleStaticSetterInvoke( |
+ @override |
+ R errorUnresolvedSuperConstructorInvoke( |
Send node, |
- FunctionElement setter, |
+ Element element, |
NodeList arguments, |
- CallStructure callStructure, |
- A arg); |
- |
- R handleFinalStaticFieldSet( |
- SendSet node, |
- FieldElement field, |
- Node rhs, |
- A arg); |
- |
- R handleStaticFunctionSet( |
- SendSet node, |
- MethodElement function, |
- Node rhs, |
- A arg); |
+ Selector selector, |
+ A arg) { |
+ apply(arguments, arg); |
+ return null; |
+ } |
@override |
- R visitStaticFieldGet( |
+ R errorUnresolvedThisConstructorInvoke( |
Send node, |
- FieldElement field, |
+ Element element, |
+ NodeList arguments, |
+ Selector selector, |
A arg) { |
- return handleStaticFieldGet(node, field, arg); |
+ apply(arguments, arg); |
+ return null; |
} |
@override |
- R visitStaticFieldInvoke( |
- Send node, |
- FieldElement field, |
- NodeList arguments, |
- CallStructure callStructure, |
+ R visitLocalVariableDeclaration( |
+ VariableDefinitions node, |
+ Node definition, |
+ LocalVariableElement variable, |
+ Node initializer, |
A arg) { |
- return handleStaticFieldInvoke(node, field, arguments, callStructure, arg); |
+ if (initializer != null) { |
+ apply(initializer, arg); |
+ } |
+ return null; |
} |
@override |
- R visitStaticFieldSet( |
- SendSet node, |
- FieldElement field, |
- Node rhs, |
+ R visitOptionalParameterDeclaration( |
+ VariableDefinitions node, |
+ Node definition, |
+ ParameterElement parameter, |
+ ConstantExpression defaultValue, |
+ int index, |
A arg) { |
- return handleStaticFieldSet(node, field, rhs, arg); |
+ return null; |
} |
@override |
- R visitStaticFunctionGet( |
- Send node, |
- MethodElement function, |
+ R visitParameterDeclaration( |
+ VariableDefinitions node, |
+ Node definition, |
+ ParameterElement parameter, |
+ int index, |
A arg) { |
- return handleStaticFunctionGet(node, function, arg); |
+ return null; |
} |
@override |
- R visitStaticFunctionInvoke( |
- Send node, |
- MethodElement function, |
- NodeList arguments, |
- CallStructure callStructure, |
+ R visitInitializingFormalDeclaration( |
+ VariableDefinitions node, |
+ Node definition, |
+ InitializingFormalElement initializingFormal, |
+ int index, |
A arg) { |
- return handleStaticFunctionInvoke( |
- node, function, arguments, callStructure, arg); |
+ return null; |
} |
@override |
- R visitStaticFunctionIncompatibleInvoke( |
- Send node, |
- MethodElement function, |
- NodeList arguments, |
- CallStructure callStructure, |
+ R visitLocalConstantDeclaration( |
+ VariableDefinitions node, |
+ Node definition, |
+ LocalVariableElement variable, |
+ ConstantExpression constant, |
A arg) { |
- return handleStaticFunctionIncompatibleInvoke( |
- node, function, arguments, callStructure, arg); |
+ return null; |
} |
@override |
- R visitStaticGetterGet( |
- Send node, |
- FunctionElement getter, |
+ R visitNamedInitializingFormalDeclaration( |
+ VariableDefinitions node, |
+ Node definition, |
+ InitializingFormalElement initializingFormal, |
+ ConstantExpression defaultValue, |
A arg) { |
- return handleStaticGetterGet(node, getter, arg); |
+ return null; |
} |
@override |
- R visitStaticGetterInvoke( |
- Send node, |
- FunctionElement getter, |
- NodeList arguments, |
- CallStructure callStructure, |
+ R visitNamedParameterDeclaration( |
+ VariableDefinitions node, |
+ Node definition, |
+ ParameterElement parameter, |
+ ConstantExpression defaultValue, |
A arg) { |
- return handleStaticGetterInvoke( |
- node, getter, arguments, callStructure, arg); |
+ return null; |
} |
@override |
- R visitStaticSetterSet( |
- SendSet node, |
- FunctionElement setter, |
- Node rhs, |
+ R visitOptionalInitializingFormalDeclaration( |
+ VariableDefinitions node, |
+ Node definition, |
+ InitializingFormalElement initializingFormal, |
+ ConstantExpression defaultValue, |
+ int index, |
A arg) { |
- return handleStaticSetterSet(node, setter, rhs, arg); |
+ return null; |
} |
@override |
- R visitTopLevelFieldGet( |
- Send node, |
+ R visitInstanceFieldDeclaration( |
+ VariableDefinitions node, |
+ Node definition, |
FieldElement field, |
+ Node initializer, |
A arg) { |
- return handleStaticFieldGet(node, field, arg); |
+ if (initializer != null) { |
+ apply(initializer, arg); |
+ } |
+ return null; |
} |
@override |
- R visitTopLevelFieldInvoke( |
- Send node, |
+ R visitStaticConstantDeclaration( |
+ VariableDefinitions node, |
+ Node definition, |
FieldElement field, |
- NodeList arguments, |
- CallStructure callStructure, |
+ ConstantExpression constant, |
A arg) { |
- return handleStaticFieldInvoke(node, field, arguments, callStructure, arg); |
+ return null; |
} |
@override |
- R visitTopLevelFieldSet( |
- SendSet node, |
+ R visitStaticFieldDeclaration( |
+ VariableDefinitions node, |
+ Node definition, |
FieldElement field, |
- Node rhs, |
+ Node initializer, |
A arg) { |
- return handleStaticFieldSet(node, field, rhs, arg); |
+ if (initializer != null) { |
+ apply(initializer, arg); |
+ } |
+ return null; |
} |
@override |
- R visitTopLevelFunctionGet( |
- Send node, |
- MethodElement function, |
+ R visitTopLevelConstantDeclaration( |
+ VariableDefinitions node, |
+ Node definition, |
+ FieldElement field, |
+ ConstantExpression constant, |
A arg) { |
- return handleStaticFunctionGet(node, function, arg); |
+ return null; |
} |
@override |
- R visitTopLevelFunctionInvoke( |
- Send node, |
- MethodElement function, |
- NodeList arguments, |
- CallStructure callStructure, |
+ R visitTopLevelFieldDeclaration( |
+ VariableDefinitions node, |
+ Node definition, |
+ FieldElement field, |
+ Node initializer, |
A arg) { |
- return handleStaticFunctionInvoke( |
- node, function, arguments, callStructure, arg); |
+ if (initializer != null) { |
+ apply(initializer, arg); |
+ } |
+ return null; |
} |
@override |
- R visitTopLevelFunctionIncompatibleInvoke( |
- Send node, |
- MethodElement function, |
- NodeList arguments, |
- CallStructure callStructure, |
+ R visitAbstractGetterDeclaration( |
+ FunctionExpression node, |
+ MethodElement getter, |
A arg) { |
- return handleStaticFunctionIncompatibleInvoke( |
- node, function, arguments, callStructure, arg); |
+ return null; |
} |
@override |
- R visitTopLevelGetterGet( |
- Send node, |
- FunctionElement getter, |
+ R visitAbstractSetterDeclaration( |
+ FunctionExpression node, |
+ MethodElement setter, |
+ NodeList parameters, |
A arg) { |
- return handleStaticGetterGet(node, getter, arg); |
+ applyParameters(parameters, arg); |
+ return null; |
} |
@override |
- R visitTopLevelGetterSet( |
- SendSet node, |
- FunctionElement getter, |
- Node rhs, |
+ R visitInstanceGetterDeclaration( |
+ FunctionExpression node, |
+ MethodElement getter, |
+ Node body, |
A arg) { |
- return handleStaticGetterSet(node, getter, rhs, arg); |
+ apply(body, arg); |
+ return null; |
} |
@override |
- R visitTopLevelGetterInvoke( |
- Send node, |
- FunctionElement getter, |
- NodeList arguments, |
- CallStructure callStructure, |
+ R visitInstanceSetterDeclaration( |
+ FunctionExpression node, |
+ MethodElement setter, |
+ NodeList parameters, |
+ Node body, |
A arg) { |
- return handleStaticGetterInvoke( |
- node, getter, arguments, callStructure, arg); |
+ applyParameters(parameters, arg); |
+ apply(body, arg); |
+ return null; |
} |
@override |
- R visitTopLevelSetterSet( |
- SendSet node, |
- FunctionElement setter, |
- Node rhs, |
+ R visitStaticGetterDeclaration( |
+ FunctionExpression node, |
+ MethodElement getter, |
+ Node body, |
A arg) { |
- return handleStaticSetterSet(node, setter, rhs, arg); |
+ apply(body, arg); |
+ return null; |
} |
@override |
- R visitStaticSetterInvoke( |
- Send node, |
- FunctionElement setter, |
- NodeList arguments, |
- CallStructure callStructure, |
+ R visitStaticSetterDeclaration( |
+ FunctionExpression node, |
+ MethodElement setter, |
+ NodeList parameters, |
+ Node body, |
A arg) { |
- return handleStaticSetterInvoke( |
- node, setter, arguments, callStructure, arg); |
+ applyParameters(parameters, arg); |
+ apply(body, arg); |
+ return null; |
} |
@override |
- R visitTopLevelSetterInvoke( |
- Send node, |
- FunctionElement setter, |
- NodeList arguments, |
- CallStructure callStructure, |
+ R visitTopLevelGetterDeclaration( |
+ FunctionExpression node, |
+ MethodElement getter, |
+ Node body, |
A arg) { |
- return handleStaticSetterInvoke( |
- node, setter, arguments, callStructure, arg); |
+ apply(body, arg); |
+ return null; |
} |
@override |
- R visitStaticSetterGet( |
- Send node, |
- FunctionElement setter, |
+ R visitTopLevelSetterDeclaration( |
+ FunctionExpression node, |
+ MethodElement setter, |
+ NodeList parameters, |
+ Node body, |
A arg) { |
- return handleStaticSetterGet(node, setter, arg); |
+ applyParameters(parameters, arg); |
+ apply(body, arg); |
+ return null; |
} |
+} |
- @override |
- R visitStaticGetterSet( |
- SendSet node, |
- FunctionElement getter, |
- Node rhs, |
- A arg) { |
- return handleStaticGetterSet(node, getter, rhs, arg); |
- } |
+/// AST visitor that visits all normal [Send] and [SendSet] nodes using the |
+/// [SemanticVisitor]. |
+class TraversalVisitor<R, A> extends SemanticVisitor<R, A> |
+ with TraversalSendMixin<R, A>, |
+ TraversalDeclarationMixin<R, A> { |
+ TraversalVisitor(TreeElements elements) : super(elements); |
- @override |
- R visitTopLevelSetterGet( |
- Send node, |
- FunctionElement setter, |
- A arg) { |
- return handleStaticSetterGet(node, setter, arg); |
+ SemanticSendVisitor<R, A> get sendVisitor => this; |
+ |
+ SemanticDeclarationVisitor<R, A> get declVisitor => this; |
+ |
+ R apply(Node node, A arg) { |
+ node.accept(this); |
+ return null; |
} |
@override |
- R visitFinalStaticFieldSet( |
- SendSet node, |
- FieldElement field, |
- Node rhs, |
- A arg) { |
- return handleFinalStaticFieldSet(node, field, rhs, arg); |
+ applyInitializers(FunctionExpression constructor, A arg) { |
+ visitInitializers(constructor, arg); |
} |
@override |
- R visitFinalTopLevelFieldSet( |
- SendSet node, |
- FieldElement field, |
- Node rhs, |
- A arg) { |
- return handleFinalStaticFieldSet(node, field, rhs, arg); |
+ applyParameters(NodeList parameters, A arg) { |
+ visitParameters(parameters, arg); |
} |
@override |
- R visitStaticFunctionSet( |
- Send node, |
- MethodElement function, |
- Node rhs, |
- A arg) { |
- return handleStaticFunctionSet(node, function, rhs, arg); |
+ internalError(Spannable spannable, String message) { |
+ throw new SpannableAssertionFailure(spannable, message); |
} |
@override |
- R visitTopLevelFunctionSet( |
- Send node, |
- MethodElement function, |
- Node rhs, |
- A arg) { |
- return handleStaticFunctionSet(node, function, rhs, arg); |
+ R visitNode(Node node) { |
+ node.visitChildren(this); |
+ return null; |
} |
} |
-/// Mixin that groups all compounds visitors `visitStaticX` and `visitTopLevelX` |
+/// Mixin that groups all non-compound `visitStaticX` and `visitTopLevelX` |
/// method by delegating calls to `handleStaticX` methods. |
/// |
/// This mixin is useful for the cases where both top level members and static |
/// class members are handled uniformly. |
-abstract class BaseImplementationOfStaticCompoundsMixin<R, A> |
+abstract class BaseImplementationOfStaticsMixin<R, A> |
implements SemanticSendVisitor<R, A> { |
- R handleStaticFieldCompound( |
+ R handleStaticFieldGet( |
Send node, |
FieldElement field, |
- AssignmentOperator operator, |
- Node rhs, |
A arg); |
- R handleStaticFieldPostfixPrefix( |
+ R handleStaticFieldInvoke( |
Send node, |
FieldElement field, |
- IncDecOperator operator, |
- A arg, |
- {bool isPrefix}); |
+ NodeList arguments, |
+ CallStructure callStructure, |
+ A arg); |
- R handleStaticGetterSetterCompound( |
- Send node, |
- FunctionElement getter, |
- FunctionElement setter, |
- AssignmentOperator operator, |
+ R handleStaticFieldSet( |
+ SendSet node, |
+ FieldElement field, |
Node rhs, |
A arg); |
- R handleStaticGetterSetterPostfixPrefix( |
- Send node, |
- FunctionElement getter, |
- FunctionElement setter, |
- IncDecOperator operator, |
- A arg, |
- {bool isPrefix}); |
- |
- R handleStaticMethodSetterCompound( |
+ R handleStaticFunctionGet( |
Send node, |
- FunctionElement method, |
- FunctionElement setter, |
- AssignmentOperator operator, |
- Node rhs, |
+ MethodElement function, |
A arg); |
- R handleStaticMethodSetterPostfixPrefix( |
+ R handleStaticFunctionInvoke( |
Send node, |
- FunctionElement getter, |
- FunctionElement setter, |
- IncDecOperator operator, |
- A arg, |
- {bool isPrefix}); |
+ MethodElement function, |
+ NodeList arguments, |
+ CallStructure callStructure, |
+ A arg); |
- R handleFinalStaticFieldCompound( |
+ R handleStaticFunctionIncompatibleInvoke( |
Send node, |
- FieldElement field, |
- AssignmentOperator operator, |
- Node rhs, |
+ MethodElement function, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg); |
- R handleFinalStaticFieldPostfixPrefix( |
+ R handleStaticGetterGet( |
Send node, |
- FieldElement field, |
- IncDecOperator operator, |
- A arg, |
- {bool isPrefix}); |
+ FunctionElement getter, |
+ A arg); |
- R handleStaticMethodCompound( |
+ R handleStaticGetterSet( |
Send node, |
- FunctionElement method, |
- AssignmentOperator operator, |
+ FunctionElement getter, |
Node rhs, |
A arg); |
- R handleStaticMethodPostfixPrefix( |
+ R handleStaticGetterInvoke( |
Send node, |
- FunctionElement method, |
- IncDecOperator operator, |
- A arg, |
- {bool isPrefix}); |
+ FunctionElement getter, |
+ NodeList arguments, |
+ CallStructure callStructure, |
+ A arg); |
- R handleUnresolvedStaticGetterCompound( |
- Send node, |
- Element element, |
+ R handleStaticSetterGet( |
+ SendSet node, |
+ FunctionElement setter, |
+ A arg); |
+ |
+ R handleStaticSetterSet( |
+ SendSet node, |
FunctionElement setter, |
- AssignmentOperator operator, |
Node rhs, |
A arg); |
- R handleUnresolvedStaticGetterPostfixPrefix( |
+ R handleStaticSetterInvoke( |
Send node, |
- Element element, |
FunctionElement setter, |
- IncDecOperator operator, |
- A arg, |
- {bool isPrefix}); |
+ NodeList arguments, |
+ CallStructure callStructure, |
+ A arg); |
- R handleUnresolvedStaticSetterCompound( |
- Send node, |
- FunctionElement getter, |
- Element element, |
- AssignmentOperator operator, |
+ R handleFinalStaticFieldSet( |
+ SendSet node, |
+ FieldElement field, |
Node rhs, |
A arg); |
- R handleUnresolvedStaticSetterPostfixPrefix( |
+ R handleStaticFunctionSet( |
+ SendSet node, |
+ MethodElement function, |
+ Node rhs, |
+ A arg); |
+ |
+ @override |
+ R visitStaticFieldGet( |
Send node, |
- FunctionElement getter, |
- Element element, |
- IncDecOperator operator, |
- A arg, |
- {bool isPrefix}); |
+ FieldElement field, |
+ A arg) { |
+ return handleStaticFieldGet(node, field, arg); |
+ } |
@override |
- R visitStaticFieldCompound( |
+ R visitStaticFieldInvoke( |
Send node, |
FieldElement field, |
- AssignmentOperator operator, |
+ NodeList arguments, |
+ CallStructure callStructure, |
+ A arg) { |
+ return handleStaticFieldInvoke(node, field, arguments, callStructure, arg); |
+ } |
+ |
+ @override |
+ R visitStaticFieldSet( |
+ SendSet node, |
+ FieldElement field, |
Node rhs, |
A arg) { |
- return handleStaticFieldCompound(node, field, operator, rhs, arg); |
+ return handleStaticFieldSet(node, field, rhs, arg); |
} |
@override |
- R visitStaticFieldPostfix( |
+ R visitStaticFunctionGet( |
Send node, |
- FieldElement field, |
- IncDecOperator operator, |
+ MethodElement function, |
A arg) { |
- return handleStaticFieldPostfixPrefix( |
- node, field, operator, arg, isPrefix: false); |
+ return handleStaticFunctionGet(node, function, arg); |
} |
@override |
- R visitStaticFieldPrefix( |
+ R visitStaticFunctionInvoke( |
Send node, |
- FieldElement field, |
- IncDecOperator operator, |
+ MethodElement function, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return handleStaticFieldPostfixPrefix( |
- node, field, operator, arg, isPrefix: true); |
+ return handleStaticFunctionInvoke( |
+ node, function, arguments, callStructure, arg); |
} |
@override |
- R visitStaticGetterSetterCompound( |
+ R visitStaticFunctionIncompatibleInvoke( |
Send node, |
- FunctionElement getter, |
- FunctionElement setter, |
- AssignmentOperator operator, |
- Node rhs, |
+ MethodElement function, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return handleStaticGetterSetterCompound( |
- node, getter, setter, operator, rhs, arg); |
+ return handleStaticFunctionIncompatibleInvoke( |
+ node, function, arguments, callStructure, arg); |
} |
@override |
- R visitStaticGetterSetterPostfix( |
+ R visitStaticGetterGet( |
Send node, |
FunctionElement getter, |
- FunctionElement setter, |
- IncDecOperator operator, |
A arg) { |
- return handleStaticGetterSetterPostfixPrefix( |
- node, getter, setter, operator, arg, isPrefix: false); |
+ return handleStaticGetterGet(node, getter, arg); |
} |
@override |
- R visitStaticGetterSetterPrefix( |
+ R visitStaticGetterInvoke( |
Send node, |
FunctionElement getter, |
- FunctionElement setter, |
- IncDecOperator operator, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return handleStaticGetterSetterPostfixPrefix( |
- node, getter, setter, operator, arg, isPrefix: true); |
+ return handleStaticGetterInvoke( |
+ node, getter, arguments, callStructure, arg); |
} |
@override |
- R visitStaticMethodSetterCompound( |
- Send node, |
- FunctionElement method, |
+ R visitStaticSetterSet( |
+ SendSet node, |
FunctionElement setter, |
- AssignmentOperator operator, |
Node rhs, |
A arg) { |
- return handleStaticMethodSetterCompound( |
- node, method, setter, operator, rhs, arg); |
+ return handleStaticSetterSet(node, setter, rhs, arg); |
} |
@override |
- R visitStaticMethodSetterPostfix( |
+ R visitTopLevelFieldGet( |
Send node, |
- FunctionElement getter, |
- FunctionElement setter, |
- IncDecOperator operator, |
+ FieldElement field, |
A arg) { |
- return handleStaticMethodSetterPostfixPrefix( |
- node, getter, setter, operator, arg, isPrefix: false); |
+ return handleStaticFieldGet(node, field, arg); |
} |
@override |
- R visitStaticMethodSetterPrefix( |
+ R visitTopLevelFieldInvoke( |
Send node, |
- FunctionElement getter, |
- FunctionElement setter, |
- IncDecOperator operator, |
+ FieldElement field, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return handleStaticMethodSetterPostfixPrefix( |
- node, getter, setter, operator, arg, isPrefix: true); |
+ return handleStaticFieldInvoke(node, field, arguments, callStructure, arg); |
} |
@override |
- R visitTopLevelFieldCompound( |
- Send node, |
+ R visitTopLevelFieldSet( |
+ SendSet node, |
FieldElement field, |
- AssignmentOperator operator, |
Node rhs, |
A arg) { |
- return handleStaticFieldCompound(node, field, operator, rhs, arg); |
+ return handleStaticFieldSet(node, field, rhs, arg); |
} |
@override |
- R visitTopLevelFieldPostfix( |
+ R visitTopLevelFunctionGet( |
Send node, |
- FieldElement field, |
- IncDecOperator operator, |
+ MethodElement function, |
A arg) { |
- return handleStaticFieldPostfixPrefix( |
- node, field, operator, arg, isPrefix: false); |
+ return handleStaticFunctionGet(node, function, arg); |
} |
@override |
- R visitTopLevelFieldPrefix( |
+ R visitTopLevelFunctionInvoke( |
Send node, |
- FieldElement field, |
- IncDecOperator operator, |
+ MethodElement function, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return handleStaticFieldPostfixPrefix( |
- node, field, operator, arg, isPrefix: true); |
+ return handleStaticFunctionInvoke( |
+ node, function, arguments, callStructure, arg); |
} |
@override |
- R visitTopLevelGetterSetterCompound( |
+ R visitTopLevelFunctionIncompatibleInvoke( |
Send node, |
- FunctionElement getter, |
- FunctionElement setter, |
- AssignmentOperator operator, |
- Node rhs, |
+ MethodElement function, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return handleStaticGetterSetterCompound( |
- node, getter, setter, operator, rhs, arg); |
+ return handleStaticFunctionIncompatibleInvoke( |
+ node, function, arguments, callStructure, arg); |
} |
@override |
- R visitTopLevelGetterSetterPostfix( |
+ R visitTopLevelGetterGet( |
Send node, |
FunctionElement getter, |
- FunctionElement setter, |
- IncDecOperator operator, |
A arg) { |
- return handleStaticGetterSetterPostfixPrefix( |
- node, getter, setter, operator, arg, isPrefix: false); |
+ return handleStaticGetterGet(node, getter, arg); |
} |
@override |
- R visitTopLevelGetterSetterPrefix( |
- Send node, |
+ R visitTopLevelGetterSet( |
+ SendSet node, |
FunctionElement getter, |
- FunctionElement setter, |
- IncDecOperator operator, |
+ Node rhs, |
A arg) { |
- return handleStaticGetterSetterPostfixPrefix( |
- node, getter, setter, operator, arg, isPrefix: true); |
+ return handleStaticGetterSet(node, getter, rhs, arg); |
} |
@override |
- R visitTopLevelMethodSetterCompound( |
+ R visitTopLevelGetterInvoke( |
Send node, |
- FunctionElement method, |
+ FunctionElement getter, |
+ NodeList arguments, |
+ CallStructure callStructure, |
+ A arg) { |
+ return handleStaticGetterInvoke( |
+ node, getter, arguments, callStructure, arg); |
+ } |
+ |
+ @override |
+ R visitTopLevelSetterSet( |
+ SendSet node, |
FunctionElement setter, |
- AssignmentOperator operator, |
Node rhs, |
A arg) { |
- return handleStaticMethodSetterCompound( |
- node, method, setter, operator, rhs, arg); |
+ return handleStaticSetterSet(node, setter, rhs, arg); |
} |
@override |
- R visitTopLevelMethodSetterPostfix( |
+ R visitStaticSetterInvoke( |
Send node, |
- FunctionElement method, |
FunctionElement setter, |
- IncDecOperator operator, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return handleStaticMethodSetterPostfixPrefix( |
- node, method, setter, operator, arg, isPrefix: false); |
+ return handleStaticSetterInvoke( |
+ node, setter, arguments, callStructure, arg); |
} |
@override |
- R visitTopLevelMethodSetterPrefix( |
+ R visitTopLevelSetterInvoke( |
Send node, |
- FunctionElement method, |
FunctionElement setter, |
- IncDecOperator operator, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return handleStaticMethodSetterPostfixPrefix( |
- node, method, setter, operator, arg, isPrefix: true); |
+ return handleStaticSetterInvoke( |
+ node, setter, arguments, callStructure, arg); |
} |
@override |
- R visitFinalStaticFieldCompound( |
+ R visitStaticSetterGet( |
Send node, |
- FieldElement field, |
- AssignmentOperator operator, |
+ FunctionElement setter, |
+ A arg) { |
+ return handleStaticSetterGet(node, setter, arg); |
+ } |
+ |
+ @override |
+ R visitStaticGetterSet( |
+ SendSet node, |
+ FunctionElement getter, |
Node rhs, |
A arg) { |
- return handleFinalStaticFieldCompound( |
- node, field, operator, rhs, arg); |
+ return handleStaticGetterSet(node, getter, rhs, arg); |
} |
@override |
- R visitFinalStaticFieldPostfix( |
+ R visitTopLevelSetterGet( |
Send node, |
- FieldElement field, |
- IncDecOperator operator, |
+ FunctionElement setter, |
A arg) { |
- return handleFinalStaticFieldPostfixPrefix( |
- node, field, operator, arg, isPrefix: false); |
+ return handleStaticSetterGet(node, setter, arg); |
} |
@override |
- R visitFinalStaticFieldPrefix( |
- Send node, |
+ R visitFinalStaticFieldSet( |
+ SendSet node, |
FieldElement field, |
- IncDecOperator operator, |
+ Node rhs, |
A arg) { |
- return handleFinalStaticFieldPostfixPrefix( |
- node, field, operator, arg, isPrefix: true); |
+ return handleFinalStaticFieldSet(node, field, rhs, arg); |
} |
@override |
- R visitStaticMethodCompound( |
- Send node, |
- FunctionElement method, |
- AssignmentOperator operator, |
+ R visitFinalTopLevelFieldSet( |
+ SendSet node, |
+ FieldElement field, |
Node rhs, |
A arg) { |
- return handleStaticMethodCompound( |
- node, method, operator, rhs, arg); |
+ return handleFinalStaticFieldSet(node, field, rhs, arg); |
} |
@override |
- R visitStaticMethodPostfix( |
+ R visitStaticFunctionSet( |
Send node, |
- FunctionElement method, |
- IncDecOperator operator, |
+ MethodElement function, |
+ Node rhs, |
A arg) { |
- return handleStaticMethodPostfixPrefix( |
- node, method, operator, arg, isPrefix: false); |
+ return handleStaticFunctionSet(node, function, rhs, arg); |
} |
@override |
- R visitStaticMethodPrefix( |
+ R visitTopLevelFunctionSet( |
Send node, |
- FunctionElement method, |
- IncDecOperator operator, |
+ MethodElement function, |
+ Node rhs, |
A arg) { |
- return handleStaticMethodPostfixPrefix( |
- node, method, operator, arg, isPrefix: true); |
+ return handleStaticFunctionSet(node, function, rhs, arg); |
} |
+} |
- @override |
- R visitUnresolvedStaticGetterCompound( |
+/// Mixin that groups all compounds visitors `visitStaticX` and `visitTopLevelX` |
+/// method by delegating calls to `handleStaticX` methods. |
+/// |
+/// This mixin is useful for the cases where both top level members and static |
+/// class members are handled uniformly. |
+abstract class BaseImplementationOfStaticCompoundsMixin<R, A> |
+ implements SemanticSendVisitor<R, A> { |
+ R handleStaticFieldCompound( |
Send node, |
- Element element, |
- FunctionElement setter, |
+ FieldElement field, |
AssignmentOperator operator, |
Node rhs, |
- A arg) { |
- return handleUnresolvedStaticGetterCompound( |
- node, element, setter, operator, rhs, arg); |
- } |
+ A arg); |
- @override |
- R visitUnresolvedStaticGetterPostfix( |
+ R handleStaticFieldPostfixPrefix( |
Send node, |
- Element element, |
- FunctionElement setter, |
+ FieldElement field, |
IncDecOperator operator, |
- A arg) { |
- return handleUnresolvedStaticGetterPostfixPrefix( |
- node, element, setter, operator, arg, isPrefix: false); |
- } |
+ A arg, |
+ {bool isPrefix}); |
- @override |
- R visitUnresolvedStaticGetterPrefix( |
+ R handleStaticGetterSetterCompound( |
Send node, |
- Element element, |
+ FunctionElement getter, |
FunctionElement setter, |
- IncDecOperator operator, |
- A arg) { |
- return handleUnresolvedStaticGetterPostfixPrefix( |
- node, element, setter, operator, arg, isPrefix: true); |
- } |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg); |
- @override |
- R visitUnresolvedStaticSetterCompound( |
+ R handleStaticGetterSetterPostfixPrefix( |
Send node, |
FunctionElement getter, |
- Element element, |
+ FunctionElement setter, |
+ IncDecOperator operator, |
+ A arg, |
+ {bool isPrefix}); |
+ |
+ R handleStaticMethodSetterCompound( |
+ Send node, |
+ FunctionElement method, |
+ FunctionElement setter, |
AssignmentOperator operator, |
Node rhs, |
- A arg) { |
- return handleUnresolvedStaticSetterCompound( |
- node, getter, element, operator, rhs, arg); |
- } |
+ A arg); |
- @override |
- R visitUnresolvedStaticSetterPostfix( |
+ R handleStaticMethodSetterPostfixPrefix( |
Send node, |
FunctionElement getter, |
- Element element, |
+ FunctionElement setter, |
IncDecOperator operator, |
- A arg) { |
- return handleUnresolvedStaticSetterPostfixPrefix( |
- node, getter, element, operator, arg, isPrefix: false); |
- } |
+ A arg, |
+ {bool isPrefix}); |
- @override |
- R visitUnresolvedStaticSetterPrefix( |
+ R handleFinalStaticFieldCompound( |
Send node, |
- FunctionElement getter, |
- Element element, |
+ FieldElement field, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg); |
+ |
+ R handleFinalStaticFieldPostfixPrefix( |
+ Send node, |
+ FieldElement field, |
IncDecOperator operator, |
- A arg) { |
- return handleUnresolvedStaticSetterPostfixPrefix( |
- node, getter, element, operator, arg, isPrefix: true); |
- } |
-} |
+ A arg, |
+ {bool isPrefix}); |
-/// Mixin that groups all non-compound `visitLocalX` and `visitParameterX` |
-/// methods by delegating calls to `handleLocalX` methods. |
-/// |
-/// This mixin is useful for the cases where both parameters, local variables, |
-/// and local functions, captured or not, are handled uniformly. |
-abstract class BaseImplementationOfLocalsMixin<R, A> |
- implements SemanticSendVisitor<R, A> { |
- R handleLocalGet( |
+ R handleStaticMethodCompound( |
Send node, |
- LocalElement element, |
+ FunctionElement method, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg); |
- R handleLocalInvoke( |
+ R handleStaticMethodPostfixPrefix( |
Send node, |
- LocalElement element, |
- NodeList arguments, |
- CallStructure callStructure, |
- A arg); |
+ FunctionElement method, |
+ IncDecOperator operator, |
+ A arg, |
+ {bool isPrefix}); |
- R handleLocalSet( |
- SendSet node, |
- LocalElement element, |
+ R handleUnresolvedStaticGetterCompound( |
+ Send node, |
+ Element element, |
+ FunctionElement setter, |
+ AssignmentOperator operator, |
Node rhs, |
A arg); |
- R handleImmutableLocalSet( |
- SendSet node, |
- LocalElement element, |
+ R handleUnresolvedStaticGetterPostfixPrefix( |
+ Send node, |
+ Element element, |
+ FunctionElement setter, |
+ IncDecOperator operator, |
+ A arg, |
+ {bool isPrefix}); |
+ |
+ R handleUnresolvedStaticSetterCompound( |
+ Send node, |
+ FunctionElement getter, |
+ Element element, |
+ AssignmentOperator operator, |
Node rhs, |
A arg); |
+ R handleUnresolvedStaticSetterPostfixPrefix( |
+ Send node, |
+ FunctionElement getter, |
+ Element element, |
+ IncDecOperator operator, |
+ A arg, |
+ {bool isPrefix}); |
+ |
@override |
- R visitLocalFunctionGet( |
+ R visitStaticFieldCompound( |
Send node, |
- LocalFunctionElement function, |
+ FieldElement field, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
- return handleLocalGet(node, function, arg); |
+ return handleStaticFieldCompound(node, field, operator, rhs, arg); |
} |
@override |
- R visitLocalFunctionInvoke( |
+ R visitStaticFieldPostfix( |
Send node, |
- LocalFunctionElement function, |
- NodeList arguments, |
- CallStructure callStructure, |
+ FieldElement field, |
+ IncDecOperator operator, |
A arg) { |
- return handleLocalInvoke(node, function, arguments, callStructure, arg); |
+ return handleStaticFieldPostfixPrefix( |
+ node, field, operator, arg, isPrefix: false); |
} |
@override |
- R visitLocalFunctionIncompatibleInvoke( |
+ R visitStaticFieldPrefix( |
Send node, |
- LocalFunctionElement function, |
- NodeList arguments, |
- CallStructure callStructure, |
+ FieldElement field, |
+ IncDecOperator operator, |
A arg) { |
- return handleLocalInvoke(node, function, arguments, callStructure, arg); |
+ return handleStaticFieldPostfixPrefix( |
+ node, field, operator, arg, isPrefix: true); |
} |
@override |
- R visitLocalVariableGet( |
+ R visitStaticGetterSetterCompound( |
Send node, |
- LocalVariableElement variable, |
+ FunctionElement getter, |
+ FunctionElement setter, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
- return handleLocalGet(node, variable, arg); |
+ return handleStaticGetterSetterCompound( |
+ node, getter, setter, operator, rhs, arg); |
} |
@override |
- R visitLocalVariableInvoke( |
+ R visitStaticGetterSetterPostfix( |
Send node, |
- LocalVariableElement variable, |
- NodeList arguments, |
- CallStructure callStructure, |
+ FunctionElement getter, |
+ FunctionElement setter, |
+ IncDecOperator operator, |
A arg) { |
- return handleLocalInvoke(node, variable, arguments, callStructure, arg); |
+ return handleStaticGetterSetterPostfixPrefix( |
+ node, getter, setter, operator, arg, isPrefix: false); |
} |
@override |
- R visitLocalVariableSet( |
- SendSet node, |
- LocalVariableElement variable, |
- Node rhs, |
+ R visitStaticGetterSetterPrefix( |
+ Send node, |
+ FunctionElement getter, |
+ FunctionElement setter, |
+ IncDecOperator operator, |
A arg) { |
- return handleLocalSet(node, variable, rhs, arg); |
+ return handleStaticGetterSetterPostfixPrefix( |
+ node, getter, setter, operator, arg, isPrefix: true); |
} |
@override |
- R visitParameterGet( |
+ R visitStaticMethodSetterCompound( |
Send node, |
- ParameterElement parameter, |
+ FunctionElement method, |
+ FunctionElement setter, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
- return handleLocalGet(node, parameter, arg); |
+ return handleStaticMethodSetterCompound( |
+ node, method, setter, operator, rhs, arg); |
} |
@override |
- R visitParameterInvoke( |
+ R visitStaticMethodSetterPostfix( |
Send node, |
- ParameterElement parameter, |
- NodeList arguments, |
- CallStructure callStructure, |
+ FunctionElement getter, |
+ FunctionElement setter, |
+ IncDecOperator operator, |
A arg) { |
- return handleLocalInvoke(node, parameter, arguments, callStructure, arg); |
+ return handleStaticMethodSetterPostfixPrefix( |
+ node, getter, setter, operator, arg, isPrefix: false); |
} |
@override |
- R visitParameterSet( |
- SendSet node, |
- ParameterElement parameter, |
- Node rhs, |
+ R visitStaticMethodSetterPrefix( |
+ Send node, |
+ FunctionElement getter, |
+ FunctionElement setter, |
+ IncDecOperator operator, |
A arg) { |
- return handleLocalSet(node, parameter, rhs, arg); |
+ return handleStaticMethodSetterPostfixPrefix( |
+ node, getter, setter, operator, arg, isPrefix: true); |
} |
@override |
- R visitFinalLocalVariableSet( |
- SendSet node, |
- LocalVariableElement variable, |
- Node rhs, |
- A arg) { |
- return handleImmutableLocalSet(node, variable, rhs, arg); |
- } |
- |
- @override |
- R visitFinalParameterSet( |
- SendSet node, |
- ParameterElement parameter, |
+ R visitTopLevelFieldCompound( |
+ Send node, |
+ FieldElement field, |
+ AssignmentOperator operator, |
Node rhs, |
A arg) { |
- return handleImmutableLocalSet(node, parameter, rhs, arg); |
+ return handleStaticFieldCompound(node, field, operator, rhs, arg); |
} |
@override |
- R visitLocalFunctionSet( |
- SendSet node, |
- LocalFunctionElement function, |
- Node rhs, |
+ R visitTopLevelFieldPostfix( |
+ Send node, |
+ FieldElement field, |
+ IncDecOperator operator, |
A arg) { |
- return handleImmutableLocalSet(node, function, rhs, arg); |
+ return handleStaticFieldPostfixPrefix( |
+ node, field, operator, arg, isPrefix: false); |
} |
-} |
- |
-/// Mixin that groups all compound `visitLocalX` and `visitParameterX` methods |
-/// by delegating calls to `handleLocalX` methods. |
-/// |
-/// This mixin is useful for the cases where both parameters, local variables, |
-/// and local functions, captured or not, are handled uniformly. |
-abstract class BaseImplementationOfLocalCompoundsMixin<R, A> |
- implements SemanticSendVisitor<R, A> { |
- R handleLocalCompound( |
- Send node, |
- LocalElement element, |
- AssignmentOperator operator, |
- Node rhs, |
- A arg); |
- R handleLocalPostfixPrefix( |
+ @override |
+ R visitTopLevelFieldPrefix( |
Send node, |
- LocalElement element, |
+ FieldElement field, |
IncDecOperator operator, |
- A arg, |
- {bool isPrefix}); |
+ A arg) { |
+ return handleStaticFieldPostfixPrefix( |
+ node, field, operator, arg, isPrefix: true); |
+ } |
@override |
- R visitLocalVariableCompound( |
+ R visitTopLevelGetterSetterCompound( |
Send node, |
- LocalVariableElement variable, |
+ FunctionElement getter, |
+ FunctionElement setter, |
AssignmentOperator operator, |
Node rhs, |
A arg) { |
- return handleLocalCompound(node, variable, operator, rhs, arg); |
+ return handleStaticGetterSetterCompound( |
+ node, getter, setter, operator, rhs, arg); |
} |
@override |
- R visitLocalVariablePostfix( |
+ R visitTopLevelGetterSetterPostfix( |
Send node, |
- LocalVariableElement variable, |
+ FunctionElement getter, |
+ FunctionElement setter, |
IncDecOperator operator, |
A arg) { |
- return handleLocalPostfixPrefix( |
- node, variable, operator, arg, isPrefix: false); |
+ return handleStaticGetterSetterPostfixPrefix( |
+ node, getter, setter, operator, arg, isPrefix: false); |
} |
@override |
- R visitLocalVariablePrefix( |
+ R visitTopLevelGetterSetterPrefix( |
Send node, |
- LocalVariableElement variable, |
+ FunctionElement getter, |
+ FunctionElement setter, |
IncDecOperator operator, |
A arg) { |
- return handleLocalPostfixPrefix( |
- node, variable, operator, arg, isPrefix: true); |
+ return handleStaticGetterSetterPostfixPrefix( |
+ node, getter, setter, operator, arg, isPrefix: true); |
} |
@override |
- R visitParameterCompound( |
+ R visitTopLevelMethodSetterCompound( |
Send node, |
- ParameterElement parameter, |
+ FunctionElement method, |
+ FunctionElement setter, |
AssignmentOperator operator, |
Node rhs, |
A arg) { |
- return handleLocalCompound(node, parameter, operator, rhs, arg); |
+ return handleStaticMethodSetterCompound( |
+ node, method, setter, operator, rhs, arg); |
} |
@override |
- R visitParameterPostfix( |
+ R visitTopLevelMethodSetterPostfix( |
Send node, |
- ParameterElement parameter, |
+ FunctionElement method, |
+ FunctionElement setter, |
IncDecOperator operator, |
A arg) { |
- return handleLocalPostfixPrefix( |
- node, parameter, operator, arg, isPrefix: false); |
+ return handleStaticMethodSetterPostfixPrefix( |
+ node, method, setter, operator, arg, isPrefix: false); |
} |
@override |
- R visitParameterPrefix( |
+ R visitTopLevelMethodSetterPrefix( |
Send node, |
- ParameterElement parameter, |
+ FunctionElement method, |
+ FunctionElement setter, |
IncDecOperator operator, |
A arg) { |
- return handleLocalPostfixPrefix( |
- node, parameter, operator, arg, isPrefix: true); |
+ return handleStaticMethodSetterPostfixPrefix( |
+ node, method, setter, operator, arg, isPrefix: true); |
} |
-} |
- |
-/// Mixin that groups all `visitConstantX` and `visitXTypeLiteralY` methods for |
-/// constant type literals by delegating calls to `handleConstantX` methods. |
-/// |
-/// This mixin is useful for the cases where expressions on constants are |
-/// handled uniformly. |
-abstract class BaseImplementationOfConstantsMixin<R, A> |
- implements SemanticSendVisitor<R, A> { |
- R handleConstantGet( |
- Node node, |
- ConstantExpression constant, |
- A arg); |
- |
- R handleConstantInvoke( |
- Send node, |
- ConstantExpression constant, |
- NodeList arguments, |
- CallStructure callStructure, |
- A arg); |
@override |
- R visitClassTypeLiteralGet( |
+ R visitFinalStaticFieldCompound( |
Send node, |
- ConstantExpression constant, |
+ FieldElement field, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
- return handleConstantGet(node, constant, arg); |
+ return handleFinalStaticFieldCompound( |
+ node, field, operator, rhs, arg); |
} |
@override |
- R visitClassTypeLiteralInvoke( |
+ R visitFinalStaticFieldPostfix( |
Send node, |
- ConstantExpression constant, |
- NodeList arguments, |
- CallStructure callStructure, |
+ FieldElement field, |
+ IncDecOperator operator, |
A arg) { |
- return handleConstantInvoke(node, constant, arguments, callStructure, arg); |
+ return handleFinalStaticFieldPostfixPrefix( |
+ node, field, operator, arg, isPrefix: false); |
} |
@override |
- R visitConstConstructorInvoke( |
- NewExpression node, |
- ConstructedConstantExpression constant, |
+ R visitFinalStaticFieldPrefix( |
+ Send node, |
+ FieldElement field, |
+ IncDecOperator operator, |
A arg) { |
- return handleConstantGet(node, constant, arg); |
+ return handleFinalStaticFieldPostfixPrefix( |
+ node, field, operator, arg, isPrefix: true); |
} |
@override |
- R visitBoolFromEnvironmentConstructorInvoke( |
- NewExpression node, |
- BoolFromEnvironmentConstantExpression constant, |
+ R visitStaticMethodCompound( |
+ Send node, |
+ FunctionElement method, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
- return handleConstantGet(node, constant, arg); |
+ return handleStaticMethodCompound( |
+ node, method, operator, rhs, arg); |
} |
@override |
- R visitIntFromEnvironmentConstructorInvoke( |
- NewExpression node, |
- IntFromEnvironmentConstantExpression constant, |
+ R visitStaticMethodPostfix( |
+ Send node, |
+ FunctionElement method, |
+ IncDecOperator operator, |
A arg) { |
- return handleConstantGet(node, constant, arg); |
+ return handleStaticMethodPostfixPrefix( |
+ node, method, operator, arg, isPrefix: false); |
} |
@override |
- R visitStringFromEnvironmentConstructorInvoke( |
- NewExpression node, |
- StringFromEnvironmentConstantExpression constant, |
+ R visitStaticMethodPrefix( |
+ Send node, |
+ FunctionElement method, |
+ IncDecOperator operator, |
A arg) { |
- return handleConstantGet(node, constant, arg); |
+ return handleStaticMethodPostfixPrefix( |
+ node, method, operator, arg, isPrefix: true); |
} |
@override |
- R visitConstantGet( |
+ R visitUnresolvedStaticGetterCompound( |
Send node, |
- ConstantExpression constant, |
+ Element element, |
+ FunctionElement setter, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
- return handleConstantGet(node, constant, arg); |
+ return handleUnresolvedStaticGetterCompound( |
+ node, element, setter, operator, rhs, arg); |
} |
@override |
- R visitConstantInvoke( |
+ R visitUnresolvedStaticGetterPostfix( |
Send node, |
- ConstantExpression constant, |
- NodeList arguments, |
- CallStructure callStructure, |
+ Element element, |
+ FunctionElement setter, |
+ IncDecOperator operator, |
A arg) { |
- return handleConstantInvoke(node, constant, arguments, callStructure, arg); |
+ return handleUnresolvedStaticGetterPostfixPrefix( |
+ node, element, setter, operator, arg, isPrefix: false); |
} |
@override |
- R visitDynamicTypeLiteralGet( |
+ R visitUnresolvedStaticGetterPrefix( |
Send node, |
- ConstantExpression constant, |
+ Element element, |
+ FunctionElement setter, |
+ IncDecOperator operator, |
A arg) { |
- return handleConstantGet(node, constant, arg); |
+ return handleUnresolvedStaticGetterPostfixPrefix( |
+ node, element, setter, operator, arg, isPrefix: true); |
} |
@override |
- R visitDynamicTypeLiteralInvoke( |
+ R visitUnresolvedStaticSetterCompound( |
Send node, |
- ConstantExpression constant, |
- NodeList arguments, |
- CallStructure callStructure, |
+ FunctionElement getter, |
+ Element element, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
- return handleConstantInvoke(node, constant, arguments, callStructure, arg); |
+ return handleUnresolvedStaticSetterCompound( |
+ node, getter, element, operator, rhs, arg); |
} |
@override |
- R visitTypedefTypeLiteralGet( |
+ R visitUnresolvedStaticSetterPostfix( |
Send node, |
- ConstantExpression constant, |
+ FunctionElement getter, |
+ Element element, |
+ IncDecOperator operator, |
A arg) { |
- return handleConstantGet(node, constant, arg); |
+ return handleUnresolvedStaticSetterPostfixPrefix( |
+ node, getter, element, operator, arg, isPrefix: false); |
} |
@override |
- R visitTypedefTypeLiteralInvoke( |
+ R visitUnresolvedStaticSetterPrefix( |
Send node, |
- ConstantExpression constant, |
- NodeList arguments, |
- CallStructure callStructure, |
+ FunctionElement getter, |
+ Element element, |
+ IncDecOperator operator, |
A arg) { |
- return handleConstantInvoke(node, constant, arguments, callStructure, arg); |
+ return handleUnresolvedStaticSetterPostfixPrefix( |
+ node, getter, element, operator, arg, isPrefix: true); |
} |
} |
-/// Mixin that groups all non-compound `visitDynamicPropertyX` and |
-/// `visitThisPropertyY` methods for by delegating calls to `handleDynamicX` |
-/// methods, providing `null` as the receiver for the this properties. |
+/// Mixin that groups all non-compound `visitLocalX` and `visitParameterX` |
+/// methods by delegating calls to `handleLocalX` methods. |
/// |
-/// This mixin is useful for the cases where dynamic and this properties are |
-/// handled uniformly. |
-abstract class BaseImplementationOfDynamicsMixin<R, A> |
+/// This mixin is useful for the cases where both parameters, local variables, |
+/// and local functions, captured or not, are handled uniformly. |
+abstract class BaseImplementationOfLocalsMixin<R, A> |
implements SemanticSendVisitor<R, A> { |
- R handleDynamicGet( |
+ R handleLocalGet( |
Send node, |
- Node receiver, |
- Name name, |
+ LocalElement element, |
A arg); |
- R handleDynamicInvoke( |
+ R handleLocalInvoke( |
Send node, |
- Node receiver, |
+ LocalElement element, |
NodeList arguments, |
- Selector selector, |
+ CallStructure callStructure, |
A arg); |
- R handleDynamicSet( |
+ R handleLocalSet( |
SendSet node, |
- Node receiver, |
- Name name, |
+ LocalElement element, |
+ Node rhs, |
+ A arg); |
+ |
+ R handleImmutableLocalSet( |
+ SendSet node, |
+ LocalElement element, |
Node rhs, |
A arg); |
@override |
- R visitDynamicPropertyGet( |
+ R visitLocalFunctionGet( |
Send node, |
- Node receiver, |
- Name name, |
+ LocalFunctionElement function, |
A arg) { |
- return handleDynamicGet(node, receiver, name, arg); |
+ return handleLocalGet(node, function, arg); |
} |
@override |
- R visitIfNotNullDynamicPropertyGet( |
+ R visitLocalFunctionInvoke( |
Send node, |
- Node receiver, |
- Name name, |
+ LocalFunctionElement function, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- // TODO(johnniwinther): should these redirect to handleDynamicX? |
- return handleDynamicGet(node, receiver, name, arg); |
+ return handleLocalInvoke(node, function, arguments, callStructure, arg); |
} |
@override |
- R visitDynamicPropertyInvoke( |
+ R visitLocalFunctionIncompatibleInvoke( |
Send node, |
- Node receiver, |
+ LocalFunctionElement function, |
NodeList arguments, |
- Selector selector, |
+ CallStructure callStructure, |
A arg) { |
- return handleDynamicInvoke(node, receiver, arguments, selector, arg); |
+ return handleLocalInvoke(node, function, arguments, callStructure, arg); |
} |
@override |
- R visitIfNotNullDynamicPropertyInvoke( |
+ R visitLocalVariableGet( |
Send node, |
- Node receiver, |
- NodeList arguments, |
- Selector selector, |
+ LocalVariableElement variable, |
A arg) { |
- return handleDynamicInvoke(node, receiver, arguments, selector, arg); |
+ return handleLocalGet(node, variable, arg); |
} |
@override |
- R visitDynamicPropertySet( |
- SendSet node, |
- Node receiver, |
- Name name, |
- Node rhs, |
+ R visitLocalVariableInvoke( |
+ Send node, |
+ LocalVariableElement variable, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return handleDynamicSet(node, receiver, name, rhs, arg); |
+ return handleLocalInvoke(node, variable, arguments, callStructure, arg); |
} |
@override |
- R visitIfNotNullDynamicPropertySet( |
+ R visitLocalVariableSet( |
SendSet node, |
- Node receiver, |
- Name name, |
+ LocalVariableElement variable, |
Node rhs, |
A arg) { |
- return handleDynamicSet(node, receiver, name, rhs, arg); |
+ return handleLocalSet(node, variable, rhs, arg); |
} |
@override |
- R visitThisPropertyGet( |
+ R visitParameterGet( |
Send node, |
- Name name, |
+ ParameterElement parameter, |
A arg) { |
- return handleDynamicGet(node, null, name, arg); |
+ return handleLocalGet(node, parameter, arg); |
} |
@override |
- R visitThisPropertyInvoke( |
+ R visitParameterInvoke( |
Send node, |
+ ParameterElement parameter, |
NodeList arguments, |
- Selector selector, |
+ CallStructure callStructure, |
A arg) { |
- return handleDynamicInvoke(node, null, arguments, selector, arg); |
+ return handleLocalInvoke(node, parameter, arguments, callStructure, arg); |
} |
@override |
- R visitThisPropertySet( |
+ R visitParameterSet( |
SendSet node, |
- Name name, |
+ ParameterElement parameter, |
Node rhs, |
A arg) { |
- return handleDynamicSet(node, null, name, rhs, arg); |
+ return handleLocalSet(node, parameter, rhs, arg); |
+ } |
+ |
+ @override |
+ R visitFinalLocalVariableSet( |
+ SendSet node, |
+ LocalVariableElement variable, |
+ Node rhs, |
+ A arg) { |
+ return handleImmutableLocalSet(node, variable, rhs, arg); |
+ } |
+ |
+ @override |
+ R visitFinalParameterSet( |
+ SendSet node, |
+ ParameterElement parameter, |
+ Node rhs, |
+ A arg) { |
+ return handleImmutableLocalSet(node, parameter, rhs, arg); |
+ } |
+ |
+ @override |
+ R visitLocalFunctionSet( |
+ SendSet node, |
+ LocalFunctionElement function, |
+ Node rhs, |
+ A arg) { |
+ return handleImmutableLocalSet(node, function, rhs, arg); |
} |
} |
-/// Mixin that groups all compounds of `visitDynamicPropertyX` and |
-/// `visitThisPropertyY` methods for by delegating calls to `handleDynamicX` |
-/// methods, providing `null` as the receiver for the this properties. |
+/// Mixin that groups all compound `visitLocalX` and `visitParameterX` methods |
+/// by delegating calls to `handleLocalX` methods. |
/// |
-/// This mixin is useful for the cases where dynamic and this properties are |
-/// handled uniformly. |
-abstract class BaseImplementationOfDynamicCompoundsMixin<R, A> |
+/// This mixin is useful for the cases where both parameters, local variables, |
+/// and local functions, captured or not, are handled uniformly. |
+abstract class BaseImplementationOfLocalCompoundsMixin<R, A> |
implements SemanticSendVisitor<R, A> { |
- R handleDynamicCompound( |
+ R handleLocalCompound( |
Send node, |
- Node receiver, |
- Name name, |
+ LocalElement element, |
AssignmentOperator operator, |
Node rhs, |
A arg); |
- R handleDynamicPostfixPrefix( |
- Send node, |
- Node receiver, |
- Name name, |
- IncDecOperator operator, |
- A arg, |
- {bool isPrefix}); |
- |
- R handleDynamicIndexPostfixPrefix( |
+ R handleLocalPostfixPrefix( |
Send node, |
- Node receiver, |
- Node index, |
+ LocalElement element, |
IncDecOperator operator, |
A arg, |
{bool isPrefix}); |
@override |
- R visitDynamicPropertyCompound( |
+ R visitLocalVariableCompound( |
Send node, |
- Node receiver, |
- Name name, |
+ LocalVariableElement variable, |
AssignmentOperator operator, |
Node rhs, |
A arg) { |
- return handleDynamicCompound( |
- node, receiver, name, operator, rhs, arg); |
+ return handleLocalCompound(node, variable, operator, rhs, arg); |
} |
@override |
- R visitIfNotNullDynamicPropertyCompound( |
+ R visitLocalVariablePostfix( |
Send node, |
- Node receiver, |
- Name name, |
- AssignmentOperator operator, |
- Node rhs, |
+ LocalVariableElement variable, |
+ IncDecOperator operator, |
A arg) { |
- return handleDynamicCompound( |
- node, receiver, name, operator, rhs, arg); |
+ return handleLocalPostfixPrefix( |
+ node, variable, operator, arg, isPrefix: false); |
} |
@override |
- R visitDynamicPropertyPostfix( |
+ R visitLocalVariablePrefix( |
Send node, |
- Node receiver, |
- Name name, |
+ LocalVariableElement variable, |
IncDecOperator operator, |
A arg) { |
- return handleDynamicPostfixPrefix( |
- node, receiver, name, operator, arg, isPrefix: false); |
+ return handleLocalPostfixPrefix( |
+ node, variable, operator, arg, isPrefix: true); |
} |
@override |
- R visitIfNotNullDynamicPropertyPostfix( |
+ R visitParameterCompound( |
Send node, |
- Node receiver, |
- Name name, |
- IncDecOperator operator, |
+ ParameterElement parameter, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
- return handleDynamicPostfixPrefix( |
- node, receiver, name, operator, arg, isPrefix: false); |
+ return handleLocalCompound(node, parameter, operator, rhs, arg); |
} |
@override |
- R visitDynamicPropertyPrefix( |
+ R visitParameterPostfix( |
Send node, |
- Node receiver, |
- Name name, |
+ ParameterElement parameter, |
IncDecOperator operator, |
A arg) { |
- return handleDynamicPostfixPrefix( |
- node, receiver, name, operator, arg, isPrefix: true); |
+ return handleLocalPostfixPrefix( |
+ node, parameter, operator, arg, isPrefix: false); |
} |
@override |
- R visitIfNotNullDynamicPropertyPrefix( |
+ R visitParameterPrefix( |
Send node, |
- Node receiver, |
- Name name, |
+ ParameterElement parameter, |
IncDecOperator operator, |
A arg) { |
- return handleDynamicPostfixPrefix( |
- node, receiver, name, operator, arg, isPrefix: true); |
+ return handleLocalPostfixPrefix( |
+ node, parameter, operator, arg, isPrefix: true); |
} |
+} |
+ |
+/// Mixin that groups all `visitConstantX` and `visitXTypeLiteralY` methods for |
+/// constant type literals by delegating calls to `handleConstantX` methods. |
+/// |
+/// This mixin is useful for the cases where expressions on constants are |
+/// handled uniformly. |
+abstract class BaseImplementationOfConstantsMixin<R, A> |
+ implements SemanticSendVisitor<R, A> { |
+ R handleConstantGet( |
+ Node node, |
+ ConstantExpression constant, |
+ A arg); |
+ |
+ R handleConstantInvoke( |
+ Send node, |
+ ConstantExpression constant, |
+ NodeList arguments, |
+ CallStructure callStructure, |
+ A arg); |
@override |
- R visitThisPropertyCompound( |
+ R visitClassTypeLiteralGet( |
Send node, |
- Name name, |
- AssignmentOperator operator, |
- Node rhs, |
+ ConstantExpression constant, |
A arg) { |
- return handleDynamicCompound(node, null, name, operator, rhs, arg); |
+ return handleConstantGet(node, constant, arg); |
} |
@override |
- R visitThisPropertyPostfix( |
+ R visitClassTypeLiteralInvoke( |
Send node, |
- Name name, |
- IncDecOperator operator, |
+ ConstantExpression constant, |
+ NodeList arguments, |
+ CallStructure callStructure, |
A arg) { |
- return handleDynamicPostfixPrefix( |
- node, null, name, operator, arg, isPrefix: false); |
+ return handleConstantInvoke(node, constant, arguments, callStructure, arg); |
} |
@override |
- R visitThisPropertyPrefix( |
- Send node, |
- Name name, |
- IncDecOperator operator, |
+ R visitConstConstructorInvoke( |
+ NewExpression node, |
+ ConstructedConstantExpression constant, |
A arg) { |
- return handleDynamicPostfixPrefix( |
- node, null, name, operator, arg, isPrefix: true); |
+ return handleConstantGet(node, constant, arg); |
} |
@override |
- R visitIndexPostfix( |
- Send node, |
- Node receiver, |
- Node index, |
- IncDecOperator operator, |
+ R visitBoolFromEnvironmentConstructorInvoke( |
+ NewExpression node, |
+ BoolFromEnvironmentConstantExpression constant, |
A arg) { |
- return handleDynamicIndexPostfixPrefix( |
- node, receiver, index, operator, arg, isPrefix: false); |
+ return handleConstantGet(node, constant, arg); |
} |
@override |
- R visitIndexPrefix( |
- Send node, |
- Node receiver, |
- Node index, |
- IncDecOperator operator, |
+ R visitIntFromEnvironmentConstructorInvoke( |
+ NewExpression node, |
+ IntFromEnvironmentConstantExpression constant, |
A arg) { |
- return handleDynamicIndexPostfixPrefix( |
- node, receiver, index, operator, arg, isPrefix: true); |
+ return handleConstantGet(node, constant, arg); |
} |
-} |
-/// The getter kind for statically resolved compound expressions. |
-enum CompoundGetter { |
- /// The compound reads from a field. |
- FIELD, |
+ @override |
+ R visitStringFromEnvironmentConstructorInvoke( |
+ NewExpression node, |
+ StringFromEnvironmentConstantExpression constant, |
+ A arg) { |
+ return handleConstantGet(node, constant, arg); |
+ } |
- /// The compound reads from a getter. |
- GETTER, |
+ @override |
+ R visitConstantGet( |
+ Send node, |
+ ConstantExpression constant, |
+ A arg) { |
+ return handleConstantGet(node, constant, arg); |
+ } |
- /// The compound reads (closurizes) a method. |
- METHOD, |
+ @override |
+ R visitConstantInvoke( |
+ Send node, |
+ ConstantExpression constant, |
+ NodeList arguments, |
+ CallStructure callStructure, |
+ A arg) { |
+ return handleConstantInvoke(node, constant, arguments, callStructure, arg); |
+ } |
- /// The getter is unresolved. The accompanied element is an erroneous element. |
- UNRESOLVED, |
-} |
+ @override |
+ R visitDynamicTypeLiteralGet( |
+ Send node, |
+ ConstantExpression constant, |
+ A arg) { |
+ return handleConstantGet(node, constant, arg); |
+ } |
-/// The setter kind for statically resolved compound expressions. |
-enum CompoundSetter { |
- /// The compound writes to a field. |
- FIELD, |
+ @override |
+ R visitDynamicTypeLiteralInvoke( |
+ Send node, |
+ ConstantExpression constant, |
+ NodeList arguments, |
+ CallStructure callStructure, |
+ A arg) { |
+ return handleConstantInvoke(node, constant, arguments, callStructure, arg); |
+ } |
- /// The compound writes to a setter. |
- SETTER, |
+ @override |
+ R visitTypedefTypeLiteralGet( |
+ Send node, |
+ ConstantExpression constant, |
+ A arg) { |
+ return handleConstantGet(node, constant, arg); |
+ } |
- /// The setter is unresolved or unassignable. The accompanied element may be |
- /// `null`, and erroneous element, or the unassignable element. |
- INVALID, |
+ @override |
+ R visitTypedefTypeLiteralInvoke( |
+ Send node, |
+ ConstantExpression constant, |
+ NodeList arguments, |
+ CallStructure callStructure, |
+ A arg) { |
+ return handleConstantInvoke(node, constant, arguments, callStructure, arg); |
+ } |
} |
-/// The kind of a [CompoundRhs]. |
-enum CompoundKind { |
- /// A prefix expression, like `--a`. |
- PREFIX, |
- |
- /// A postfix expression, like `a++`. |
- POSTFIX, |
- |
- /// A compound assignment, like `a *= b`. |
- ASSIGNMENT, |
-} |
+/// Mixin that groups all non-compound `visitDynamicPropertyX` and |
+/// `visitThisPropertyY` methods for by delegating calls to `handleDynamicX` |
+/// methods, providing `null` as the receiver for the this properties. |
+/// |
+/// This mixin is useful for the cases where dynamic and this properties are |
+/// handled uniformly. |
+abstract class BaseImplementationOfDynamicsMixin<R, A> |
+ implements SemanticSendVisitor<R, A> { |
+ R handleDynamicGet( |
+ Send node, |
+ Node receiver, |
+ Name name, |
+ A arg); |
-/// The right-hand side of a compound expression. |
-abstract class CompoundRhs { |
- /// The kind of compound. |
- CompoundKind get kind; |
+ R handleDynamicInvoke( |
+ Send node, |
+ Node receiver, |
+ NodeList arguments, |
+ Selector selector, |
+ A arg); |
- /// The binary operator implied by the compound operator. |
- BinaryOperator get operator; |
+ R handleDynamicSet( |
+ SendSet node, |
+ Node receiver, |
+ Name name, |
+ Node rhs, |
+ A arg); |
- /// The explicit right hand side in case of a compound assignment, `null` |
- /// otherwise. |
- Node get rhs; |
-} |
+ @override |
+ R visitDynamicPropertyGet( |
+ Send node, |
+ Node receiver, |
+ Name name, |
+ A arg) { |
+ return handleDynamicGet(node, receiver, name, arg); |
+ } |
-/// A prefix or postfix of [incDecOperator]. |
-class IncDecCompound implements CompoundRhs { |
- final CompoundKind kind; |
- final IncDecOperator incDecOperator; |
+ @override |
+ R visitIfNotNullDynamicPropertyGet( |
+ Send node, |
+ Node receiver, |
+ Name name, |
+ A arg) { |
+ // TODO(johnniwinther): should these redirect to handleDynamicX? |
+ return handleDynamicGet(node, receiver, name, arg); |
+ } |
- IncDecCompound(this.kind, this.incDecOperator); |
+ @override |
+ R visitDynamicPropertyInvoke( |
+ Send node, |
+ Node receiver, |
+ NodeList arguments, |
+ Selector selector, |
+ A arg) { |
+ return handleDynamicInvoke(node, receiver, arguments, selector, arg); |
+ } |
- BinaryOperator get operator => incDecOperator.binaryOperator; |
+ @override |
+ R visitIfNotNullDynamicPropertyInvoke( |
+ Send node, |
+ Node receiver, |
+ NodeList arguments, |
+ Selector selector, |
+ A arg) { |
+ return handleDynamicInvoke(node, receiver, arguments, selector, arg); |
+ } |
- Node get rhs => null; |
-} |
+ @override |
+ R visitDynamicPropertySet( |
+ SendSet node, |
+ Node receiver, |
+ Name name, |
+ Node rhs, |
+ A arg) { |
+ return handleDynamicSet(node, receiver, name, rhs, arg); |
+ } |
-/// A compound assignment with [assignmentOperator] and [rhs]. |
-class AssignmentCompound implements CompoundRhs { |
- final AssignmentOperator assignmentOperator; |
- final Node rhs; |
+ @override |
+ R visitIfNotNullDynamicPropertySet( |
+ SendSet node, |
+ Node receiver, |
+ Name name, |
+ Node rhs, |
+ A arg) { |
+ return handleDynamicSet(node, receiver, name, rhs, arg); |
+ } |
- AssignmentCompound(this.assignmentOperator, this.rhs); |
+ @override |
+ R visitThisPropertyGet( |
+ Send node, |
+ Name name, |
+ A arg) { |
+ return handleDynamicGet(node, null, name, arg); |
+ } |
- CompoundKind get kind => CompoundKind.ASSIGNMENT; |
+ @override |
+ R visitThisPropertyInvoke( |
+ Send node, |
+ NodeList arguments, |
+ Selector selector, |
+ A arg) { |
+ return handleDynamicInvoke(node, null, arguments, selector, arg); |
+ } |
- BinaryOperator get operator => assignmentOperator.binaryOperator; |
+ @override |
+ R visitThisPropertySet( |
+ SendSet node, |
+ Name name, |
+ Node rhs, |
+ A arg) { |
+ return handleDynamicSet(node, null, name, rhs, arg); |
+ } |
} |
-/// Simplified handling of compound assignments and prefix/postfix expressions. |
-abstract class BaseImplementationOfCompoundsMixin<R, A> |
+/// Mixin that groups all compounds of `visitDynamicPropertyX` and |
+/// `visitThisPropertyY` methods for by delegating calls to `handleDynamicX` |
+/// methods, providing `null` as the receiver for the this properties. |
+/// |
+/// This mixin is useful for the cases where dynamic and this properties are |
+/// handled uniformly. |
+abstract class BaseImplementationOfDynamicCompoundsMixin<R, A> |
implements SemanticSendVisitor<R, A> { |
+ R handleDynamicCompound( |
+ Send node, |
+ Node receiver, |
+ Name name, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg); |
- /// Handle a super compounds, like `super.foo += 42` or `--super.bar`. |
- R handleSuperCompounds( |
- SendSet node, |
- Element getter, |
- CompoundGetter getterKind, |
- Element setter, |
- CompoundSetter setterKind, |
+ R handleDynamicPostfixPrefix( |
+ Send node, |
+ Node receiver, |
+ Name name, |
+ IncDecOperator operator, |
+ A arg, |
+ {bool isPrefix}); |
+ |
+ R handleDynamicIndexPostfixPrefix( |
+ Send node, |
+ Node receiver, |
+ Node index, |
+ IncDecOperator operator, |
+ A arg, |
+ {bool isPrefix}); |
+ |
+ @override |
+ R visitDynamicPropertyCompound( |
+ Send node, |
+ Node receiver, |
+ Name name, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return handleDynamicCompound( |
+ node, receiver, name, operator, rhs, arg); |
+ } |
+ |
+ @override |
+ R visitIfNotNullDynamicPropertyCompound( |
+ Send node, |
+ Node receiver, |
+ Name name, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return handleDynamicCompound( |
+ node, receiver, name, operator, rhs, arg); |
+ } |
+ |
+ @override |
+ R visitDynamicPropertyPostfix( |
+ Send node, |
+ Node receiver, |
+ Name name, |
+ IncDecOperator operator, |
+ A arg) { |
+ return handleDynamicPostfixPrefix( |
+ node, receiver, name, operator, arg, isPrefix: false); |
+ } |
+ |
+ @override |
+ R visitIfNotNullDynamicPropertyPostfix( |
+ Send node, |
+ Node receiver, |
+ Name name, |
+ IncDecOperator operator, |
+ A arg) { |
+ return handleDynamicPostfixPrefix( |
+ node, receiver, name, operator, arg, isPrefix: false); |
+ } |
+ |
+ @override |
+ R visitDynamicPropertyPrefix( |
+ Send node, |
+ Node receiver, |
+ Name name, |
+ IncDecOperator operator, |
+ A arg) { |
+ return handleDynamicPostfixPrefix( |
+ node, receiver, name, operator, arg, isPrefix: true); |
+ } |
+ |
+ @override |
+ R visitIfNotNullDynamicPropertyPrefix( |
+ Send node, |
+ Node receiver, |
+ Name name, |
+ IncDecOperator operator, |
+ A arg) { |
+ return handleDynamicPostfixPrefix( |
+ node, receiver, name, operator, arg, isPrefix: true); |
+ } |
+ |
+ @override |
+ R visitThisPropertyCompound( |
+ Send node, |
+ Name name, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return handleDynamicCompound(node, null, name, operator, rhs, arg); |
+ } |
+ |
+ @override |
+ R visitThisPropertyPostfix( |
+ Send node, |
+ Name name, |
+ IncDecOperator operator, |
+ A arg) { |
+ return handleDynamicPostfixPrefix( |
+ node, null, name, operator, arg, isPrefix: false); |
+ } |
+ |
+ @override |
+ R visitThisPropertyPrefix( |
+ Send node, |
+ Name name, |
+ IncDecOperator operator, |
+ A arg) { |
+ return handleDynamicPostfixPrefix( |
+ node, null, name, operator, arg, isPrefix: true); |
+ } |
+ |
+ @override |
+ R visitIndexPostfix( |
+ Send node, |
+ Node receiver, |
+ Node index, |
+ IncDecOperator operator, |
+ A arg) { |
+ return handleDynamicIndexPostfixPrefix( |
+ node, receiver, index, operator, arg, isPrefix: false); |
+ } |
+ |
+ @override |
+ R visitIndexPrefix( |
+ Send node, |
+ Node receiver, |
+ Node index, |
+ IncDecOperator operator, |
+ A arg) { |
+ return handleDynamicIndexPostfixPrefix( |
+ node, receiver, index, operator, arg, isPrefix: true); |
+ } |
+} |
+ |
+/// The getter kind for statically resolved compound expressions. |
+enum CompoundGetter { |
+ /// The compound reads from a field. |
+ FIELD, |
+ |
+ /// The compound reads from a getter. |
+ GETTER, |
+ |
+ /// The compound reads (closurizes) a method. |
+ METHOD, |
+ |
+ /// The getter is unresolved. The accompanied element is an erroneous element. |
+ UNRESOLVED, |
+} |
+ |
+/// The setter kind for statically resolved compound expressions. |
+enum CompoundSetter { |
+ /// The compound writes to a field. |
+ FIELD, |
+ |
+ /// The compound writes to a setter. |
+ SETTER, |
+ |
+ /// The setter is unresolved or unassignable. The accompanied element may be |
+ /// `null`, and erroneous element, or the unassignable element. |
+ INVALID, |
+} |
+ |
+/// The kind of a [CompoundRhs]. |
+enum CompoundKind { |
+ /// A prefix expression, like `--a`. |
+ PREFIX, |
+ |
+ /// A postfix expression, like `a++`. |
+ POSTFIX, |
+ |
+ /// A compound assignment, like `a *= b`. |
+ ASSIGNMENT, |
+} |
+ |
+/// The right-hand side of a compound expression. |
+abstract class CompoundRhs { |
+ /// The kind of compound. |
+ CompoundKind get kind; |
+ |
+ /// The binary operator implied by the compound operator. |
+ BinaryOperator get operator; |
+ |
+ /// The explicit right hand side in case of a compound assignment, `null` |
+ /// otherwise. |
+ Node get rhs; |
+} |
+ |
+/// A prefix or postfix of [incDecOperator]. |
+class IncDecCompound implements CompoundRhs { |
+ final CompoundKind kind; |
+ final IncDecOperator incDecOperator; |
+ |
+ IncDecCompound(this.kind, this.incDecOperator); |
+ |
+ BinaryOperator get operator => incDecOperator.binaryOperator; |
+ |
+ Node get rhs => null; |
+} |
+ |
+/// A compound assignment with [assignmentOperator] and [rhs]. |
+class AssignmentCompound implements CompoundRhs { |
+ final AssignmentOperator assignmentOperator; |
+ final Node rhs; |
+ |
+ AssignmentCompound(this.assignmentOperator, this.rhs); |
+ |
+ CompoundKind get kind => CompoundKind.ASSIGNMENT; |
+ |
+ BinaryOperator get operator => assignmentOperator.binaryOperator; |
+} |
+ |
+/// Simplified handling of compound assignments and prefix/postfix expressions. |
+abstract class BaseImplementationOfCompoundsMixin<R, A> |
+ implements SemanticSendVisitor<R, A> { |
+ |
+ /// Handle a super compounds, like `super.foo += 42` or `--super.bar`. |
+ R handleSuperCompounds( |
+ SendSet node, |
+ Element getter, |
+ CompoundGetter getterKind, |
+ Element setter, |
+ CompoundSetter setterKind, |
CompoundRhs rhs, |
A arg); |
@@ -8457,400 +9248,714 @@ abstract class BaseImplementationOfCompoundsMixin<R, A> |
R visitDynamicPropertyCompound( |
Send node, |
- Node receiver, |
- Name name, |
+ Node receiver, |
+ Name name, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return handleDynamicCompounds( |
+ node, |
+ receiver, |
+ name, |
+ new AssignmentCompound(operator, rhs), |
+ arg); |
+ } |
+ |
+ R visitIfNotNullDynamicPropertyCompound( |
+ Send node, |
+ Node receiver, |
+ Name name, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return handleDynamicCompounds( |
+ node, |
+ receiver, |
+ name, |
+ new AssignmentCompound(operator, rhs), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitThisPropertyCompound( |
+ Send node, |
+ Name name, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return handleDynamicCompounds( |
+ node, |
+ null, |
+ name, |
+ new AssignmentCompound(operator, rhs), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitParameterCompound( |
+ Send node, |
+ ParameterElement parameter, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return handleLocalCompounds( |
+ node, |
+ parameter, |
+ new AssignmentCompound(operator, rhs), |
+ arg, |
+ isSetterValid: true); |
+ } |
+ |
+ @override |
+ R visitFinalParameterCompound( |
+ Send node, |
+ ParameterElement parameter, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return handleLocalCompounds( |
+ node, |
+ parameter, |
+ new AssignmentCompound(operator, rhs), |
+ arg, |
+ isSetterValid: false); |
+ } |
+ |
+ @override |
+ R visitLocalVariableCompound( |
+ Send node, |
+ LocalVariableElement variable, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return handleLocalCompounds( |
+ node, |
+ variable, |
+ new AssignmentCompound(operator, rhs), |
+ arg, |
+ isSetterValid: true); |
+ } |
+ |
+ @override |
+ R visitFinalLocalVariableCompound( |
+ Send node, |
+ LocalVariableElement variable, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return handleLocalCompounds( |
+ node, |
+ variable, |
+ new AssignmentCompound(operator, rhs), |
+ arg, |
+ isSetterValid: false); |
+ } |
+ |
+ @override |
+ R visitLocalFunctionCompound( |
+ Send node, |
+ LocalFunctionElement function, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return handleLocalCompounds( |
+ node, |
+ function, |
+ new AssignmentCompound(operator, rhs), |
+ arg, |
+ isSetterValid: false); |
+ } |
+ |
+ @override |
+ R visitStaticFieldCompound( |
+ Send node, |
+ FieldElement field, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return handleStaticCompounds( |
+ node, |
+ field, CompoundGetter.FIELD, |
+ field, CompoundSetter.FIELD, |
+ new AssignmentCompound(operator, rhs), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitFinalStaticFieldCompound( |
+ Send node, |
+ FieldElement field, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return handleStaticCompounds( |
+ node, |
+ field, CompoundGetter.FIELD, |
+ null, CompoundSetter.INVALID, |
+ new AssignmentCompound(operator, rhs), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitStaticGetterSetterCompound( |
+ Send node, |
+ FunctionElement getter, |
+ FunctionElement setter, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return handleStaticCompounds( |
+ node, |
+ getter, CompoundGetter.GETTER, |
+ setter, CompoundSetter.SETTER, |
+ new AssignmentCompound(operator, rhs), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitStaticMethodSetterCompound( |
+ Send node, |
+ FunctionElement method, |
+ FunctionElement setter, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return handleStaticCompounds( |
+ node, |
+ method, CompoundGetter.METHOD, |
+ setter, CompoundSetter.SETTER, |
+ new AssignmentCompound(operator, rhs), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitTopLevelFieldCompound( |
+ Send node, |
+ FieldElement field, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return handleStaticCompounds( |
+ node, |
+ field, CompoundGetter.FIELD, |
+ field, CompoundSetter.FIELD, |
+ new AssignmentCompound(operator, rhs), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitFinalTopLevelFieldCompound( |
+ Send node, |
+ FieldElement field, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return handleStaticCompounds( |
+ node, |
+ field, CompoundGetter.FIELD, |
+ null, CompoundSetter.INVALID, |
+ new AssignmentCompound(operator, rhs), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitTopLevelGetterSetterCompound( |
+ Send node, |
+ FunctionElement getter, |
+ FunctionElement setter, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return handleStaticCompounds( |
+ node, |
+ getter, CompoundGetter.GETTER, |
+ setter, CompoundSetter.SETTER, |
+ new AssignmentCompound(operator, rhs), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitTopLevelMethodSetterCompound( |
+ Send node, |
+ FunctionElement method, |
+ FunctionElement setter, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return handleStaticCompounds( |
+ node, |
+ method, CompoundGetter.METHOD, |
+ setter, CompoundSetter.SETTER, |
+ new AssignmentCompound(operator, rhs), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitSuperFieldCompound( |
+ Send node, |
+ FieldElement field, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return handleSuperCompounds( |
+ node, |
+ field, CompoundGetter.FIELD, |
+ field, CompoundSetter.FIELD, |
+ new AssignmentCompound(operator, rhs), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitFinalSuperFieldCompound( |
+ Send node, |
+ FieldElement field, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return handleSuperCompounds( |
+ node, |
+ field, CompoundGetter.FIELD, |
+ field, CompoundSetter.INVALID, |
+ new AssignmentCompound(operator, rhs), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitSuperGetterSetterCompound( |
+ Send node, |
+ FunctionElement getter, |
+ FunctionElement setter, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return handleSuperCompounds( |
+ node, |
+ getter, CompoundGetter.GETTER, |
+ setter, CompoundSetter.SETTER, |
+ new AssignmentCompound(operator, rhs), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitSuperMethodSetterCompound( |
+ Send node, |
+ FunctionElement method, |
+ FunctionElement setter, |
+ AssignmentOperator operator, |
+ Node rhs, |
+ A arg) { |
+ return handleSuperCompounds( |
+ node, |
+ method, CompoundGetter.METHOD, |
+ setter, CompoundSetter.SETTER, |
+ new AssignmentCompound(operator, rhs), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitSuperFieldSetterCompound( |
+ Send node, |
+ FieldElement field, |
+ FunctionElement setter, |
AssignmentOperator operator, |
Node rhs, |
A arg) { |
- return handleDynamicCompounds( |
+ return handleSuperCompounds( |
node, |
- receiver, |
- name, |
+ field, CompoundGetter.FIELD, |
+ setter, CompoundSetter.SETTER, |
new AssignmentCompound(operator, rhs), |
arg); |
} |
- R visitIfNotNullDynamicPropertyCompound( |
+ @override |
+ R visitSuperGetterFieldCompound( |
Send node, |
- Node receiver, |
- Name name, |
+ FunctionElement getter, |
+ FieldElement field, |
AssignmentOperator operator, |
Node rhs, |
A arg) { |
- return handleDynamicCompounds( |
+ return handleSuperCompounds( |
node, |
- receiver, |
- name, |
+ getter, CompoundGetter.GETTER, |
+ field, CompoundSetter.FIELD, |
new AssignmentCompound(operator, rhs), |
arg); |
} |
@override |
- R visitThisPropertyCompound( |
+ R visitClassTypeLiteralCompound( |
Send node, |
- Name name, |
+ ConstantExpression constant, |
AssignmentOperator operator, |
Node rhs, |
A arg) { |
- return handleDynamicCompounds( |
+ return handleTypeLiteralConstantCompounds( |
node, |
- null, |
- name, |
+ constant, |
new AssignmentCompound(operator, rhs), |
arg); |
} |
@override |
- R visitParameterCompound( |
+ R visitTypedefTypeLiteralCompound( |
Send node, |
- ParameterElement parameter, |
+ ConstantExpression constant, |
AssignmentOperator operator, |
Node rhs, |
A arg) { |
- return handleLocalCompounds( |
+ return handleTypeLiteralConstantCompounds( |
node, |
- parameter, |
+ constant, |
new AssignmentCompound(operator, rhs), |
- arg, |
- isSetterValid: true); |
+ arg); |
} |
@override |
- R visitFinalParameterCompound( |
+ R visitTypeVariableTypeLiteralCompound( |
Send node, |
- ParameterElement parameter, |
+ TypeVariableElement element, |
AssignmentOperator operator, |
Node rhs, |
A arg) { |
- return handleLocalCompounds( |
+ return handleTypeVariableTypeLiteralCompounds( |
node, |
- parameter, |
+ element, |
new AssignmentCompound(operator, rhs), |
- arg, |
- isSetterValid: false); |
+ arg); |
} |
@override |
- R visitLocalVariableCompound( |
+ R visitDynamicTypeLiteralCompound( |
Send node, |
- LocalVariableElement variable, |
+ ConstantExpression constant, |
AssignmentOperator operator, |
Node rhs, |
A arg) { |
- return handleLocalCompounds( |
+ return handleTypeLiteralConstantCompounds( |
node, |
- variable, |
+ constant, |
new AssignmentCompound(operator, rhs), |
+ arg); |
+ } |
+ |
+ |
+ R visitDynamicPropertyPrefix( |
+ Send node, |
+ Node receiver, |
+ Name name, |
+ IncDecOperator operator, |
+ A arg) { |
+ return handleDynamicCompounds( |
+ node, |
+ receiver, |
+ name, |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
+ arg); |
+ } |
+ |
+ R visitIfNotNullDynamicPropertyPrefix( |
+ Send node, |
+ Node receiver, |
+ Name name, |
+ IncDecOperator operator, |
+ A arg) { |
+ return handleDynamicCompounds( |
+ node, |
+ receiver, |
+ name, |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitParameterPrefix( |
+ Send node, |
+ ParameterElement parameter, |
+ IncDecOperator operator, |
+ A arg) { |
+ return handleLocalCompounds( |
+ node, |
+ parameter, |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg, |
isSetterValid: true); |
} |
@override |
- R visitFinalLocalVariableCompound( |
+ R visitLocalVariablePrefix( |
Send node, |
LocalVariableElement variable, |
- AssignmentOperator operator, |
- Node rhs, |
+ IncDecOperator operator, |
A arg) { |
return handleLocalCompounds( |
node, |
variable, |
- new AssignmentCompound(operator, rhs), |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg, |
- isSetterValid: false); |
+ isSetterValid: true); |
} |
@override |
- R visitLocalFunctionCompound( |
+ R visitLocalFunctionPrefix( |
Send node, |
LocalFunctionElement function, |
- AssignmentOperator operator, |
- Node rhs, |
+ IncDecOperator operator, |
A arg) { |
return handleLocalCompounds( |
node, |
function, |
- new AssignmentCompound(operator, rhs), |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg, |
isSetterValid: false); |
} |
- @override |
- R visitStaticFieldCompound( |
+ |
+ R visitThisPropertyPrefix( |
Send node, |
- FieldElement field, |
- AssignmentOperator operator, |
- Node rhs, |
+ Name name, |
+ IncDecOperator operator, |
A arg) { |
- return handleStaticCompounds( |
+ return handleDynamicCompounds( |
node, |
- field, CompoundGetter.FIELD, |
- field, CompoundSetter.FIELD, |
- new AssignmentCompound(operator, rhs), |
+ null, |
+ name, |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
@override |
- R visitFinalStaticFieldCompound( |
+ R visitStaticFieldPrefix( |
Send node, |
FieldElement field, |
- AssignmentOperator operator, |
- Node rhs, |
+ IncDecOperator operator, |
A arg) { |
return handleStaticCompounds( |
node, |
field, CompoundGetter.FIELD, |
- null, CompoundSetter.INVALID, |
- new AssignmentCompound(operator, rhs), |
+ field, CompoundSetter.FIELD, |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
@override |
- R visitStaticGetterSetterCompound( |
+ R visitStaticGetterSetterPrefix( |
Send node, |
FunctionElement getter, |
FunctionElement setter, |
- AssignmentOperator operator, |
- Node rhs, |
+ IncDecOperator operator, |
A arg) { |
return handleStaticCompounds( |
node, |
getter, CompoundGetter.GETTER, |
setter, CompoundSetter.SETTER, |
- new AssignmentCompound(operator, rhs), |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
- @override |
- R visitStaticMethodSetterCompound( |
+ |
+ R visitStaticMethodSetterPrefix( |
Send node, |
- FunctionElement method, |
+ FunctionElement getter, |
FunctionElement setter, |
- AssignmentOperator operator, |
- Node rhs, |
+ IncDecOperator operator, |
A arg) { |
return handleStaticCompounds( |
node, |
- method, CompoundGetter.METHOD, |
+ getter, CompoundGetter.METHOD, |
setter, CompoundSetter.SETTER, |
- new AssignmentCompound(operator, rhs), |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
@override |
- R visitTopLevelFieldCompound( |
+ R visitTopLevelFieldPrefix( |
Send node, |
FieldElement field, |
- AssignmentOperator operator, |
- Node rhs, |
+ IncDecOperator operator, |
A arg) { |
return handleStaticCompounds( |
node, |
field, CompoundGetter.FIELD, |
field, CompoundSetter.FIELD, |
- new AssignmentCompound(operator, rhs), |
- arg); |
- } |
- |
- @override |
- R visitFinalTopLevelFieldCompound( |
- Send node, |
- FieldElement field, |
- AssignmentOperator operator, |
- Node rhs, |
- A arg) { |
- return handleStaticCompounds( |
- node, |
- field, CompoundGetter.FIELD, |
- null, CompoundSetter.INVALID, |
- new AssignmentCompound(operator, rhs), |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
@override |
- R visitTopLevelGetterSetterCompound( |
+ R visitTopLevelGetterSetterPrefix( |
Send node, |
FunctionElement getter, |
FunctionElement setter, |
- AssignmentOperator operator, |
- Node rhs, |
+ IncDecOperator operator, |
A arg) { |
return handleStaticCompounds( |
node, |
getter, CompoundGetter.GETTER, |
setter, CompoundSetter.SETTER, |
- new AssignmentCompound(operator, rhs), |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
@override |
- R visitTopLevelMethodSetterCompound( |
+ R visitTopLevelMethodSetterPrefix( |
Send node, |
FunctionElement method, |
FunctionElement setter, |
- AssignmentOperator operator, |
- Node rhs, |
+ IncDecOperator operator, |
A arg) { |
return handleStaticCompounds( |
node, |
method, CompoundGetter.METHOD, |
setter, CompoundSetter.SETTER, |
- new AssignmentCompound(operator, rhs), |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
@override |
- R visitSuperFieldCompound( |
+ R visitSuperFieldPrefix( |
Send node, |
FieldElement field, |
- AssignmentOperator operator, |
- Node rhs, |
+ IncDecOperator operator, |
A arg) { |
return handleSuperCompounds( |
node, |
field, CompoundGetter.FIELD, |
field, CompoundSetter.FIELD, |
- new AssignmentCompound(operator, rhs), |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
@override |
- R visitFinalSuperFieldCompound( |
+ R visitSuperFieldFieldPrefix( |
Send node, |
- FieldElement field, |
- AssignmentOperator operator, |
- Node rhs, |
+ FieldElement readField, |
+ FieldElement writtenField, |
+ IncDecOperator operator, |
A arg) { |
return handleSuperCompounds( |
node, |
- field, CompoundGetter.FIELD, |
- field, CompoundSetter.INVALID, |
- new AssignmentCompound(operator, rhs), |
+ readField, CompoundGetter.FIELD, |
+ writtenField, CompoundSetter.FIELD, |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
@override |
- R visitSuperGetterSetterCompound( |
+ R visitSuperFieldSetterPrefix( |
Send node, |
- FunctionElement getter, |
+ FieldElement field, |
FunctionElement setter, |
- AssignmentOperator operator, |
- Node rhs, |
+ IncDecOperator operator, |
A arg) { |
return handleSuperCompounds( |
node, |
- getter, CompoundGetter.GETTER, |
+ field, CompoundGetter.FIELD, |
setter, CompoundSetter.SETTER, |
- new AssignmentCompound(operator, rhs), |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
- @override |
- R visitSuperMethodSetterCompound( |
- Send node, |
- FunctionElement method, |
- FunctionElement setter, |
- AssignmentOperator operator, |
- Node rhs, |
- A arg) { |
- return handleSuperCompounds( |
- node, |
- method, CompoundGetter.METHOD, |
- setter, CompoundSetter.SETTER, |
- new AssignmentCompound(operator, rhs), |
- arg); |
- } |
- @override |
- R visitSuperFieldSetterCompound( |
+ R visitSuperGetterSetterPrefix( |
Send node, |
- FieldElement field, |
+ FunctionElement getter, |
FunctionElement setter, |
- AssignmentOperator operator, |
- Node rhs, |
+ IncDecOperator operator, |
A arg) { |
return handleSuperCompounds( |
node, |
- field, CompoundGetter.FIELD, |
+ getter, CompoundGetter.GETTER, |
setter, CompoundSetter.SETTER, |
- new AssignmentCompound(operator, rhs), |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
@override |
- R visitSuperGetterFieldCompound( |
+ R visitSuperGetterFieldPrefix( |
Send node, |
FunctionElement getter, |
FieldElement field, |
- AssignmentOperator operator, |
- Node rhs, |
+ IncDecOperator operator, |
A arg) { |
return handleSuperCompounds( |
node, |
getter, CompoundGetter.GETTER, |
field, CompoundSetter.FIELD, |
- new AssignmentCompound(operator, rhs), |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
@override |
- R visitClassTypeLiteralCompound( |
+ R visitSuperMethodSetterPrefix( |
+ Send node, |
+ FunctionElement method, |
+ FunctionElement setter, |
+ IncDecOperator operator, |
+ A arg) { |
+ return handleSuperCompounds( |
+ node, |
+ method, CompoundGetter.METHOD, |
+ setter, CompoundSetter.SETTER, |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitClassTypeLiteralPrefix( |
Send node, |
ConstantExpression constant, |
- AssignmentOperator operator, |
- Node rhs, |
+ IncDecOperator operator, |
A arg) { |
return handleTypeLiteralConstantCompounds( |
node, |
constant, |
- new AssignmentCompound(operator, rhs), |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
@override |
- R visitTypedefTypeLiteralCompound( |
+ R visitTypedefTypeLiteralPrefix( |
Send node, |
ConstantExpression constant, |
- AssignmentOperator operator, |
- Node rhs, |
+ IncDecOperator operator, |
A arg) { |
return handleTypeLiteralConstantCompounds( |
node, |
constant, |
- new AssignmentCompound(operator, rhs), |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
@override |
- R visitTypeVariableTypeLiteralCompound( |
+ R visitTypeVariableTypeLiteralPrefix( |
Send node, |
TypeVariableElement element, |
- AssignmentOperator operator, |
- Node rhs, |
+ IncDecOperator operator, |
A arg) { |
return handleTypeVariableTypeLiteralCompounds( |
node, |
element, |
- new AssignmentCompound(operator, rhs), |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
@override |
- R visitDynamicTypeLiteralCompound( |
+ R visitDynamicTypeLiteralPrefix( |
Send node, |
ConstantExpression constant, |
- AssignmentOperator operator, |
- Node rhs, |
+ IncDecOperator operator, |
A arg) { |
return handleTypeLiteralConstantCompounds( |
node, |
constant, |
- new AssignmentCompound(operator, rhs), |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
- |
- R visitDynamicPropertyPrefix( |
+ @override |
+ R visitDynamicPropertyPostfix( |
Send node, |
Node receiver, |
Name name, |
@@ -8860,11 +9965,12 @@ abstract class BaseImplementationOfCompoundsMixin<R, A> |
node, |
receiver, |
name, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg); |
} |
- R visitIfNotNullDynamicPropertyPrefix( |
+ @override |
+ R visitIfNotNullDynamicPropertyPostfix( |
Send node, |
Node receiver, |
Name name, |
@@ -8874,12 +9980,12 @@ abstract class BaseImplementationOfCompoundsMixin<R, A> |
node, |
receiver, |
name, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg); |
} |
@override |
- R visitParameterPrefix( |
+ R visitParameterPostfix( |
Send node, |
ParameterElement parameter, |
IncDecOperator operator, |
@@ -8887,13 +9993,13 @@ abstract class BaseImplementationOfCompoundsMixin<R, A> |
return handleLocalCompounds( |
node, |
parameter, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg, |
isSetterValid: true); |
} |
@override |
- R visitLocalVariablePrefix( |
+ R visitLocalVariablePostfix( |
Send node, |
LocalVariableElement variable, |
IncDecOperator operator, |
@@ -8901,13 +10007,13 @@ abstract class BaseImplementationOfCompoundsMixin<R, A> |
return handleLocalCompounds( |
node, |
variable, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg, |
isSetterValid: true); |
} |
@override |
- R visitLocalFunctionPrefix( |
+ R visitLocalFunctionPostfix( |
Send node, |
LocalFunctionElement function, |
IncDecOperator operator, |
@@ -8915,13 +10021,13 @@ abstract class BaseImplementationOfCompoundsMixin<R, A> |
return handleLocalCompounds( |
node, |
function, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg, |
isSetterValid: false); |
} |
- R visitThisPropertyPrefix( |
+ R visitThisPropertyPostfix( |
Send node, |
Name name, |
IncDecOperator operator, |
@@ -8930,12 +10036,12 @@ abstract class BaseImplementationOfCompoundsMixin<R, A> |
node, |
null, |
name, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg); |
} |
@override |
- R visitStaticFieldPrefix( |
+ R visitStaticFieldPostfix( |
Send node, |
FieldElement field, |
IncDecOperator operator, |
@@ -8944,12 +10050,12 @@ abstract class BaseImplementationOfCompoundsMixin<R, A> |
node, |
field, CompoundGetter.FIELD, |
field, CompoundSetter.FIELD, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg); |
} |
@override |
- R visitStaticGetterSetterPrefix( |
+ R visitStaticGetterSetterPostfix( |
Send node, |
FunctionElement getter, |
FunctionElement setter, |
@@ -8959,12 +10065,12 @@ abstract class BaseImplementationOfCompoundsMixin<R, A> |
node, |
getter, CompoundGetter.GETTER, |
setter, CompoundSetter.SETTER, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg); |
} |
- R visitStaticMethodSetterPrefix( |
+ R visitStaticMethodSetterPostfix( |
Send node, |
FunctionElement getter, |
FunctionElement setter, |
@@ -8974,12 +10080,12 @@ abstract class BaseImplementationOfCompoundsMixin<R, A> |
node, |
getter, CompoundGetter.METHOD, |
setter, CompoundSetter.SETTER, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg); |
} |
@override |
- R visitTopLevelFieldPrefix( |
+ R visitTopLevelFieldPostfix( |
Send node, |
FieldElement field, |
IncDecOperator operator, |
@@ -8988,12 +10094,12 @@ abstract class BaseImplementationOfCompoundsMixin<R, A> |
node, |
field, CompoundGetter.FIELD, |
field, CompoundSetter.FIELD, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg); |
} |
@override |
- R visitTopLevelGetterSetterPrefix( |
+ R visitTopLevelGetterSetterPostfix( |
Send node, |
FunctionElement getter, |
FunctionElement setter, |
@@ -9003,12 +10109,12 @@ abstract class BaseImplementationOfCompoundsMixin<R, A> |
node, |
getter, CompoundGetter.GETTER, |
setter, CompoundSetter.SETTER, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg); |
} |
@override |
- R visitTopLevelMethodSetterPrefix( |
+ R visitTopLevelMethodSetterPostfix( |
Send node, |
FunctionElement method, |
FunctionElement setter, |
@@ -9018,12 +10124,12 @@ abstract class BaseImplementationOfCompoundsMixin<R, A> |
node, |
method, CompoundGetter.METHOD, |
setter, CompoundSetter.SETTER, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg); |
} |
@override |
- R visitSuperFieldPrefix( |
+ R visitSuperFieldPostfix( |
Send node, |
FieldElement field, |
IncDecOperator operator, |
@@ -9032,593 +10138,802 @@ abstract class BaseImplementationOfCompoundsMixin<R, A> |
node, |
field, CompoundGetter.FIELD, |
field, CompoundSetter.FIELD, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg); |
} |
@override |
- R visitSuperFieldFieldPrefix( |
+ R visitSuperFieldFieldPostfix( |
Send node, |
FieldElement readField, |
FieldElement writtenField, |
IncDecOperator operator, |
A arg) { |
- return handleSuperCompounds( |
+ return handleSuperCompounds( |
+ node, |
+ readField, CompoundGetter.FIELD, |
+ writtenField, CompoundSetter.FIELD, |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitSuperFieldSetterPostfix( |
+ Send node, |
+ FieldElement field, |
+ FunctionElement setter, |
+ IncDecOperator operator, |
+ A arg) { |
+ return handleSuperCompounds( |
+ node, |
+ field, CompoundGetter.FIELD, |
+ setter, CompoundSetter.SETTER, |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ arg); |
+ } |
+ |
+ |
+ R visitSuperGetterSetterPostfix( |
+ Send node, |
+ FunctionElement getter, |
+ FunctionElement setter, |
+ IncDecOperator operator, |
+ A arg) { |
+ return handleSuperCompounds( |
+ node, |
+ getter, CompoundGetter.GETTER, |
+ setter, CompoundSetter.SETTER, |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitSuperGetterFieldPostfix( |
+ Send node, |
+ FunctionElement getter, |
+ FieldElement field, |
+ IncDecOperator operator, |
+ A arg) { |
+ return handleSuperCompounds( |
+ node, |
+ getter, CompoundGetter.GETTER, |
+ field, CompoundSetter.FIELD, |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitSuperMethodSetterPostfix( |
+ Send node, |
+ FunctionElement method, |
+ FunctionElement setter, |
+ IncDecOperator operator, |
+ A arg) { |
+ return handleSuperCompounds( |
+ node, |
+ method, CompoundGetter.METHOD, |
+ setter, CompoundSetter.SETTER, |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitClassTypeLiteralPostfix( |
+ Send node, |
+ ConstantExpression constant, |
+ IncDecOperator operator, |
+ A arg) { |
+ return handleTypeLiteralConstantCompounds( |
+ node, |
+ constant, |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitTypedefTypeLiteralPostfix( |
+ Send node, |
+ ConstantExpression constant, |
+ IncDecOperator operator, |
+ A arg) { |
+ return handleTypeLiteralConstantCompounds( |
+ node, |
+ constant, |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitTypeVariableTypeLiteralPostfix( |
+ Send node, |
+ TypeVariableElement element, |
+ IncDecOperator operator, |
+ A arg) { |
+ return handleTypeVariableTypeLiteralCompounds( |
+ node, |
+ element, |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitDynamicTypeLiteralPostfix( |
+ Send node, |
+ ConstantExpression constant, |
+ IncDecOperator operator, |
+ A arg) { |
+ return handleTypeLiteralConstantCompounds( |
+ node, |
+ constant, |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitUnresolvedStaticGetterPostfix( |
+ Send node, |
+ Element element, |
+ MethodElement setter, |
+ IncDecOperator operator, |
+ A arg) { |
+ return handleStaticCompounds( |
+ node, |
+ element, |
+ CompoundGetter.UNRESOLVED, |
+ setter, |
+ CompoundSetter.SETTER, |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ arg); |
+ } |
+ |
+ @override |
+ R visitUnresolvedTopLevelGetterPostfix( |
+ Send node, |
+ Element element, |
+ MethodElement setter, |
+ IncDecOperator operator, |
+ A arg) { |
+ return handleStaticCompounds( |
node, |
- readField, CompoundGetter.FIELD, |
- writtenField, CompoundSetter.FIELD, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ element, |
+ CompoundGetter.UNRESOLVED, |
+ setter, |
+ CompoundSetter.SETTER, |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg); |
} |
@override |
- R visitSuperFieldSetterPrefix( |
+ R visitUnresolvedStaticSetterPostfix( |
Send node, |
- FieldElement field, |
- FunctionElement setter, |
+ MethodElement getter, |
+ Element element, |
IncDecOperator operator, |
A arg) { |
- return handleSuperCompounds( |
+ return handleStaticCompounds( |
node, |
- field, CompoundGetter.FIELD, |
- setter, CompoundSetter.SETTER, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ getter, |
+ CompoundGetter.GETTER, |
+ element, |
+ CompoundSetter.INVALID, |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg); |
} |
- |
- R visitSuperGetterSetterPrefix( |
+ @override |
+ R visitUnresolvedTopLevelSetterPostfix( |
Send node, |
- FunctionElement getter, |
- FunctionElement setter, |
+ MethodElement getter, |
+ Element element, |
IncDecOperator operator, |
A arg) { |
- return handleSuperCompounds( |
+ return handleStaticCompounds( |
node, |
- getter, CompoundGetter.GETTER, |
- setter, CompoundSetter.SETTER, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ getter, |
+ CompoundGetter.GETTER, |
+ element, |
+ CompoundSetter.INVALID, |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg); |
} |
@override |
- R visitSuperGetterFieldPrefix( |
+ R visitStaticMethodPostfix( |
Send node, |
- FunctionElement getter, |
- FieldElement field, |
+ MethodElement method, |
IncDecOperator operator, |
A arg) { |
- return handleSuperCompounds( |
+ return handleStaticCompounds( |
node, |
- getter, CompoundGetter.GETTER, |
- field, CompoundSetter.FIELD, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ method, |
+ CompoundGetter.METHOD, |
+ method, |
+ CompoundSetter.INVALID, |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg); |
} |
@override |
- R visitSuperMethodSetterPrefix( |
+ R visitTopLevelMethodPostfix( |
Send node, |
- FunctionElement method, |
- FunctionElement setter, |
+ MethodElement method, |
IncDecOperator operator, |
A arg) { |
- return handleSuperCompounds( |
+ return handleStaticCompounds( |
node, |
- method, CompoundGetter.METHOD, |
- setter, CompoundSetter.SETTER, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ method, |
+ CompoundGetter.METHOD, |
+ method, |
+ CompoundSetter.INVALID, |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg); |
} |
@override |
- R visitClassTypeLiteralPrefix( |
+ R visitUnresolvedPostfix( |
Send node, |
- ConstantExpression constant, |
+ Element element, |
IncDecOperator operator, |
A arg) { |
- return handleTypeLiteralConstantCompounds( |
+ return handleStaticCompounds( |
node, |
- constant, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ element, |
+ CompoundGetter.UNRESOLVED, |
+ element, |
+ CompoundSetter.INVALID, |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg); |
} |
@override |
- R visitTypedefTypeLiteralPrefix( |
+ R visitUnresolvedStaticGetterPrefix( |
Send node, |
- ConstantExpression constant, |
+ Element element, |
+ MethodElement setter, |
IncDecOperator operator, |
A arg) { |
- return handleTypeLiteralConstantCompounds( |
+ return handleStaticCompounds( |
node, |
- constant, |
+ element, |
+ CompoundGetter.UNRESOLVED, |
+ setter, |
+ CompoundSetter.SETTER, |
new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
@override |
- R visitTypeVariableTypeLiteralPrefix( |
+ R visitUnresolvedTopLevelGetterPrefix( |
Send node, |
- TypeVariableElement element, |
+ Element element, |
+ MethodElement setter, |
IncDecOperator operator, |
A arg) { |
- return handleTypeVariableTypeLiteralCompounds( |
+ return handleStaticCompounds( |
node, |
element, |
+ CompoundGetter.UNRESOLVED, |
+ setter, |
+ CompoundSetter.SETTER, |
new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
@override |
- R visitDynamicTypeLiteralPrefix( |
+ R visitUnresolvedStaticSetterPrefix( |
Send node, |
- ConstantExpression constant, |
+ MethodElement getter, |
+ Element element, |
IncDecOperator operator, |
A arg) { |
- return handleTypeLiteralConstantCompounds( |
+ return handleStaticCompounds( |
node, |
- constant, |
+ getter, |
+ CompoundGetter.GETTER, |
+ element, |
+ CompoundSetter.INVALID, |
new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
@override |
- R visitDynamicPropertyPostfix( |
+ R visitUnresolvedTopLevelSetterPrefix( |
Send node, |
- Node receiver, |
- Name name, |
+ MethodElement getter, |
+ Element element, |
IncDecOperator operator, |
A arg) { |
- return handleDynamicCompounds( |
+ return handleStaticCompounds( |
node, |
- receiver, |
- name, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ getter, |
+ CompoundGetter.GETTER, |
+ element, |
+ CompoundSetter.INVALID, |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
@override |
- R visitIfNotNullDynamicPropertyPostfix( |
+ R visitStaticMethodPrefix( |
Send node, |
- Node receiver, |
- Name name, |
+ MethodElement method, |
IncDecOperator operator, |
A arg) { |
- return handleDynamicCompounds( |
+ return handleStaticCompounds( |
node, |
- receiver, |
- name, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ method, |
+ CompoundGetter.METHOD, |
+ method, |
+ CompoundSetter.INVALID, |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
@override |
- R visitParameterPostfix( |
+ R visitTopLevelMethodPrefix( |
Send node, |
- ParameterElement parameter, |
+ MethodElement method, |
IncDecOperator operator, |
A arg) { |
- return handleLocalCompounds( |
+ return handleStaticCompounds( |
node, |
- parameter, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
- arg, |
- isSetterValid: true); |
+ method, |
+ CompoundGetter.METHOD, |
+ method, |
+ CompoundSetter.INVALID, |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
+ arg); |
} |
@override |
- R visitLocalVariablePostfix( |
+ R visitUnresolvedPrefix( |
Send node, |
- LocalVariableElement variable, |
+ Element element, |
IncDecOperator operator, |
A arg) { |
- return handleLocalCompounds( |
+ return handleStaticCompounds( |
node, |
- variable, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
- arg, |
- isSetterValid: true); |
+ element, |
+ CompoundGetter.UNRESOLVED, |
+ element, |
+ CompoundSetter.INVALID, |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
+ arg); |
} |
@override |
- R visitLocalFunctionPostfix( |
+ R visitUnresolvedStaticGetterCompound( |
Send node, |
- LocalFunctionElement function, |
- IncDecOperator operator, |
+ Element element, |
+ MethodElement setter, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
- return handleLocalCompounds( |
+ return handleStaticCompounds( |
node, |
- function, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
- arg, |
- isSetterValid: false); |
+ element, |
+ CompoundGetter.UNRESOLVED, |
+ setter, |
+ CompoundSetter.SETTER, |
+ new AssignmentCompound(operator, rhs), |
+ arg); |
} |
- |
- R visitThisPropertyPostfix( |
+ @override |
+ R visitUnresolvedTopLevelGetterCompound( |
Send node, |
- Name name, |
- IncDecOperator operator, |
+ Element element, |
+ MethodElement setter, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
- return handleDynamicCompounds( |
+ return handleStaticCompounds( |
node, |
- null, |
- name, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ element, |
+ CompoundGetter.UNRESOLVED, |
+ setter, |
+ CompoundSetter.SETTER, |
+ new AssignmentCompound(operator, rhs), |
arg); |
} |
@override |
- R visitStaticFieldPostfix( |
+ R visitUnresolvedStaticSetterCompound( |
Send node, |
- FieldElement field, |
- IncDecOperator operator, |
+ MethodElement getter, |
+ Element element, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
return handleStaticCompounds( |
node, |
- field, CompoundGetter.FIELD, |
- field, CompoundSetter.FIELD, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ getter, |
+ CompoundGetter.GETTER, |
+ element, |
+ CompoundSetter.INVALID, |
+ new AssignmentCompound(operator, rhs), |
arg); |
} |
@override |
- R visitStaticGetterSetterPostfix( |
+ R visitUnresolvedTopLevelSetterCompound( |
Send node, |
- FunctionElement getter, |
- FunctionElement setter, |
- IncDecOperator operator, |
+ MethodElement getter, |
+ Element element, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
return handleStaticCompounds( |
node, |
- getter, CompoundGetter.GETTER, |
- setter, CompoundSetter.SETTER, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ getter, |
+ CompoundGetter.GETTER, |
+ element, |
+ CompoundSetter.INVALID, |
+ new AssignmentCompound(operator, rhs), |
arg); |
} |
- |
- R visitStaticMethodSetterPostfix( |
+ @override |
+ R visitStaticMethodCompound( |
Send node, |
- FunctionElement getter, |
- FunctionElement setter, |
- IncDecOperator operator, |
+ MethodElement method, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
return handleStaticCompounds( |
node, |
- getter, CompoundGetter.METHOD, |
- setter, CompoundSetter.SETTER, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ method, |
+ CompoundGetter.METHOD, |
+ method, |
+ CompoundSetter.INVALID, |
+ new AssignmentCompound(operator, rhs), |
arg); |
} |
@override |
- R visitTopLevelFieldPostfix( |
+ R visitTopLevelMethodCompound( |
Send node, |
- FieldElement field, |
- IncDecOperator operator, |
+ MethodElement method, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
return handleStaticCompounds( |
node, |
- field, CompoundGetter.FIELD, |
- field, CompoundSetter.FIELD, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ method, |
+ CompoundGetter.METHOD, |
+ method, |
+ CompoundSetter.INVALID, |
+ new AssignmentCompound(operator, rhs), |
arg); |
} |
@override |
- R visitTopLevelGetterSetterPostfix( |
+ R visitUnresolvedCompound( |
Send node, |
- FunctionElement getter, |
- FunctionElement setter, |
- IncDecOperator operator, |
+ Element element, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
return handleStaticCompounds( |
node, |
- getter, CompoundGetter.GETTER, |
- setter, CompoundSetter.SETTER, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ element, |
+ CompoundGetter.UNRESOLVED, |
+ element, |
+ CompoundSetter.INVALID, |
+ new AssignmentCompound(operator, rhs), |
arg); |
} |
@override |
- R visitTopLevelMethodSetterPostfix( |
+ R visitFinalLocalVariablePostfix( |
Send node, |
- FunctionElement method, |
- FunctionElement setter, |
+ LocalVariableElement variable, |
IncDecOperator operator, |
A arg) { |
- return handleStaticCompounds( |
+ return handleLocalCompounds( |
node, |
- method, CompoundGetter.METHOD, |
- setter, CompoundSetter.SETTER, |
+ variable, |
new IncDecCompound(CompoundKind.POSTFIX, operator), |
- arg); |
+ arg, |
+ isSetterValid: false); |
} |
@override |
- R visitSuperFieldPostfix( |
+ R visitFinalLocalVariablePrefix( |
Send node, |
- FieldElement field, |
+ LocalVariableElement variable, |
IncDecOperator operator, |
A arg) { |
- return handleSuperCompounds( |
+ return handleLocalCompounds( |
node, |
- field, CompoundGetter.FIELD, |
- field, CompoundSetter.FIELD, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
- arg); |
+ variable, |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
+ arg, |
+ isSetterValid: false); |
} |
@override |
- R visitSuperFieldFieldPostfix( |
+ R visitFinalParameterPostfix( |
Send node, |
- FieldElement readField, |
- FieldElement writtenField, |
+ ParameterElement parameter, |
IncDecOperator operator, |
A arg) { |
- return handleSuperCompounds( |
+ return handleLocalCompounds( |
node, |
- readField, CompoundGetter.FIELD, |
- writtenField, CompoundSetter.FIELD, |
+ parameter, |
new IncDecCompound(CompoundKind.POSTFIX, operator), |
- arg); |
+ arg, |
+ isSetterValid: false); |
} |
@override |
- R visitSuperFieldSetterPostfix( |
+ R visitFinalParameterPrefix( |
Send node, |
- FieldElement field, |
- FunctionElement setter, |
+ ParameterElement parameter, |
IncDecOperator operator, |
A arg) { |
- return handleSuperCompounds( |
+ return handleLocalCompounds( |
node, |
- field, CompoundGetter.FIELD, |
- setter, CompoundSetter.SETTER, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
- arg); |
+ parameter, |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
+ arg, |
+ isSetterValid: false); |
} |
- |
- R visitSuperGetterSetterPostfix( |
+ @override |
+ R visitFinalStaticFieldPostfix( |
Send node, |
- FunctionElement getter, |
- FunctionElement setter, |
+ FieldElement field, |
IncDecOperator operator, |
A arg) { |
- return handleSuperCompounds( |
+ return handleStaticCompounds( |
node, |
- getter, CompoundGetter.GETTER, |
- setter, CompoundSetter.SETTER, |
+ field, |
+ CompoundGetter.FIELD, |
+ field, |
+ CompoundSetter.INVALID, |
new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg); |
} |
@override |
- R visitSuperGetterFieldPostfix( |
+ R visitFinalStaticFieldPrefix( |
Send node, |
- FunctionElement getter, |
FieldElement field, |
IncDecOperator operator, |
A arg) { |
- return handleSuperCompounds( |
+ return handleStaticCompounds( |
node, |
- getter, CompoundGetter.GETTER, |
- field, CompoundSetter.FIELD, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ field, |
+ CompoundGetter.FIELD, |
+ field, |
+ CompoundSetter.INVALID, |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
@override |
- R visitSuperMethodSetterPostfix( |
+ R visitSuperFieldFieldCompound( |
Send node, |
- FunctionElement method, |
- FunctionElement setter, |
- IncDecOperator operator, |
+ FieldElement readField, |
+ FieldElement writtenField, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
return handleSuperCompounds( |
node, |
- method, CompoundGetter.METHOD, |
- setter, CompoundSetter.SETTER, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ readField, |
+ CompoundGetter.FIELD, |
+ writtenField, |
+ CompoundSetter.FIELD, |
+ new AssignmentCompound(operator, rhs), |
arg); |
} |
@override |
- R visitClassTypeLiteralPostfix( |
+ R visitFinalSuperFieldPostfix( |
Send node, |
- ConstantExpression constant, |
+ FieldElement field, |
IncDecOperator operator, |
A arg) { |
- return handleTypeLiteralConstantCompounds( |
+ return handleSuperCompounds( |
node, |
- constant, |
+ field, |
+ CompoundGetter.FIELD, |
+ field, |
+ CompoundSetter.INVALID, |
new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg); |
} |
@override |
- R visitTypedefTypeLiteralPostfix( |
+ R visitFinalSuperFieldPrefix( |
Send node, |
- ConstantExpression constant, |
+ FieldElement field, |
IncDecOperator operator, |
A arg) { |
- return handleTypeLiteralConstantCompounds( |
+ return handleSuperCompounds( |
node, |
- constant, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ field, |
+ CompoundGetter.FIELD, |
+ field, |
+ CompoundSetter.INVALID, |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
@override |
- R visitTypeVariableTypeLiteralPostfix( |
+ R visitSuperMethodCompound( |
Send node, |
- TypeVariableElement element, |
- IncDecOperator operator, |
+ FunctionElement method, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
- return handleTypeVariableTypeLiteralCompounds( |
+ return handleSuperCompounds( |
node, |
- element, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ method, |
+ CompoundGetter.METHOD, |
+ method, |
+ CompoundSetter.INVALID, |
+ new AssignmentCompound(operator, rhs), |
arg); |
} |
@override |
- R visitDynamicTypeLiteralPostfix( |
+ R visitSuperMethodPostfix( |
Send node, |
- ConstantExpression constant, |
+ FunctionElement method, |
IncDecOperator operator, |
A arg) { |
- return handleTypeLiteralConstantCompounds( |
+ return handleSuperCompounds( |
node, |
- constant, |
+ method, |
+ CompoundGetter.METHOD, |
+ method, |
+ CompoundSetter.INVALID, |
new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg); |
} |
@override |
- R visitUnresolvedStaticGetterPostfix( |
+ R visitSuperMethodPrefix( |
Send node, |
- Element element, |
- MethodElement setter, |
+ FunctionElement method, |
IncDecOperator operator, |
A arg) { |
- return handleStaticCompounds( |
+ return handleSuperCompounds( |
node, |
- element, |
- CompoundGetter.UNRESOLVED, |
- setter, |
- CompoundSetter.SETTER, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ method, |
+ CompoundGetter.METHOD, |
+ method, |
+ CompoundSetter.INVALID, |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
@override |
- R visitUnresolvedTopLevelGetterPostfix( |
+ R visitFinalTopLevelFieldPostfix( |
Send node, |
- Element element, |
- MethodElement setter, |
+ FieldElement field, |
IncDecOperator operator, |
A arg) { |
return handleStaticCompounds( |
node, |
- element, |
- CompoundGetter.UNRESOLVED, |
- setter, |
- CompoundSetter.SETTER, |
+ field, |
+ CompoundGetter.FIELD, |
+ field, |
+ CompoundSetter.INVALID, |
new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg); |
} |
@override |
- R visitUnresolvedStaticSetterPostfix( |
+ R visitFinalTopLevelFieldPrefix( |
Send node, |
- MethodElement getter, |
- Element element, |
+ FieldElement field, |
IncDecOperator operator, |
A arg) { |
return handleStaticCompounds( |
node, |
- getter, |
- CompoundGetter.GETTER, |
- element, |
+ field, |
+ CompoundGetter.FIELD, |
+ field, |
CompoundSetter.INVALID, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
@override |
- R visitUnresolvedTopLevelSetterPostfix( |
+ R visitUnresolvedSuperCompound( |
Send node, |
- MethodElement getter, |
Element element, |
- IncDecOperator operator, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
- return handleStaticCompounds( |
+ return handleSuperCompounds( |
node, |
- getter, |
- CompoundGetter.GETTER, |
+ element, |
+ CompoundGetter.UNRESOLVED, |
element, |
CompoundSetter.INVALID, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ new AssignmentCompound(operator, rhs), |
arg); |
} |
@override |
- R visitStaticMethodPostfix( |
+ R visitUnresolvedSuperPostfix( |
Send node, |
- MethodElement method, |
+ Element element, |
IncDecOperator operator, |
A arg) { |
- return handleStaticCompounds( |
+ return handleSuperCompounds( |
node, |
- method, |
- CompoundGetter.METHOD, |
- method, |
+ element, |
+ CompoundGetter.UNRESOLVED, |
+ element, |
CompoundSetter.INVALID, |
new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg); |
} |
@override |
- R visitTopLevelMethodPostfix( |
+ R visitUnresolvedSuperPrefix( |
Send node, |
- MethodElement method, |
+ Element element, |
IncDecOperator operator, |
A arg) { |
- return handleStaticCompounds( |
+ return handleSuperCompounds( |
node, |
- method, |
- CompoundGetter.METHOD, |
- method, |
+ element, |
+ CompoundGetter.UNRESOLVED, |
+ element, |
CompoundSetter.INVALID, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
@override |
- R visitUnresolvedPostfix( |
- Send node, |
- Element element, |
- IncDecOperator operator, |
+ R visitUnresolvedSuperGetterCompound( |
+ Send node, Element element, |
+ MethodElement setter, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
- return handleStaticCompounds( |
+ return handleSuperCompounds( |
node, |
element, |
CompoundGetter.UNRESOLVED, |
- element, |
- CompoundSetter.INVALID, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ setter, |
+ CompoundSetter.SETTER, |
+ new AssignmentCompound(operator, rhs), |
arg); |
} |
@override |
- R visitUnresolvedStaticGetterPrefix( |
+ R visitUnresolvedSuperGetterPostfix( |
Send node, |
Element element, |
MethodElement setter, |
IncDecOperator operator, |
A arg) { |
- return handleStaticCompounds( |
+ return handleSuperCompounds( |
node, |
element, |
CompoundGetter.UNRESOLVED, |
setter, |
CompoundSetter.SETTER, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg); |
} |
@override |
- R visitUnresolvedTopLevelGetterPrefix( |
+ R visitUnresolvedSuperGetterPrefix( |
Send node, |
Element element, |
MethodElement setter, |
IncDecOperator operator, |
A arg) { |
- return handleStaticCompounds( |
+ return handleSuperCompounds( |
node, |
element, |
CompoundGetter.UNRESOLVED, |
@@ -9629,578 +10944,642 @@ abstract class BaseImplementationOfCompoundsMixin<R, A> |
} |
@override |
- R visitUnresolvedStaticSetterPrefix( |
+ R visitUnresolvedSuperSetterCompound( |
Send node, |
MethodElement getter, |
Element element, |
- IncDecOperator operator, |
+ AssignmentOperator operator, |
+ Node rhs, |
A arg) { |
- return handleStaticCompounds( |
+ return handleSuperCompounds( |
node, |
getter, |
CompoundGetter.GETTER, |
element, |
CompoundSetter.INVALID, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ new AssignmentCompound(operator, rhs), |
arg); |
} |
@override |
- R visitUnresolvedTopLevelSetterPrefix( |
+ R visitUnresolvedSuperSetterPostfix( |
Send node, |
MethodElement getter, |
Element element, |
IncDecOperator operator, |
A arg) { |
- return handleStaticCompounds( |
+ return handleSuperCompounds( |
node, |
getter, |
CompoundGetter.GETTER, |
element, |
CompoundSetter.INVALID, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ new IncDecCompound(CompoundKind.POSTFIX, operator), |
arg); |
} |
@override |
- R visitStaticMethodPrefix( |
+ R visitUnresolvedSuperSetterPrefix( |
Send node, |
- MethodElement method, |
+ MethodElement getter, |
+ Element element, |
IncDecOperator operator, |
A arg) { |
- return handleStaticCompounds( |
+ return handleSuperCompounds( |
node, |
- method, |
- CompoundGetter.METHOD, |
- method, |
+ getter, |
+ CompoundGetter.GETTER, |
+ element, |
CompoundSetter.INVALID, |
new IncDecCompound(CompoundKind.PREFIX, operator), |
arg); |
} |
+} |
+ |
+/// Simplified handling of if-null assignments. |
+abstract class BaseImplementationOfSetIfNullsMixin<R, A> |
+ implements SemanticSendVisitor<R, A> { |
+ |
+ /// Handle a super if-null assignments, like `super.foo ??= 42`. |
+ R handleSuperSetIfNulls( |
+ SendSet node, |
+ Element getter, |
+ CompoundGetter getterKind, |
+ Element setter, |
+ CompoundSetter setterKind, |
+ Node rhs, |
+ A arg); |
+ |
+ /// Handle a static or top level if-null assignments, like `foo ??= 42`. |
+ R handleStaticSetIfNulls( |
+ SendSet node, |
+ Element getter, |
+ CompoundGetter getterKind, |
+ Element setter, |
+ CompoundSetter setterKind, |
+ Node rhs, |
+ A arg); |
+ |
+ /// Handle a local if-null assignments, like `foo ??= 42`. If [isSetterValid] |
+ /// is false [local] is unassignable. |
+ R handleLocalSetIfNulls( |
+ SendSet node, |
+ LocalElement local, |
+ Node rhs, |
+ A arg, |
+ {bool isSetterValid}); |
+ |
+ /// Handle a if-null assignments on a type literal constant, like |
+ /// `Object ??= 42`. |
+ R handleTypeLiteralConstantSetIfNulls( |
+ SendSet node, |
+ ConstantExpression constant, |
+ Node rhs, |
+ A arg); |
+ |
+ /// Handle a dynamic if-null assignments, like `o.foo ??= 42`. [receiver] is |
+ /// `null` for properties on `this`, like `this.foo ??= 42` or `foo ??= 42`. |
+ R handleDynamicSetIfNulls( |
+ Send node, |
+ Node receiver, |
+ Name name, |
+ Node rhs, |
+ A arg); |
@override |
- R visitTopLevelMethodPrefix( |
+ R visitClassTypeLiteralSetIfNull( |
Send node, |
- MethodElement method, |
- IncDecOperator operator, |
+ ConstantExpression constant, |
+ Node rhs, |
A arg) { |
- return handleStaticCompounds( |
- node, |
- method, |
- CompoundGetter.METHOD, |
- method, |
- CompoundSetter.INVALID, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
- arg); |
+ return handleTypeLiteralConstantSetIfNulls(node, constant, rhs, arg); |
} |
@override |
- R visitUnresolvedPrefix( |
+ R visitDynamicPropertySetIfNull( |
Send node, |
- Element element, |
- IncDecOperator operator, |
+ Node receiver, |
+ Name name, |
+ Node rhs, |
A arg) { |
- return handleStaticCompounds( |
- node, |
- element, |
- CompoundGetter.UNRESOLVED, |
- element, |
- CompoundSetter.INVALID, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
- arg); |
+ return handleDynamicSetIfNulls(node, receiver, name, rhs, arg); |
} |
@override |
- R visitUnresolvedStaticGetterCompound( |
+ R visitDynamicTypeLiteralSetIfNull( |
Send node, |
- Element element, |
- MethodElement setter, |
- AssignmentOperator operator, |
+ ConstantExpression constant, |
Node rhs, |
A arg) { |
- return handleStaticCompounds( |
- node, |
- element, |
- CompoundGetter.UNRESOLVED, |
- setter, |
- CompoundSetter.SETTER, |
- new AssignmentCompound(operator, rhs), |
- arg); |
+ return handleTypeLiteralConstantSetIfNulls(node, constant, rhs, arg); |
} |
@override |
- R visitUnresolvedTopLevelGetterCompound( |
+ R visitFinalLocalVariableSetIfNull( |
Send node, |
- Element element, |
- MethodElement setter, |
- AssignmentOperator operator, |
+ LocalVariableElement variable, |
Node rhs, |
A arg) { |
- return handleStaticCompounds( |
- node, |
- element, |
- CompoundGetter.UNRESOLVED, |
- setter, |
- CompoundSetter.SETTER, |
- new AssignmentCompound(operator, rhs), |
- arg); |
+ return handleLocalSetIfNulls( |
+ node, variable, rhs, arg, isSetterValid: false); |
} |
@override |
- R visitUnresolvedStaticSetterCompound( |
+ R visitFinalParameterSetIfNull( |
Send node, |
- MethodElement getter, |
- Element element, |
- AssignmentOperator operator, |
+ ParameterElement parameter, |
Node rhs, |
A arg) { |
- return handleStaticCompounds( |
- node, |
- getter, |
- CompoundGetter.GETTER, |
- element, |
- CompoundSetter.INVALID, |
- new AssignmentCompound(operator, rhs), |
- arg); |
+ return handleLocalSetIfNulls( |
+ node, parameter, rhs, arg, isSetterValid: false); |
} |
@override |
- R visitUnresolvedTopLevelSetterCompound( |
+ R visitFinalStaticFieldSetIfNull( |
Send node, |
- MethodElement getter, |
- Element element, |
- AssignmentOperator operator, |
+ FieldElement field, |
Node rhs, |
A arg) { |
- return handleStaticCompounds( |
+ return handleStaticSetIfNulls( |
node, |
- getter, |
- CompoundGetter.GETTER, |
- element, |
+ field, |
+ CompoundGetter.FIELD, |
+ field, |
CompoundSetter.INVALID, |
- new AssignmentCompound(operator, rhs), |
+ rhs, |
arg); |
} |
@override |
- R visitStaticMethodCompound( |
+ R visitFinalSuperFieldSetIfNull( |
Send node, |
- MethodElement method, |
- AssignmentOperator operator, |
+ FieldElement field, |
Node rhs, |
A arg) { |
- return handleStaticCompounds( |
+ return handleSuperSetIfNulls( |
node, |
- method, |
- CompoundGetter.METHOD, |
- method, |
+ field, |
+ CompoundGetter.FIELD, |
+ field, |
CompoundSetter.INVALID, |
- new AssignmentCompound(operator, rhs), |
+ rhs, |
arg); |
} |
@override |
- R visitTopLevelMethodCompound( |
+ R visitFinalTopLevelFieldSetIfNull( |
Send node, |
- MethodElement method, |
- AssignmentOperator operator, |
+ FieldElement field, |
Node rhs, |
A arg) { |
- return handleStaticCompounds( |
+ return handleStaticSetIfNulls( |
node, |
- method, |
- CompoundGetter.METHOD, |
- method, |
+ field, |
+ CompoundGetter.FIELD, |
+ field, |
CompoundSetter.INVALID, |
- new AssignmentCompound(operator, rhs), |
+ rhs, |
arg); |
} |
@override |
- R visitUnresolvedCompound( |
+ R visitIfNotNullDynamicPropertySetIfNull( |
Send node, |
- Element element, |
- AssignmentOperator operator, |
+ Node receiver, |
+ Name name, |
Node rhs, |
A arg) { |
- return handleStaticCompounds( |
- node, |
- element, |
- CompoundGetter.UNRESOLVED, |
- element, |
- CompoundSetter.INVALID, |
- new AssignmentCompound(operator, rhs), |
- arg); |
+ return handleDynamicSetIfNulls(node, receiver, name, rhs, arg); |
} |
@override |
- R visitFinalLocalVariablePostfix( |
+ R visitLocalFunctionSetIfNull( |
Send node, |
- LocalVariableElement variable, |
- IncDecOperator operator, |
+ LocalFunctionElement function, |
+ Node rhs, |
A arg) { |
- return handleLocalCompounds( |
- node, |
- variable, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
- arg, |
- isSetterValid: false); |
+ return handleLocalSetIfNulls( |
+ node, function, rhs, arg, isSetterValid: false); |
} |
@override |
- R visitFinalLocalVariablePrefix( |
+ R visitLocalVariableSetIfNull( |
Send node, |
LocalVariableElement variable, |
- IncDecOperator operator, |
+ Node rhs, |
A arg) { |
- return handleLocalCompounds( |
- node, |
- variable, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
- arg, |
- isSetterValid: false); |
+ return handleLocalSetIfNulls( |
+ node, variable, rhs, arg, isSetterValid: true); |
} |
@override |
- R visitFinalParameterPostfix( |
+ R visitParameterSetIfNull( |
Send node, |
ParameterElement parameter, |
- IncDecOperator operator, |
+ Node rhs, |
A arg) { |
- return handleLocalCompounds( |
+ return handleLocalSetIfNulls( |
+ node, parameter, rhs, arg, isSetterValid: true); |
+ } |
+ |
+ @override |
+ R visitStaticFieldSetIfNull( |
+ Send node, |
+ FieldElement field, |
+ Node rhs, |
+ A arg) { |
+ return handleStaticSetIfNulls( |
node, |
- parameter, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
- arg, |
- isSetterValid: false); |
+ field, |
+ CompoundGetter.FIELD, |
+ field, |
+ CompoundSetter.FIELD, |
+ rhs, |
+ arg); |
} |
@override |
- R visitFinalParameterPrefix( |
+ R visitStaticGetterSetterSetIfNull( |
Send node, |
- ParameterElement parameter, |
- IncDecOperator operator, |
+ FunctionElement getter, |
+ FunctionElement setter, |
+ Node rhs, |
A arg) { |
- return handleLocalCompounds( |
+ return handleStaticSetIfNulls( |
node, |
- parameter, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
- arg, |
- isSetterValid: false); |
+ getter, |
+ CompoundGetter.GETTER, |
+ setter, |
+ CompoundSetter.SETTER, |
+ rhs, |
+ arg); |
} |
@override |
- R visitFinalStaticFieldPostfix( |
+ R visitStaticMethodSetIfNull( |
Send node, |
- FieldElement field, |
- IncDecOperator operator, |
+ FunctionElement method, |
+ Node rhs, |
A arg) { |
- return handleStaticCompounds( |
+ return handleStaticSetIfNulls( |
node, |
- field, |
- CompoundGetter.FIELD, |
- field, |
+ method, |
+ CompoundGetter.METHOD, |
+ method, |
CompoundSetter.INVALID, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ rhs, |
arg); |
} |
@override |
- R visitFinalStaticFieldPrefix( |
+ R visitStaticMethodSetterSetIfNull( |
Send node, |
- FieldElement field, |
- IncDecOperator operator, |
+ MethodElement method, |
+ MethodElement setter, |
+ Node rhs, |
A arg) { |
- return handleStaticCompounds( |
+ return handleStaticSetIfNulls( |
node, |
- field, |
- CompoundGetter.FIELD, |
- field, |
- CompoundSetter.INVALID, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ method, |
+ CompoundGetter.METHOD, |
+ setter, |
+ CompoundSetter.SETTER, |
+ rhs, |
arg); |
} |
@override |
- R visitSuperFieldFieldCompound( |
+ R visitSuperFieldFieldSetIfNull( |
Send node, |
FieldElement readField, |
FieldElement writtenField, |
- AssignmentOperator operator, |
Node rhs, |
A arg) { |
- return handleSuperCompounds( |
+ return handleSuperSetIfNulls( |
node, |
readField, |
CompoundGetter.FIELD, |
writtenField, |
CompoundSetter.FIELD, |
- new AssignmentCompound(operator, rhs), |
+ rhs, |
arg); |
} |
@override |
- R visitFinalSuperFieldPostfix( |
+ R visitSuperFieldSetIfNull( |
Send node, |
FieldElement field, |
- IncDecOperator operator, |
+ Node rhs, |
A arg) { |
- return handleSuperCompounds( |
+ return handleSuperSetIfNulls( |
node, |
field, |
CompoundGetter.FIELD, |
field, |
- CompoundSetter.INVALID, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ CompoundSetter.FIELD, |
+ rhs, |
arg); |
} |
@override |
- R visitFinalSuperFieldPrefix( |
+ R visitSuperFieldSetterSetIfNull( |
Send node, |
FieldElement field, |
- IncDecOperator operator, |
+ FunctionElement setter, |
+ Node rhs, |
A arg) { |
- return handleSuperCompounds( |
+ return handleSuperSetIfNulls( |
node, |
field, |
CompoundGetter.FIELD, |
+ setter, |
+ CompoundSetter.SETTER, |
+ rhs, |
+ arg); |
+ } |
+ |
+ @override |
+ R visitSuperGetterFieldSetIfNull( |
+ Send node, |
+ FunctionElement getter, |
+ FieldElement field, |
+ Node rhs, |
+ A arg) { |
+ return handleSuperSetIfNulls( |
+ node, |
+ getter, |
+ CompoundGetter.GETTER, |
field, |
- CompoundSetter.INVALID, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ CompoundSetter.FIELD, |
+ rhs, |
arg); |
} |
@override |
- R visitSuperMethodCompound( |
+ R visitSuperGetterSetterSetIfNull( |
Send node, |
- FunctionElement method, |
- AssignmentOperator operator, |
+ FunctionElement getter, |
+ FunctionElement setter, |
Node rhs, |
A arg) { |
- return handleSuperCompounds( |
+ return handleSuperSetIfNulls( |
node, |
- method, |
- CompoundGetter.METHOD, |
- method, |
- CompoundSetter.INVALID, |
- new AssignmentCompound(operator, rhs), |
+ getter, |
+ CompoundGetter.GETTER, |
+ setter, |
+ CompoundSetter.SETTER, |
+ rhs, |
arg); |
} |
@override |
- R visitSuperMethodPostfix( |
+ R visitSuperMethodSetIfNull( |
Send node, |
FunctionElement method, |
- IncDecOperator operator, |
+ Node rhs, |
A arg) { |
- return handleSuperCompounds( |
+ return handleSuperSetIfNulls( |
node, |
method, |
CompoundGetter.METHOD, |
method, |
CompoundSetter.INVALID, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ rhs, |
arg); |
} |
@override |
- R visitSuperMethodPrefix( |
+ R visitSuperMethodSetterSetIfNull( |
Send node, |
FunctionElement method, |
- IncDecOperator operator, |
+ FunctionElement setter, |
+ Node rhs, |
A arg) { |
- return handleSuperCompounds( |
+ return handleSuperSetIfNulls( |
node, |
method, |
CompoundGetter.METHOD, |
- method, |
- CompoundSetter.INVALID, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ setter, |
+ CompoundSetter.SETTER, |
+ rhs, |
arg); |
} |
@override |
- R visitFinalTopLevelFieldPostfix( |
+ R visitThisPropertySetIfNull( |
+ Send node, |
+ Name name, |
+ Node rhs, |
+ A arg) { |
+ return handleDynamicSetIfNulls(node, null, name, rhs, arg); |
+ } |
+ |
+ @override |
+ R visitTopLevelFieldSetIfNull( |
Send node, |
FieldElement field, |
- IncDecOperator operator, |
+ Node rhs, |
A arg) { |
- return handleStaticCompounds( |
+ return handleStaticSetIfNulls( |
node, |
field, |
CompoundGetter.FIELD, |
field, |
- CompoundSetter.INVALID, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ CompoundSetter.FIELD, |
+ rhs, |
arg); |
} |
@override |
- R visitFinalTopLevelFieldPrefix( |
+ R visitTopLevelGetterSetterSetIfNull( |
Send node, |
- FieldElement field, |
- IncDecOperator operator, |
+ FunctionElement getter, |
+ FunctionElement setter, |
+ Node rhs, |
A arg) { |
- return handleStaticCompounds( |
+ return handleStaticSetIfNulls( |
node, |
- field, |
- CompoundGetter.FIELD, |
- field, |
- CompoundSetter.INVALID, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ getter, |
+ CompoundGetter.GETTER, |
+ setter, |
+ CompoundSetter.SETTER, |
+ rhs, |
arg); |
} |
@override |
- R visitUnresolvedSuperCompound( |
+ R visitTopLevelMethodSetIfNull( |
Send node, |
- Element element, |
- AssignmentOperator operator, |
+ FunctionElement method, |
Node rhs, |
A arg) { |
- return handleSuperCompounds( |
+ return handleStaticSetIfNulls( |
node, |
- element, |
- CompoundGetter.UNRESOLVED, |
- element, |
+ method, |
+ CompoundGetter.METHOD, |
+ method, |
CompoundSetter.INVALID, |
- new AssignmentCompound(operator, rhs), |
+ rhs, |
arg); |
} |
@override |
- R visitUnresolvedSuperPostfix( |
+ R visitTopLevelMethodSetterSetIfNull( |
Send node, |
- Element element, |
- IncDecOperator operator, |
+ FunctionElement method, |
+ FunctionElement setter, |
+ Node rhs, |
A arg) { |
- return handleSuperCompounds( |
+ return handleStaticSetIfNulls( |
node, |
- element, |
- CompoundGetter.UNRESOLVED, |
- element, |
- CompoundSetter.INVALID, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ method, |
+ CompoundGetter.METHOD, |
+ setter, |
+ CompoundSetter.SETTER, |
+ rhs, |
arg); |
} |
@override |
- R visitUnresolvedSuperPrefix( |
+ R visitTypedefTypeLiteralSetIfNull( |
+ Send node, |
+ ConstantExpression constant, |
+ Node rhs, |
+ A arg) { |
+ return handleTypeLiteralConstantSetIfNulls(node, constant, rhs, arg); |
+ } |
+ |
+ @override |
+ R visitUnresolvedSetIfNull( |
Send node, |
Element element, |
- IncDecOperator operator, |
+ Node rhs, |
A arg) { |
- return handleSuperCompounds( |
+ return handleStaticSetIfNulls( |
node, |
element, |
CompoundGetter.UNRESOLVED, |
element, |
CompoundSetter.INVALID, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ rhs, |
arg); |
} |
@override |
- R visitUnresolvedSuperGetterCompound( |
- Send node, Element element, |
+ R visitUnresolvedStaticGetterSetIfNull( |
+ Send node, |
+ Element element, |
MethodElement setter, |
- AssignmentOperator operator, |
Node rhs, |
A arg) { |
- return handleSuperCompounds( |
+ return handleStaticSetIfNulls( |
node, |
element, |
CompoundGetter.UNRESOLVED, |
setter, |
CompoundSetter.SETTER, |
- new AssignmentCompound(operator, rhs), |
+ rhs, |
arg); |
} |
@override |
- R visitUnresolvedSuperGetterPostfix( |
+ R visitUnresolvedStaticSetterSetIfNull( |
Send node, |
+ MethodElement getter, |
Element element, |
- MethodElement setter, |
- IncDecOperator operator, |
+ Node rhs, |
A arg) { |
- return handleSuperCompounds( |
+ return handleStaticSetIfNulls( |
node, |
+ getter, |
+ CompoundGetter.GETTER, |
element, |
- CompoundGetter.UNRESOLVED, |
- setter, |
- CompoundSetter.SETTER, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ CompoundSetter.INVALID, |
+ rhs, |
arg); |
} |
@override |
- R visitUnresolvedSuperGetterPrefix( |
+ R visitUnresolvedSuperGetterSetIfNull( |
Send node, |
Element element, |
MethodElement setter, |
- IncDecOperator operator, |
+ Node rhs, |
A arg) { |
- return handleSuperCompounds( |
+ return handleSuperSetIfNulls( |
node, |
element, |
CompoundGetter.UNRESOLVED, |
setter, |
CompoundSetter.SETTER, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ rhs, |
arg); |
} |
@override |
- R visitUnresolvedSuperSetterCompound( |
+ R visitUnresolvedSuperSetIfNull( |
Send node, |
- MethodElement getter, |
Element element, |
- AssignmentOperator operator, |
Node rhs, |
A arg) { |
- return handleSuperCompounds( |
+ return handleSuperSetIfNulls( |
node, |
- getter, |
- CompoundGetter.GETTER, |
+ element, |
+ CompoundGetter.UNRESOLVED, |
element, |
CompoundSetter.INVALID, |
- new AssignmentCompound(operator, rhs), |
+ rhs, |
arg); |
} |
@override |
- R visitUnresolvedSuperSetterPostfix( |
+ R visitUnresolvedSuperSetterSetIfNull( |
Send node, |
MethodElement getter, |
Element element, |
- IncDecOperator operator, |
+ Node rhs, |
A arg) { |
- return handleSuperCompounds( |
+ return handleSuperSetIfNulls( |
node, |
getter, |
CompoundGetter.GETTER, |
element, |
CompoundSetter.INVALID, |
- new IncDecCompound(CompoundKind.POSTFIX, operator), |
+ rhs, |
arg); |
} |
@override |
- R visitUnresolvedSuperSetterPrefix( |
+ R visitUnresolvedTopLevelGetterSetIfNull( |
+ Send node, |
+ Element element, |
+ MethodElement setter, |
+ Node rhs, |
+ A arg) { |
+ return handleStaticSetIfNulls( |
+ node, |
+ element, |
+ CompoundGetter.UNRESOLVED, |
+ setter, |
+ CompoundSetter.SETTER, |
+ rhs, |
+ arg); |
+ } |
+ |
+ @override |
+ R visitUnresolvedTopLevelSetterSetIfNull( |
Send node, |
MethodElement getter, |
Element element, |
- IncDecOperator operator, |
+ Node rhs, |
A arg) { |
- return handleSuperCompounds( |
+ return handleStaticSetIfNulls( |
node, |
getter, |
CompoundGetter.GETTER, |
element, |
CompoundSetter.INVALID, |
- new IncDecCompound(CompoundKind.PREFIX, operator), |
+ rhs, |
arg); |
} |
} |