OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library fasta.fasta_accessors; | 5 library fasta.fasta_accessors; |
6 | 6 |
7 import 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart' | 7 import 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart' |
8 show | 8 show |
9 KernelArguments, | 9 KernelArguments, |
10 KernelComplexAssignment, | 10 KernelComplexAssignment, |
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 | 792 |
793 String get plainNameForWrite => "[]="; | 793 String get plainNameForWrite => "[]="; |
794 | 794 |
795 Expression doInvocation(int offset, Arguments arguments) { | 795 Expression doInvocation(int offset, Arguments arguments) { |
796 return helper.buildMethodInvocation( | 796 return helper.buildMethodInvocation( |
797 buildSimpleRead(), callName, arguments, offset, | 797 buildSimpleRead(), callName, arguments, offset, |
798 isImplicitCall: true); | 798 isImplicitCall: true); |
799 } | 799 } |
800 | 800 |
801 toString() => "ThisIndexAccessor()"; | 801 toString() => "ThisIndexAccessor()"; |
| 802 |
| 803 @override |
| 804 KernelComplexAssignment startComplexAssignment(Expression rhs) => |
| 805 new KernelIndexAssign(null, index, rhs); |
802 } | 806 } |
803 | 807 |
804 class SuperIndexAccessor extends kernel.SuperIndexAccessor with FastaAccessor { | 808 class SuperIndexAccessor extends kernel.SuperIndexAccessor with FastaAccessor { |
805 SuperIndexAccessor(BuilderHelper helper, Token token, Expression index, | 809 SuperIndexAccessor(BuilderHelper helper, Token token, Expression index, |
806 Member getter, Member setter) | 810 Member getter, Member setter) |
807 : super(helper, index, getter, setter, token); | 811 : super(helper, index, getter, setter, token); |
808 | 812 |
809 String get plainNameForRead => "[]"; | 813 String get plainNameForRead => "[]"; |
810 | 814 |
811 String get plainNameForWrite => "[]="; | 815 String get plainNameForWrite => "[]="; |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1037 offset ??= offsetForToken(this.token); | 1041 offset ??= offsetForToken(this.token); |
1038 return helper.throwNoSuchMethodError(new NullLiteral()..fileOffset = offset, | 1042 return helper.throwNoSuchMethodError(new NullLiteral()..fileOffset = offset, |
1039 plainNameForRead, arguments, offset, | 1043 plainNameForRead, arguments, offset, |
1040 isGetter: isGetter, isSetter: isSetter); | 1044 isGetter: isGetter, isSetter: isSetter); |
1041 } | 1045 } |
1042 } | 1046 } |
1043 | 1047 |
1044 bool isFieldOrGetter(Member member) { | 1048 bool isFieldOrGetter(Member member) { |
1045 return member is Field || (member is Procedure && member.isGetter); | 1049 return member is Field || (member is Procedure && member.isGetter); |
1046 } | 1050 } |
OLD | NEW |