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:kernel/ast.dart' | 7 import 'package:kernel/ast.dart' |
8 hide InvalidExpression, InvalidInitializer, InvalidStatement; | 8 hide InvalidExpression, InvalidInitializer, InvalidStatement; |
9 | 9 |
10 import '../../scanner/token.dart' show Token; | 10 import '../../scanner/token.dart' show Token; |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 | 457 |
458 final Name name; | 458 final Name name; |
459 | 459 |
460 IncompleteSend(this.helper, this.token, this.name); | 460 IncompleteSend(this.helper, this.token, this.name); |
461 | 461 |
462 withReceiver(Object receiver, int operatorOffset, {bool isNullAware}); | 462 withReceiver(Object receiver, int operatorOffset, {bool isNullAware}); |
463 | 463 |
464 Arguments get arguments => null; | 464 Arguments get arguments => null; |
465 } | 465 } |
466 | 466 |
467 class deprecated_IncompleteError extends IncompleteSend with ErrorAccessor { | 467 class IncompleteError extends IncompleteSend with ErrorAccessor { |
468 final Object error; | 468 final Message message; |
469 | 469 |
470 deprecated_IncompleteError(BuilderHelper helper, Token token, this.error) | 470 IncompleteError(BuilderHelper helper, Token token, this.message) |
471 : super(helper, token, null); | 471 : super(helper, token, null); |
472 | 472 |
473 @override | 473 @override |
474 Expression buildError(Arguments arguments, | 474 Expression buildError(Arguments arguments, |
475 {bool isGetter: false, bool isSetter: false, int offset}) { | 475 {bool isGetter: false, bool isSetter: false, int offset}) { |
476 return helper.deprecated_buildCompileTimeError( | 476 return helper.buildCompileTimeError( |
477 error, offset ?? offsetForToken(this.token)); | 477 message, offset ?? offsetForToken(this.token)); |
478 } | 478 } |
479 | 479 |
480 @override | 480 @override |
481 doInvocation(int offset, Arguments arguments) => this; | 481 doInvocation(int offset, Arguments arguments) => this; |
482 } | 482 } |
483 | 483 |
484 class SendAccessor extends IncompleteSend { | 484 class SendAccessor extends IncompleteSend { |
485 @override | 485 @override |
486 final Arguments arguments; | 486 final Arguments arguments; |
487 | 487 |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1058 offset ??= offsetForToken(this.token); | 1058 offset ??= offsetForToken(this.token); |
1059 return helper.throwNoSuchMethodError(new NullLiteral()..fileOffset = offset, | 1059 return helper.throwNoSuchMethodError(new NullLiteral()..fileOffset = offset, |
1060 plainNameForRead, arguments, offset, | 1060 plainNameForRead, arguments, offset, |
1061 isGetter: isGetter, isSetter: isSetter); | 1061 isGetter: isGetter, isSetter: isSetter); |
1062 } | 1062 } |
1063 } | 1063 } |
1064 | 1064 |
1065 bool isFieldOrGetter(Member member) { | 1065 bool isFieldOrGetter(Member member) { |
1066 return member is Field || (member is Procedure && member.isGetter); | 1066 return member is Field || (member is Procedure && member.isGetter); |
1067 } | 1067 } |
OLD | NEW |